16#define POINTS_BELOW_DIAG_TOLERANCE 1e-4
29 std::vector<std::vector<std::tuple<ftm::idNode, ftm::idNode, double>>>
35 "MergeTreePrincipalGeodesicsBase");
43 template <
class dataType>
47 std::vector<std::vector<double *>> &vS,
48 std::vector<std::vector<double *>> &v2s,
50 std::vector<std::vector<double>> &allTreesTs,
51 std::vector<double> &reconstructionErrors,
52 std::vector<std::vector<std::tuple<ftm::idNode, ftm::idNode, double>>>
54 bool transposeVector =
true) {
55 reconstructionErrors.resize(inputTrees.size());
56 matchings.resize(inputTrees.size());
57 dataType reconstructionError = 0.0;
58#ifdef TTK_ENABLE_OPENMP
59#pragma omp parallel for schedule(dynamic) num_threads(this->threadNumber_) \
60 reduction(+ : reconstructionError)
62 for(
unsigned int i = 0; i < inputTrees.size(); ++i) {
65 allTreesTs[i], reconstructedTree,
69 reconstructedTree, inputTrees[i], matchings[i], error,
true);
70 reconstructionError += error / inputTrees.size();
71 reconstructionErrors[i] = error;
73 return reconstructionError;
76 template <
class dataType>
80 std::vector<std::vector<std::vector<double>>> &vS,
81 std::vector<std::vector<std::vector<double>>> &v2s,
82 std::vector<std::vector<double>> &allTreesTs,
83 std::vector<double> &reconstructionErrors) {
84 std::vector<std::vector<double *>> pVS, pV2s;
87 std::vector<std::vector<std::tuple<ftm::idNode, ftm::idNode, double>>>
90 vS[0].size(), allTreesTs,
91 reconstructionErrors, matchings,
false);
94 template <
class dataType>
98 std::vector<std::vector<std::vector<double>>> &vS,
99 std::vector<std::vector<std::vector<double>>> &v2s,
100 std::vector<std::vector<double>> &allTreesTs) {
101 std::vector<double> reconstructionErrors;
103 barycenter, inputTrees, vS, v2s, allTreesTs, reconstructionErrors);
110 std::vector<double> &v2) {
111 std::vector<double> vProj, v2Proj;
116 for(
unsigned int i = 0; i < vProj.size(); ++i) {
119 alpha += (vProj[i] / v2Proj[i]);
123 double const m = alpha / (1 + alpha);
130 return (m - tMin) * (1 - m) / m + m;
136 return (m - tMax) * m / (1 - m) + m;
140 double newT,
double m,
double &tMin,
double &tMax,
bool updateTMin) {
142 tMin = std::max(newT, tMin);
144 if(adjustedTMax > tMin)
145 tMax = std::min(adjustedTMax, tMax);
147 tMax = std::min(newT, tMax);
149 if(adjustedTMin < tMax)
150 tMin = std::max(adjustedTMin, tMin);
154 template <
class dataType>
158 std::vector<std::vector<double>> &vNew,
159 std::vector<std::vector<double>> &v2New,
162 bool shortener =
false;
165 auto newBirthV1 = baryBirth - vNew[node][0];
166 auto newDeathV1 = baryDeath - vNew[node][1];
169 auto newBirthV2 = baryBirth + v2New[node][0];
170 auto newDeathV2 = baryDeath + v2New[node][1];
173 if(newBirthV1 > newDeathV1 and newBirthV2 > newDeathV2) {
177 = (vNew[node][1] - vNew[node][0]) / (baryDeath - baryBirth);
178 vNew[node][0] /= divisor;
179 vNew[node][1] /= divisor;
180 double const divisor2
181 = (v2New[node][0] - v2New[node][1]) / (baryDeath - baryBirth);
182 v2New[node][0] /= divisor2;
183 v2New[node][1] /= divisor2;
184 }
else if(newBirthV1 > newDeathV1 or newBirthV2 > newDeathV2) {
186 = (baryDeath - vNew[node][1] - baryBirth + vNew[node][0])
187 / (vNew[node][0] + v2New[node][0]
188 - (vNew[node][1] + v2New[node][1]));
190 if(newBirthV1 > newDeathV1)
191 updateT(newT, m, tMin, tMax,
true);
192 if(newBirthV2 > newDeathV2)
193 updateT(newT, m, tMin, tMax,
false);
199 template <
class dataType>
204 std::vector<std::vector<double>> &vNew,
205 std::vector<std::vector<double>> &v2New,
208 bool shortener =
false;
210 dataType birthParent = 0.0;
211 dataType deathParent = 1.0;
213 auto interpolant = [&](
int i,
double t) {
214 return -vNew[node][i] + t * (vNew[node][i] + v2New[node][i]);
218 auto newBirthV1 = baryBirth + interpolant(0, tMin);
219 auto newDeathV1 = baryDeath + interpolant(1, tMin);
220 auto parentBirthV1 = 0.0;
221 auto parentDeathV1 = 1.0;
224 auto newBirthV2 = baryBirth + interpolant(0, tMax);
225 auto newDeathV2 = baryDeath + interpolant(1, tMax);
226 auto parentBirthV2 = 0.0;
227 auto parentDeathV2 = 1.0;
230 bool const extremOutPathIn
231 = ((newDeathV1 > parentDeathV1 and not(newBirthV1 < parentBirthV1)
232 and not(newDeathV2 > parentDeathV2) and newBirthV2 < parentBirthV2)
233 or (not(newDeathV1 > parentDeathV1) and newBirthV1 < parentBirthV1
234 and newDeathV2 > parentDeathV2
235 and not(newBirthV2 < parentBirthV2)));
239 if(((newDeathV1 > parentDeathV1 and newDeathV2 > parentDeathV2)
240 or (newBirthV1 < parentBirthV1 and newBirthV2 < parentBirthV2))
241 and not(extremOutPathIn)) {
246 if(newDeathV1 > parentDeathV1 and newBirthV1 < parentBirthV1)
247 if(newBirthV1 < newDeathV1)
248 coef1 = (parentBirthV1 - baryBirth) / interpolant(0, tMin);
250 coef1 = (parentDeathV1 - baryDeath) / interpolant(1, tMin);
251 else if(newBirthV1 < parentBirthV1)
252 coef1 = (parentBirthV1 - baryBirth) / interpolant(0, tMin);
253 else if(newDeathV1 > parentDeathV1)
254 coef1 = (parentDeathV1 - baryDeath) / interpolant(1, tMin);
255 vNew[node][0] *= coef1;
256 vNew[node][1] *= coef1;
260 if(newDeathV2 > parentDeathV2 and newBirthV2 < parentBirthV2)
261 if(newBirthV2 < newDeathV2)
262 coef2 = (parentBirthV2 - baryBirth) / interpolant(0, tMax);
264 coef2 = (parentDeathV2 - baryDeath) / interpolant(1, tMax);
265 else if(newBirthV2 < parentBirthV2)
266 coef2 = (parentBirthV2 - baryBirth) / interpolant(0, tMax);
267 else if(newDeathV2 > parentDeathV2)
268 coef2 = (parentDeathV2 - baryDeath) / interpolant(1, tMax);
269 v2New[node][0] *= coef2;
270 v2New[node][1] *= coef2;
275 if(((newDeathV1 > parentDeathV1 or newBirthV1 < parentBirthV1)
276 != (newDeathV2 > parentDeathV2 or newBirthV2 < parentBirthV2))
277 or extremOutPathIn) {
279 if(newDeathV1 > parentDeathV1 or newDeathV2 > parentDeathV2) {
280 double const newT = (deathParent - baryDeath + vNew[node][1])
281 / (vNew[node][1] + v2New[node][1]);
282 if(newDeathV1 > parentDeathV1)
283 updateT(newT, m, tMin, tMax,
true);
284 if(newDeathV2 > parentDeathV2)
285 updateT(newT, m, tMin, tMax,
false);
287 if(newBirthV1 < parentBirthV1 or newBirthV2 < parentBirthV2) {
288 double const newT = (birthParent - baryBirth + vNew[node][0])
289 / (vNew[node][0] + v2New[node][0]);
290 if(newBirthV1 < parentBirthV1)
291 updateT(newT, m, tMin, tMax,
true);
292 if(newBirthV2 < parentBirthV2)
293 updateT(newT, m, tMin, tMax,
false);
300 template <
class dataType>
303 std::vector<std::vector<double>> &vNew,
304 std::vector<std::vector<double>> &v2New,
309 const std::string &msg,
310 std::stringstream &ssT) {
311 double const tNew = (t * (tMax - tMin) + tMin);
312 std::streamsize
const sSize = std::cout.precision();
313 ssT << std::setprecision(12) << std::endl << msg << std::endl;
314 ssT <<
"interBirth : "
315 << birth - vNew[i][0] + tNew * (vNew[i][0] + v2New[i][0]) <<
" _ "
317 << death - vNew[i][1] + tNew * (vNew[i][1] + v2New[i][1])
319 ssT <<
"v : " << vNew[i][0] <<
" _ " << vNew[i][1] << std::endl;
320 ssT <<
"v2 : " << v2New[i][0] <<
" _ " << v2New[i][1] << std::endl;
321 ssT <<
"ts : " << tMin <<
" _ " << tMax << std::endl;
322 ssT <<
"t : " << t <<
" _ tNew : " << tNew << std::endl;
323 std::cout.precision(sSize);
326 template <
class dataType>
328 std::vector<std::vector<double>> &v,
329 std::vector<std::vector<double>> &v2,
333 double tMin = 0.0, tMax = 1.0;
337 auto birth = std::get<0>(birthDeath);
338 auto death = std::get<1>(birthDeath);
342 auto parentBirthDeath = baryTree->
getBirthDeath<dataType>(parent);
343 auto parentBirth = std::get<0>(parentBirthDeath);
344 auto parentDeath = std::get<1>(parentBirthDeath);
347 birth = (birth - parentBirth) / (parentDeath - parentBirth);
348 death = (death - parentBirth) / (parentDeath - parentBirth);
352 bool diagonalShortener
356 bool nestingShortener =
false;
363 double const tNew = t * (tMax - tMin) + tMin;
365 if(diagonalShortener or nestingShortener)
371 template <
class dataType>
373 std::vector<double *> &v,
374 std::vector<double *> &v2,
377 std::vector<dataType> &interpolationVectorT,
378 bool transposeVector) {
381 std::vector<dataType> scalarsVector;
383 std::vector<double> interpolationVector(scalarsVector.size());
384 std::vector<std::vector<double>> vNew, v2New;
387 if(transposeVector) {
388 std::vector<std::vector<double>> out;
396 int cptBelowDiagonal = 0, cptNotNesting = 0;
397 std::queue<ftm::idNode> queue;
398 queue.emplace(baryTree->
getRoot());
399 int noNestingShortener = 0, noDiagonalShortener = 0;
400 while(!queue.empty()) {
406 auto nodeBirth = std::get<0>(nodeBirthDeath);
407 auto nodeDeath = std::get<1>(nodeBirthDeath);
408 auto birth = scalarsVector[nodeBirth];
409 auto death = scalarsVector[nodeDeath];
413 auto parentNodeBirthDeath
415 auto parentNodeBirth = std::get<0>(parentNodeBirthDeath);
416 auto parentNodeDeath = std::get<1>(parentNodeBirthDeath);
417 auto parentBirth = scalarsVector[parentNodeBirth];
418 auto parentDeath = scalarsVector[parentNodeDeath];
419 auto interParentBirth = interpolationVector[parentNodeBirth];
420 auto interParentDeath = interpolationVector[parentNodeDeath];
423 std::stringstream ssT;
424 std::streamsize
const sSize2 = std::cout.precision();
425 ssT << std::setprecision(12);
426 ssT <<
"info" << std::endl;
427 ssT <<
"birth death : " << birth <<
" ___ " << death << std::endl;
428 ssT <<
"par. birth death : " << parentBirth <<
" ___ " << parentDeath
430 ssT <<
"par. inter birth death : " << interParentBirth <<
" ___ "
431 << interParentDeath << std::endl;
434 birth = (birth - parentBirth) / (parentDeath - parentBirth);
435 death = (death - parentBirth) / (parentDeath - parentBirth);
436 ssT <<
"norm. birth death : " << birth <<
" ___ " << death
439 std::cout.precision(sSize2);
443 double tMin = 0.0, tMax = 1.0;
448 "before adjustDiagonalT", ssT);
452 bool const diagonalShortener
454 noDiagonalShortener += diagonalShortener;
458 birth, death, vNew, v2New, i, t, tMin, tMax,
459 "after adjustDiagonalT/before adjustNestingT", ssT);
465 barycenter, birth, death, i, vNew, v2New, tMin, tMax);
466 noNestingShortener += nestingShortener;
471 "after adjustNestingT", ssT);
476 double const tNew = t * (tMax - tMin) + tMin;
478 = birth - vNew[i][0] + tNew * (vNew[i][0] + v2New[i][0]);
480 = death - vNew[i][1] + tNew * (vNew[i][1] + v2New[i][1]);
482 double const coef = (interParentDeath - interParentBirth);
484 interBirth += interParentBirth;
486 interDeath += interParentBirth;
488 interpolationVector[nodeBirth] = interBirth;
489 interpolationVector[nodeDeath] = interDeath;
492 if(std::isnan(interpolationVector[nodeBirth])
493 or std::isnan(interpolationVector[nodeDeath])) {
499 if(interpolationVector[nodeBirth] > interpolationVector[nodeDeath]
500 and interpolationVector[nodeBirth] - interpolationVector[nodeDeath]
502 interpolationVector[nodeBirth] = interpolationVector[nodeDeath];
504 if(interpolationVector[nodeBirth] > interpolationVector[nodeDeath]) {
507 std::streamsize
const sSize = std::cout.precision();
508 std::stringstream ss;
509 ss << std::setprecision(12) << interpolationVector[nodeBirth] <<
" > "
510 << interpolationVector[nodeDeath];
512 std::cout.precision(sSize);
517 if(interpolationVector[nodeBirth] < interParentBirth
518 and (interParentBirth - interpolationVector[nodeBirth]) < eps)
519 interpolationVector[nodeBirth] = interParentBirth;
520 if(interpolationVector[nodeBirth] > interParentDeath
521 and (interpolationVector[nodeBirth] - interParentDeath) < eps) {
522 interpolationVector[nodeBirth] = interParentDeath;
524 if(interpolationVector[nodeDeath] < interParentBirth
525 and (interParentBirth - interpolationVector[nodeDeath]) < eps) {
526 interpolationVector[nodeDeath] = interParentBirth;
528 if(interpolationVector[nodeDeath] > interParentDeath
529 and (interpolationVector[nodeDeath] - interParentDeath) < eps)
530 interpolationVector[nodeDeath] = interParentDeath;
533 and (interpolationVector[nodeBirth] < interParentBirth
534 or interpolationVector[nodeBirth] > interParentDeath
535 or interpolationVector[nodeDeath] < interParentBirth
536 or interpolationVector[nodeDeath] > interParentDeath)) {
539 std::streamsize
const sSize = std::cout.precision();
540 std::stringstream ss;
541 ss << std::setprecision(12) << interpolationVector[nodeBirth] <<
" _ "
542 << interpolationVector[nodeDeath] <<
" --- " << interParentBirth
543 <<
" _ " << interParentDeath;
545 std::cout.precision(sSize);
549 std::vector<ftm::idNode> children;
551 for(
auto child : children)
552 queue.emplace(child);
554 if(noNestingShortener != 0)
555 printWrn(
"[getInterpolationVector] "
556 + std::to_string(noNestingShortener)
557 +
" nesting vector shortener.");
558 if(noDiagonalShortener != 0)
559 printMsg(
"[getInterpolationVector] "
560 + std::to_string(noDiagonalShortener)
561 +
" diagonal vector shortener.",
563 if(cptBelowDiagonal != 0)
564 printErr(
"[getInterpolationVector] point below diagonal.");
565 if(cptNotNesting != 0)
566 printErr(
"[getInterpolationVector] nesting condition not ok.");
568 interpolationVectorT.resize(scalarsVector.size());
569 for(
unsigned int i = 0; i < interpolationVectorT.size(); ++i)
570 interpolationVectorT[i] = interpolationVector[i];
573 template <
class dataType>
575 std::vector<double *> &v,
576 std::vector<double *> &v2,
580 bool transposeVector =
true) {
584 std::vector<dataType> newScalarsVector;
586 barycenter, v, v2, vSize, t, newScalarsVector, transposeVector);
601 template <
class dataType>
603 std::vector<std::vector<double>> &v,
604 std::vector<std::vector<double>> &v2,
607 std::vector<double *> pV, pV2;
611 barycenter, pV, pV2, v[0].size(), t, interpolated,
false);
614 template <
class dataType>
616 std::vector<std::vector<double *>> &vS,
617 std::vector<std::vector<double *>> &v2s,
619 std::vector<double> &ts,
621 bool transposeVector =
true) {
623 barycenter, vS[0], v2s[0], vSize, ts[0], interpolated, transposeVector);
624 for(
unsigned int i = 1; i < vS.size(); ++i) {
627 newInterpolated, transposeVector);
628 interpolated = newInterpolated;
632 template <
class dataType>
635 std::vector<std::vector<std::vector<double>>> &vS,
636 std::vector<std::vector<std::vector<double>>> &v2s,
637 std::vector<double> &ts,
639 std::vector<std::vector<double *>> pVS, pV2s;
643 barycenter, pVS, pV2s, vS[0][0].size(), ts, interpolated,
false);
646 template <
class dataType>
649 std::vector<std::vector<std::vector<double>>> &vS,
650 std::vector<std::vector<std::vector<double>>> &v2s,
651 std::vector<std::vector<double>> &v,
652 std::vector<std::vector<double>> &v2,
653 std::vector<double> &ts,
656 std::vector<std::vector<std::vector<double>>> vSTemp = vS, v2sTemp = v2s;
658 v2sTemp.push_back(v2);
659 std::vector<double> tsTemp = ts;
660 if(tsTemp.size() != 0)
661 tsTemp[vSTemp.size() - 1] = t;
671 std::vector<double> &v,
672 std::vector<double> &newV);
677 std::vector<double *> &pVec);
680 std::vector<std::vector<std::vector<double>>> &vS,
681 std::vector<std::vector<double *>> &pVS);
683 void pointerToVector(
double *pVec,
size_t size, std::vector<double> &vec);
686 std::vector<size_t> sizes,
687 std::vector<std::vector<double>> &vec);
691 std::vector<std::vector<double>> &vec);
#define ttkNotUsed(x)
Mark function/method parameters that are not used in the function body at all.
#define POINTS_BELOW_DIAG_TOLERANCE
int printWrn(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
void setDebugMsgPrefix(const std::string &prefix)
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
MergeTreeAxesAlgorithmBase()
void computeOneDistance(const ftm::MergeTree< dataType > &tree1, const ftm::MergeTree< dataType > &tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matching, dataType &distance, bool isCalled=false, bool useDoubleInput=false, bool isFirstInput=true)
bool normalizedWasserstein_
void persistenceThresholding(ftm::FTMTree_MT *tree, double persistenceThresholdT, std::vector< ftm::idNode > &deletedNodes)
double getGeodesicVectorMiddle(std::vector< double > &v, std::vector< double > &v2)
MergeTreePrincipalGeodesicsBase()
dataType computeReconstructionError(ftm::MergeTree< dataType > &barycenter, std::vector< ftm::MergeTree< dataType > > &inputTrees, std::vector< std::vector< std::vector< double > > > &vS, std::vector< std::vector< std::vector< double > > > &v2s, std::vector< std::vector< double > > &allTreesTs)
void getInterpolationVectorDebugMsg(dataType birth, dataType death, std::vector< std::vector< double > > &vNew, std::vector< std::vector< double > > &v2New, int i, double t, double tMin, double tMax, const std::string &msg, std::stringstream &ssT)
std::vector< std::vector< double > > allTreesTs_
std::vector< std::vector< std::vector< double > > > v2s_
void vectorToPointer(std::vector< double > &vec, double *&pVec)
void pointersToVectors(std::vector< double * > &pVec, std::vector< size_t > sizes, std::vector< std::vector< double > > &vec)
double getTNew(ftm::MergeTree< dataType > &barycenter, std::vector< std::vector< double > > &v, std::vector< std::vector< double > > &v2, int i, double t)
double getAdjustedTMin(double tMax, double m)
std::vector< std::vector< std::vector< double > > > trees2V2s_
void getMultiInterpolation(ftm::MergeTree< dataType > &barycenter, std::vector< std::vector< double * > > &vS, std::vector< std::vector< double * > > &v2s, size_t vSize, std::vector< double > &ts, ftm::MergeTree< dataType > &interpolated, bool transposeVector=true)
std::vector< std::vector< std::vector< double > > > vS_
void getInterpolation(ftm::MergeTree< dataType > &barycenter, std::vector< double * > &v, std::vector< double * > &v2, size_t vSize, double t, ftm::MergeTree< dataType > &interpolated, bool transposeVector=true)
void vectorsToPointers(std::vector< std::vector< double > > &vec, std::vector< double * > &pVec)
bool adjustNestingT(ftm::MergeTree< dataType > &ttkNotUsed(barycenter), dataType baryBirth, dataType baryDeath, ftm::idNode node, std::vector< std::vector< double > > &vNew, std::vector< std::vector< double > > &v2New, double &tMin, double &tMax)
std::vector< std::vector< double > > allTs_
std::vector< std::vector< double > > branchesCorrelationMatrix_
void getMultiInterpolation(ftm::MergeTree< dataType > &barycenter, std::vector< std::vector< std::vector< double > > > &vS, std::vector< std::vector< std::vector< double > > > &v2s, std::vector< double > &ts, ftm::MergeTree< dataType > &interpolated)
std::vector< std::vector< double > > persCorrelationMatrix_
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > baryMatchings_
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > baryMatchings2_
bool adjustDiagonalT(dataType baryBirth, dataType baryDeath, ftm::idNode node, std::vector< std::vector< double > > &vNew, std::vector< std::vector< double > > &v2New, double &tMin, double &tMax)
void getMultiInterpolation(ftm::MergeTree< dataType > &barycenter, std::vector< std::vector< std::vector< double > > > &vS, std::vector< std::vector< std::vector< double > > > &v2s, std::vector< std::vector< double > > &v, std::vector< std::vector< double > > &v2, std::vector< double > &ts, double t, ftm::MergeTree< dataType > &interpolated)
double getAdjustedTMax(double tMin, double m)
void pointerToVector(double *pVec, size_t size, std::vector< double > &vec)
void getInterpolation(ftm::MergeTree< dataType > &barycenter, std::vector< std::vector< double > > &v, std::vector< std::vector< double > > &v2, double t, ftm::MergeTree< dataType > &interpolated)
void getInterpolationVector(ftm::MergeTree< dataType > &barycenter, std::vector< double * > &v, std::vector< double * > &v2, size_t vSize, double t, std::vector< dataType > &interpolationVectorT, bool transposeVector)
std::vector< std::vector< std::vector< double > > > trees2Vs_
std::vector< std::vector< double > > allScaledTs_
void vectorOfVectorsToPointers(std::vector< std::vector< std::vector< double > > > &vS, std::vector< std::vector< double * > > &pVS)
dataType computeReconstructionError(ftm::MergeTree< dataType > &barycenter, std::vector< ftm::MergeTree< dataType > > &inputTrees, std::vector< std::vector< double * > > &vS, std::vector< std::vector< double * > > &v2s, size_t vSize, std::vector< std::vector< double > > &allTreesTs, std::vector< double > &reconstructionErrors, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings, bool transposeVector=true)
void updateT(double newT, double m, double &tMin, double &tMax, bool updateTMin)
dataType computeReconstructionError(ftm::MergeTree< dataType > &barycenter, std::vector< ftm::MergeTree< dataType > > &inputTrees, std::vector< std::vector< std::vector< double > > > &vS, std::vector< std::vector< std::vector< double > > > &v2s, std::vector< std::vector< double > > &allTreesTs, std::vector< double > &reconstructionErrors)
void callGramSchmidt(std::vector< std::vector< double > > &vS, std::vector< double > &v, std::vector< double > &newV)
void getChildren(idNode nodeId, std::vector< idNode > &res) const
std::tuple< ftm::idNode, ftm::idNode > getBirthDeathNode(idNode nodeId) const
void copyMergeTreeStructure(const FTMTree_MT *tree)
idNode getParentSafe(idNode nodeId) const
std::tuple< dataType, dataType > getBirthDeath(idNode nodeId) const
bool notNeedToNormalize(idNode nodeId) const
T1 pow(const T1 val, const T2 n)
void addVectorsProjection(const std::vector< T > &a, const std::vector< T > &b, std::vector< T > &a_out, std::vector< T > &b_out)
void transposeMatrix(const std::vector< std::vector< T > > &a, std::vector< std::vector< T > > &out)
void setTreeScalars(MergeTree< dataType > &mergeTree, std::vector< dataType > &scalarsVector)
void getTreeScalars(const ftm::FTMTree_MT *tree, std::vector< dataType > &scalarsVector)
MergeTree< dataType > createEmptyMergeTree(int scalarSize)
unsigned int idNode
Node index in vect_nodes_.
TTK base package defining the standard types.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/| (_) |"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)