TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ttk::MergeTreeBarycenter Class Reference

#include <MergeTreeBarycenter.h>

Inheritance diagram for ttk::MergeTreeBarycenter:
ttk::Debug ttk::MergeTreeBase ttk::BaseClass ttk::Debug ttk::BaseClass ttk::MergeTreeClustering< dataType2 >

Public Member Functions

 MergeTreeBarycenter ()
 
 ~MergeTreeBarycenter () override=default
 
void setTol (double tolT)
 
void setAddNodes (bool addNodesT)
 
void setDeterministic (bool deterministicT)
 
void setProgressiveBarycenter (bool progressive)
 
void setProgressiveSpeedDivisor (double progSpeed)
 
void setIsCalled (bool ic)
 
double getAllDistanceTime ()
 
double getAddDeletedNodesTime ()
 
void setAlpha (double alpha)
 
void setBarycenterMaximumNumberOfPairs (unsigned int maxi)
 
void setBarycenterSizeLimitPercent (double percent)
 
void setPreprocess (bool preproc)
 
void setPostprocess (bool postproc)
 
std::vector< double > getFinalDistances ()
 
template<class dataType >
void getDistanceMatrix (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< std::vector< double > > &distanceMatrix, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void getDistanceMatrix (std::vector< ftm::FTMTree_MT * > &trees, std::vector< std::vector< double > > &distanceMatrix, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void getSizeLimitedTrees (std::vector< ftm::FTMTree_MT * > &trees, unsigned int barycenterMaximumNumberOfPairs, double sizeLimitPercent, std::vector< ftm::MergeTree< dataType > > &mTreesLimited)
 
template<class dataType >
void getSizeLimitedDistanceMatrix (std::vector< ftm::FTMTree_MT * > &trees, std::vector< std::vector< double > > &distanceMatrix, unsigned int barycenterMaximumNumberOfPairs, double sizeLimitPercent, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void getParametrizedDistanceMatrix (std::vector< ftm::FTMTree_MT * > &trees, std::vector< std::vector< double > > &distanceMatrix, unsigned int barycenterMaximumNumberOfPairs, double sizeLimitPercent, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
int getBestInitTreeIndex (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::FTMTree_MT * > &trees2, unsigned int barycenterMaximumNumberOfPairs, double sizeLimitPercent, bool distMinimizer=true)
 
template<class dataType >
int getBestInitTreeIndex (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::FTMTree_MT * > &trees2, double sizeLimitPercent, bool distMinimizer=true)
 
template<class dataType >
int getBestInitTreeIndex (std::vector< ftm::FTMTree_MT * > &trees, bool distMinimizer=true)
 
template<class dataType >
void initBarycenterTree (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryTree, bool distMinimizer=true)
 
template<class dataType >
ftm::idNode getNodesAndScalarsToAdd (ftm::MergeTree< dataType > &ttkNotUsed(mTree1), ftm::idNode nodeId1, ftm::FTMTree_MT *tree2, ftm::idNode nodeId2, std::vector< dataType > &newScalarsVector, std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &nodesToProcess, ftm::idNode nodeCpt, int i)
 
template<class dataType >
void addNodes (ftm::MergeTree< dataType > &mTree1, int noTrees, std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &nodesToProcess, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode > > > &nodesProcessed)
 
template<class dataType >
void updateNodesAndScalars (ftm::MergeTree< dataType > &mTree1, int noTrees, std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &nodesToProcess, std::vector< dataType > &newScalarsVector, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode > > > &nodesProcessed)
 
template<class dataType >
void updateBarycenterTreeStructure (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings)
 
template<class dataType >
std::tuple< dataType, dataType > getParametrizedBirthDeath (ftm::FTMTree_MT *tree1, ftm::idNode nodeId1)
 
template<class dataType >
std::tuple< dataType, dataType > interpolation (ftm::MergeTree< dataType > &baryMergeTree, ftm::idNode nodeId, std::vector< dataType > &newScalarsVector, std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::idNode > &nodes, std::vector< double > &alphas)
 
template<class dataType >
std::tuple< dataType, dataType > interpolationAdded (ftm::FTMTree_MT *tree, ftm::idNode nodeId, double alpha, ftm::MergeTree< dataType > &baryMergeTree, ftm::idNode nodeB, std::vector< dataType > &newScalarsVector)
 
template<class dataType >
void updateBarycenterTreeScalars (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< double > &alphas, unsigned int indexAddedNodes, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings)
 
template<class dataType >
void updateBarycenterTree (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< double > &alphas, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings)
 
template<class dataType >
void computeOneDistance (ftm::FTMTree_MT *tree, ftm::FTMTree_MT *baryTree, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matching, dataType &distance, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void computeOneDistance (ftm::FTMTree_MT *tree, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matching, dataType &distance, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void computeOneDistance (ftm::MergeTree< dataType > &baryMergeTree, ftm::MergeTree< dataType > &baryMergeTree2, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matching, dataType &distance, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void assignment (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings, std::vector< dataType > &distances, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void assignmentPara (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings, std::vector< dataType > &distances, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
void assignmentTask (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &matchings, std::vector< dataType > &distances, bool useDoubleInput=false, bool isFirstInput=true)
 
template<class dataType >
unsigned int persistenceScaling (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &mergeTrees, std::vector< ftm::FTMTree_MT * > &oriTrees, int iterationNumber, std::vector< std::vector< ftm::idNode > > &deletedNodes)
 
template<class dataType >
void addScaledDeletedNodesCost (std::vector< ftm::FTMTree_MT * > &oriTrees, std::vector< std::vector< ftm::idNode > > &deletedNodes, std::vector< dataType > &distances)
 
template<class dataType >
void computeBarycenter (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< double > &alphas, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &finalMatchings, bool finalAsgnDoubleInput=false, bool finalAsgnFirstInput=true)
 
template<class dataType >
void execute (std::vector< ftm::MergeTree< dataType > > &trees, std::vector< double > &alphas, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &finalMatchings, ftm::MergeTree< dataType > &baryMergeTree, bool finalAsgnDoubleInput=false, bool finalAsgnFirstInput=true)
 
template<class dataType >
void execute (std::vector< ftm::MergeTree< dataType > > &trees, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &finalMatchings, ftm::MergeTree< dataType > &baryMergeTree, bool finalAsgnDoubleInput=false, bool finalAsgnFirstInput=true)
 
template<class dataType >
void limitSizePercent (ftm::MergeTree< dataType > &bary, std::vector< ftm::FTMTree_MT * > &trees, double percent, bool useBD)
 
template<class dataType >
void limitSizeBarycenter (ftm::MergeTree< dataType > &bary, std::vector< ftm::FTMTree_MT * > &trees, unsigned int barycenterMaximumNumberOfPairs, double percent, bool useBD=true)
 
template<class dataType >
void limitSizeBarycenter (ftm::MergeTree< dataType > &bary, std::vector< ftm::FTMTree_MT * > &trees, double percent, bool useBD=true)
 
template<class dataType >
void limitSizeBarycenter (ftm::MergeTree< dataType > &bary, std::vector< ftm::FTMTree_MT * > &trees, bool useBD=true)
 
template<class dataType >
void fixMergedRootOriginBarycenter (ftm::MergeTree< dataType > &barycenter)
 
void printBaryStats (ftm::FTMTree_MT *baryTree, const debug::Priority &priority=debug::Priority::INFO)
 
template<class dataType >
void verifyBarycenterTwoTrees (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &baryMergeTree, std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &finalMatchings, std::vector< dataType > distances)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
virtual int setDebugLevel (const int &debugLevel)
 
int setWrapper (const Wrapper *wrapper) override
 
int printMsg (const std::string &msg, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::string > &msgs, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printErr (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printWrn (const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const double &memory, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const double &time, const int &threads, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::PERFORMANCE, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const double &progress, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::vector< std::vector< std::string > > &rows, const debug::Priority &priority=debug::Priority::INFO, const bool hasHeader=true, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
int printMsg (const debug::Separator &separator, const debug::Priority &priority, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsg (const std::string &msg, const debug::Separator &separator, const debug::LineMode &lineMode=debug::LineMode::NEW, const debug::Priority &priority=debug::Priority::INFO, std::ostream &stream=std::cout) const
 
void setDebugMsgPrefix (const std::string &prefix)
 
- Public Member Functions inherited from ttk::BaseClass
 BaseClass ()
 
virtual ~BaseClass ()=default
 
int getThreadNumber () const
 
virtual int setThreadNumber (const int threadNumber)
 
- Public Member Functions inherited from ttk::MergeTreeBase
 MergeTreeBase ()
 
void setAssignmentSolver (int assignmentSolver)
 
void setEpsilon1UseFarthestSaddle (bool b)
 
void setEpsilonTree1 (double epsilon)
 
void setEpsilonTree2 (double epsilon)
 
void setEpsilon2Tree1 (double epsilon)
 
void setEpsilon2Tree2 (double epsilon)
 
void setEpsilon3Tree1 (double epsilon)
 
void setEpsilon3Tree2 (double epsilon)
 
void setPersistenceThreshold (double pt)
 
void setParallelize (bool para)
 
void setNodePerTask (int npt)
 
void setBranchDecomposition (bool useBD)
 
void setNormalizedWasserstein (bool normalizedWasserstein)
 
void setKeepSubtree (bool keepSubtree)
 
void setNonMatchingWeight (double weight)
 
void setBarycenterMergeTree (bool imt)
 
void setDistanceSquaredRoot (bool distanceSquaredRoot)
 
void setUseMinMaxPair (bool useMinMaxPair)
 
void setDeleteMultiPersPairs (bool deleteMultiPersPairsT)
 
void setCleanTree (bool clean)
 
void setIsPersistenceDiagram (bool isPD)
 
std::vector< std::vector< int > > getTreesNodeCorr ()
 
double mixDistancesMinMaxPairWeight (bool isFirstInput)
 
double mixDistancesWeight (bool isFirstInput)
 
template<class dataType >
double mixDistances (dataType distance1, dataType distance2)
 
template<class dataType >
void mixDistancesMatrix (std::vector< std::vector< dataType > > &distanceMatrix, std::vector< std::vector< dataType > > &distanceMatrix2)
 
template<class dataType >
void mergeSaddle (ftm::FTMTree_MT *tree, double epsilon, std::vector< std::vector< ftm::idNode > > &treeNodeMerged, bool mergeByPersistence=false)
 
template<class dataType >
void persistenceMerging (ftm::FTMTree_MT *tree, double epsilon2, double epsilon3=100)
 
template<class dataType >
void keepMostImportantPairs (ftm::FTMTree_MT *tree, int n, bool useBD)
 
template<class dataType >
void persistenceThresholding (ftm::FTMTree_MT *tree, double persistenceThresholdT, std::vector< ftm::idNode > &deletedNodes)
 
template<class dataType >
void persistenceThresholding (ftm::FTMTree_MT *tree, std::vector< ftm::idNode > &deletedNodes)
 
template<class dataType >
void persistenceThresholding (ftm::FTMTree_MT *tree, double persistenceThresholdT)
 
template<class dataType >
void persistenceThresholding (ftm::FTMTree_MT *tree)
 
template<class dataType >
void verifyOrigins (ftm::FTMTree_MT *tree)
 
template<class dataType >
void preprocessTree (ftm::FTMTree_MT *tree, bool deleteInconsistentNodes=true)
 
template<class dataType >
ftm::FTMTree_MTcomputeBranchDecomposition (ftm::FTMTree_MT *tree, std::vector< std::vector< ftm::idNode > > &treeNodeMerged)
 
template<class dataType >
void dontUseMinMaxPair (ftm::FTMTree_MT *tree)
 
void verifyPairsTree (ftm::FTMTree_MT *tree)
 
template<class dataType >
void deleteMultiPersPairs (ftm::FTMTree_MT *tree, bool useBD)
 
template<class dataType >
void preprocessingPipeline (ftm::MergeTree< dataType > &mTree, double epsilonTree, double epsilon2Tree, double epsilon3Tree, bool branchDecompositionT, bool useMinMaxPairT, bool cleanTreeT, double persistenceThreshold, std::vector< int > &nodeCorr, bool deleteInconsistentNodes=true)
 
template<class dataType >
void preprocessingPipeline (ftm::MergeTree< dataType > &mTree, double epsilonTree, double epsilon2Tree, double epsilon3Tree, bool branchDecompositionT, bool useMinMaxPairT, bool cleanTreeT, std::vector< int > &nodeCorr, bool deleteInconsistentNodes=true)
 
void reverseNodeCorr (ftm::FTMTree_MT *tree, std::vector< int > &nodeCorr)
 
template<class dataType >
void mtFlattening (ftm::MergeTree< dataType > &mt)
 
template<class dataType >
void mtsFlattening (std::vector< ftm::MergeTree< dataType > > &mts)
 
double getSizeLimitMetric (std::vector< ftm::FTMTree_MT * > &trees)
 
template<class dataType >
void copyMinMaxPair (ftm::MergeTree< dataType > &mTree1, ftm::MergeTree< dataType > &mTree2, bool setOrigins=false)
 
template<class dataType >
std::tuple< int, dataType > fixMergedRootOrigin (ftm::FTMTree_MT *tree)
 
template<class dataType >
void branchDecompositionToTree (ftm::FTMTree_MT *tree)
 
template<class dataType >
void putBackMergedNodes (ftm::FTMTree_MT *tree)
 
template<class dataType >
void postprocessingPipeline (ftm::FTMTree_MT *tree)
 
template<class dataType >
void convertBranchDecompositionMatching (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &outputMatching)
 
template<class dataType >
void convertBranchDecompositionMatching (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode > > &outputMatching)
 
template<class dataType >
void identifyRealMatching (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode > > &outputMatching, std::vector< std::tuple< ftm::idNode, ftm::idNode, bool > > &realMatching)
 
template<class dataType >
dataType computeDistance (dataType x1, dataType x2, dataType y1, dataType y2, double power=2)
 
template<class dataType >
dataType deleteCost (ftm::FTMTree_MT *tree, ftm::idNode nodeId)
 
template<class dataType >
dataType insertCost (ftm::FTMTree_MT *tree, ftm::idNode nodeId)
 
template<class dataType >
dataType relabelCostOnly (ftm::FTMTree_MT *tree1, ftm::idNode nodeId1, ftm::FTMTree_MT *tree2, ftm::idNode nodeId2)
 
template<class dataType >
dataType relabelCost (ftm::FTMTree_MT *tree1, ftm::idNode nodeId1, ftm::FTMTree_MT *tree2, ftm::idNode nodeId2)
 
void getParamNames (std::vector< std::string > &paramNames)
 
double getParamValueFromName (std::string &paramName)
 
void setParamValueFromName (std::string &paramName, double value)
 
void getTreesStats (std::vector< ftm::FTMTree_MT * > &trees, std::array< double, 3 > &stats)
 
void printTreesStats (std::vector< ftm::FTMTree_MT * > &trees)
 
template<class dataType >
void printTreesStats (std::vector< ftm::MergeTree< dataType > > &trees)
 
template<class dataType >
void printTableVector (std::vector< std::vector< dataType > > &table)
 
template<class dataType >
void printTable (dataType *table, int nRows, int nCols)
 
void printMatching (std::vector< MatchingType > &matchings)
 
void printMatching (std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &matchings)
 
void printMatching (std::vector< std::tuple< ftm::idNode, ftm::idNode > > &matchings)
 
template<class dataType >
void printPairs (std::vector< std::tuple< SimplexId, SimplexId, dataType > > &treePairs)
 
template<class dataType >
void printOutputMatching (std::vector< std::tuple< ftm::idNode, ftm::idNode > > &outputMatching, ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, bool computeCosts=true)
 

Protected Attributes

double tol_ = 0.0
 
bool addNodes_ = true
 
bool deterministic_ = true
 
bool isCalled_ = false
 
bool progressiveBarycenter_ = false
 
double progressiveSpeedDivisor_ = 4.0
 
double alpha_ = 0.5
 
unsigned int barycenterMaximumNumberOfPairs_ = 0
 
double barycenterSizeLimitPercent_ = 0.0
 
double allDistanceTime_ = 0
 
double addDeletedNodesTime_ = 0
 
bool preprocess_ = true
 
bool postprocess_ = true
 
std::vector< double > finalDistances_
 
- Protected Attributes inherited from ttk::Debug
int debugLevel_
 
std::string debugMsgPrefix_
 
std::string debugMsgNamePrefix_
 
- Protected Attributes inherited from ttk::BaseClass
bool lastObject_
 
int threadNumber_
 
Wrapperwrapper_
 
- Protected Attributes inherited from ttk::MergeTreeBase
int assignmentSolverID_ = 0
 
bool epsilon1UseFarthestSaddle_ = false
 
double epsilonTree1_ = 0
 
double epsilonTree2_ = 0
 
double epsilon2Tree1_ = 100
 
double epsilon2Tree2_ = 100
 
double epsilon3Tree1_ = 100
 
double epsilon3Tree2_ = 100
 
double persistenceThreshold_ = 0
 
bool barycenterMergeTree_ = false
 
bool useMinMaxPair_ = true
 
bool deleteMultiPersPairs_ = false
 
bool branchDecomposition_ = true
 
int wassersteinPower_ = 2
 
bool normalizedWasserstein_ = true
 
bool keepSubtree_ = false
 
double nonMatchingWeight_ = 1.0
 
bool distanceSquaredRoot_ = true
 
bool useFullMerge_ = false
 
bool isPersistenceDiagram_ = false
 
bool convertToDiagram_ = false
 
double mixtureCoefficient_ = 0.5
 
bool useDoubleInput_ = false
 
bool parallelize_ = true
 
int nodePerTask_ = 32
 
bool cleanTree_ = true
 
std::vector< std::vector< int > > treesNodeCorr_
 

Additional Inherited Members

- Protected Member Functions inherited from ttk::Debug
int printMsgInternal (const std::string &msg, const std::string &right, const std::string &filler, const debug::Priority &priority=debug::Priority::INFO, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cout) const
 
int printMsgInternal (const std::string &msg, const debug::Priority &priority, const debug::LineMode &lineMode, std::ostream &stream=std::cout) const
 
int welcomeMsg (std::ostream &stream)
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

The MergeTreeBarycenter class that computes the barycenter of an ensemble of merge trees.

Definition at line 32 of file MergeTreeBarycenter.h.

Constructor & Destructor Documentation

◆ MergeTreeBarycenter()

ttk::MergeTreeBarycenter::MergeTreeBarycenter ( )
inline

Definition at line 56 of file MergeTreeBarycenter.h.

◆ ~MergeTreeBarycenter()

ttk::MergeTreeBarycenter::~MergeTreeBarycenter ( )
overridedefault

Member Function Documentation

◆ addNodes()

template<class dataType >
void ttk::MergeTreeBarycenter::addNodes ( ftm::MergeTree< dataType > &  mTree1,
int  noTrees,
std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &  nodesToProcess,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode > > > &  nodesProcessed 
)
inline

Definition at line 321 of file MergeTreeBarycenter.h.

◆ addScaledDeletedNodesCost()

template<class dataType >
void ttk::MergeTreeBarycenter::addScaledDeletedNodesCost ( std::vector< ftm::FTMTree_MT * > &  oriTrees,
std::vector< std::vector< ftm::idNode > > &  deletedNodes,
std::vector< dataType > &  distances 
)
inline

Definition at line 895 of file MergeTreeBarycenter.h.

◆ assignment()

template<class dataType >
void ttk::MergeTreeBarycenter::assignment ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings,
std::vector< dataType > &  distances,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 773 of file MergeTreeBarycenter.h.

◆ assignmentPara()

template<class dataType >
void ttk::MergeTreeBarycenter::assignmentPara ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings,
std::vector< dataType > &  distances,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 790 of file MergeTreeBarycenter.h.

◆ assignmentTask()

template<class dataType >
void ttk::MergeTreeBarycenter::assignmentTask ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings,
std::vector< dataType > &  distances,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 812 of file MergeTreeBarycenter.h.

◆ computeBarycenter()

template<class dataType >
void ttk::MergeTreeBarycenter::computeBarycenter ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< double > &  alphas,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  finalMatchings,
bool  finalAsgnDoubleInput = false,
bool  finalAsgnFirstInput = true 
)
inline

Definition at line 908 of file MergeTreeBarycenter.h.

◆ computeOneDistance() [1/3]

template<class dataType >
void ttk::MergeTreeBarycenter::computeOneDistance ( ftm::FTMTree_MT tree,
ftm::FTMTree_MT baryTree,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  matching,
dataType &  distance,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 707 of file MergeTreeBarycenter.h.

◆ computeOneDistance() [2/3]

template<class dataType >
void ttk::MergeTreeBarycenter::computeOneDistance ( ftm::FTMTree_MT tree,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  matching,
dataType &  distance,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 748 of file MergeTreeBarycenter.h.

◆ computeOneDistance() [3/3]

template<class dataType >
void ttk::MergeTreeBarycenter::computeOneDistance ( ftm::MergeTree< dataType > &  baryMergeTree,
ftm::MergeTree< dataType > &  baryMergeTree2,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  matching,
dataType &  distance,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 760 of file MergeTreeBarycenter.h.

◆ execute() [1/2]

template<class dataType >
void ttk::MergeTreeBarycenter::execute ( std::vector< ftm::MergeTree< dataType > > &  trees,
std::vector< double > &  alphas,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  finalMatchings,
ftm::MergeTree< dataType > &  baryMergeTree,
bool  finalAsgnDoubleInput = false,
bool  finalAsgnFirstInput = true 
)
inline

Definition at line 1041 of file MergeTreeBarycenter.h.

◆ execute() [2/2]

template<class dataType >
void ttk::MergeTreeBarycenter::execute ( std::vector< ftm::MergeTree< dataType > > &  trees,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  finalMatchings,
ftm::MergeTree< dataType > &  baryMergeTree,
bool  finalAsgnDoubleInput = false,
bool  finalAsgnFirstInput = true 
)
inline

Definition at line 1086 of file MergeTreeBarycenter.h.

◆ fixMergedRootOriginBarycenter()

template<class dataType >
void ttk::MergeTreeBarycenter::fixMergedRootOriginBarycenter ( ftm::MergeTree< dataType > &  barycenter)
inline

Definition at line 1159 of file MergeTreeBarycenter.h.

◆ getAddDeletedNodesTime()

double ttk::MergeTreeBarycenter::getAddDeletedNodesTime ( )
inline

Definition at line 94 of file MergeTreeBarycenter.h.

◆ getAllDistanceTime()

double ttk::MergeTreeBarycenter::getAllDistanceTime ( )
inline

Definition at line 90 of file MergeTreeBarycenter.h.

◆ getBestInitTreeIndex() [1/3]

template<class dataType >
int ttk::MergeTreeBarycenter::getBestInitTreeIndex ( std::vector< ftm::FTMTree_MT * > &  trees,
bool  distMinimizer = true 
)
inline

Definition at line 264 of file MergeTreeBarycenter.h.

◆ getBestInitTreeIndex() [2/3]

template<class dataType >
int ttk::MergeTreeBarycenter::getBestInitTreeIndex ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::FTMTree_MT * > &  trees2,
double  sizeLimitPercent,
bool  distMinimizer = true 
)
inline

Definition at line 254 of file MergeTreeBarycenter.h.

◆ getBestInitTreeIndex() [3/3]

template<class dataType >
int ttk::MergeTreeBarycenter::getBestInitTreeIndex ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::FTMTree_MT * > &  trees2,
unsigned int  barycenterMaximumNumberOfPairs,
double  sizeLimitPercent,
bool  distMinimizer = true 
)
inline

Definition at line 210 of file MergeTreeBarycenter.h.

◆ getDistanceMatrix() [1/2]

template<class dataType >
void ttk::MergeTreeBarycenter::getDistanceMatrix ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< std::vector< double > > &  distanceMatrix,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Implementation of the algorithm.

Definition at line 129 of file MergeTreeBarycenter.h.

◆ getDistanceMatrix() [2/2]

template<class dataType >
void ttk::MergeTreeBarycenter::getDistanceMatrix ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< std::vector< double > > &  distanceMatrix,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 152 of file MergeTreeBarycenter.h.

◆ getFinalDistances()

std::vector< double > ttk::MergeTreeBarycenter::getFinalDistances ( )
inline

Definition at line 118 of file MergeTreeBarycenter.h.

◆ getNodesAndScalarsToAdd()

template<class dataType >
ftm::idNode ttk::MergeTreeBarycenter::getNodesAndScalarsToAdd ( ftm::MergeTree< dataType > &  ttkNotUsedmTree1,
ftm::idNode  nodeId1,
ftm::FTMTree_MT tree2,
ftm::idNode  nodeId2,
std::vector< dataType > &  newScalarsVector,
std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &  nodesToProcess,
ftm::idNode  nodeCpt,
int  i 
)
inline

Definition at line 286 of file MergeTreeBarycenter.h.

◆ getParametrizedBirthDeath()

template<class dataType >
std::tuple< dataType, dataType > ttk::MergeTreeBarycenter::getParametrizedBirthDeath ( ftm::FTMTree_MT tree1,
ftm::idNode  nodeId1 
)
inline

Definition at line 505 of file MergeTreeBarycenter.h.

◆ getParametrizedDistanceMatrix()

template<class dataType >
void ttk::MergeTreeBarycenter::getParametrizedDistanceMatrix ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< std::vector< double > > &  distanceMatrix,
unsigned int  barycenterMaximumNumberOfPairs,
double  sizeLimitPercent,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 193 of file MergeTreeBarycenter.h.

◆ getSizeLimitedDistanceMatrix()

template<class dataType >
void ttk::MergeTreeBarycenter::getSizeLimitedDistanceMatrix ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< std::vector< double > > &  distanceMatrix,
unsigned int  barycenterMaximumNumberOfPairs,
double  sizeLimitPercent,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 176 of file MergeTreeBarycenter.h.

◆ getSizeLimitedTrees()

template<class dataType >
void ttk::MergeTreeBarycenter::getSizeLimitedTrees ( std::vector< ftm::FTMTree_MT * > &  trees,
unsigned int  barycenterMaximumNumberOfPairs,
double  sizeLimitPercent,
std::vector< ftm::MergeTree< dataType > > &  mTreesLimited 
)
inline

Definition at line 161 of file MergeTreeBarycenter.h.

◆ initBarycenterTree()

template<class dataType >
void ttk::MergeTreeBarycenter::initBarycenterTree ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryTree,
bool  distMinimizer = true 
)
inline

Definition at line 273 of file MergeTreeBarycenter.h.

◆ interpolation()

template<class dataType >
std::tuple< dataType, dataType > ttk::MergeTreeBarycenter::interpolation ( ftm::MergeTree< dataType > &  baryMergeTree,
ftm::idNode  nodeId,
std::vector< dataType > &  newScalarsVector,
std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::idNode > &  nodes,
std::vector< double > &  alphas 
)
inline

Definition at line 518 of file MergeTreeBarycenter.h.

◆ interpolationAdded()

template<class dataType >
std::tuple< dataType, dataType > ttk::MergeTreeBarycenter::interpolationAdded ( ftm::FTMTree_MT tree,
ftm::idNode  nodeId,
double  alpha,
ftm::MergeTree< dataType > &  baryMergeTree,
ftm::idNode  nodeB,
std::vector< dataType > &  newScalarsVector 
)
inline

Definition at line 578 of file MergeTreeBarycenter.h.

◆ limitSizeBarycenter() [1/3]

template<class dataType >
void ttk::MergeTreeBarycenter::limitSizeBarycenter ( ftm::MergeTree< dataType > &  bary,
std::vector< ftm::FTMTree_MT * > &  trees,
bool  useBD = true 
)
inline

Definition at line 1148 of file MergeTreeBarycenter.h.

◆ limitSizeBarycenter() [2/3]

template<class dataType >
void ttk::MergeTreeBarycenter::limitSizeBarycenter ( ftm::MergeTree< dataType > &  bary,
std::vector< ftm::FTMTree_MT * > &  trees,
double  percent,
bool  useBD = true 
)
inline

Definition at line 1140 of file MergeTreeBarycenter.h.

◆ limitSizeBarycenter() [3/3]

template<class dataType >
void ttk::MergeTreeBarycenter::limitSizeBarycenter ( ftm::MergeTree< dataType > &  bary,
std::vector< ftm::FTMTree_MT * > &  trees,
unsigned int  barycenterMaximumNumberOfPairs,
double  percent,
bool  useBD = true 
)
inline

Definition at line 1128 of file MergeTreeBarycenter.h.

◆ limitSizePercent()

template<class dataType >
void ttk::MergeTreeBarycenter::limitSizePercent ( ftm::MergeTree< dataType > &  bary,
std::vector< ftm::FTMTree_MT * > &  trees,
double  percent,
bool  useBD 
)
inline

Definition at line 1110 of file MergeTreeBarycenter.h.

◆ persistenceScaling()

template<class dataType >
unsigned int ttk::MergeTreeBarycenter::persistenceScaling ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  mergeTrees,
std::vector< ftm::FTMTree_MT * > &  oriTrees,
int  iterationNumber,
std::vector< std::vector< ftm::idNode > > &  deletedNodes 
)
inline

Definition at line 838 of file MergeTreeBarycenter.h.

◆ printBaryStats()

void ttk::MergeTreeBarycenter::printBaryStats ( ftm::FTMTree_MT baryTree,
const debug::Priority priority = debug::Priority::INFO 
)
inline

Definition at line 1186 of file MergeTreeBarycenter.h.

◆ setAddNodes()

void ttk::MergeTreeBarycenter::setAddNodes ( bool  addNodesT)
inline

Definition at line 70 of file MergeTreeBarycenter.h.

◆ setAlpha()

void ttk::MergeTreeBarycenter::setAlpha ( double  alpha)
inline

Definition at line 98 of file MergeTreeBarycenter.h.

◆ setBarycenterMaximumNumberOfPairs()

void ttk::MergeTreeBarycenter::setBarycenterMaximumNumberOfPairs ( unsigned int  maxi)
inline

Definition at line 102 of file MergeTreeBarycenter.h.

◆ setBarycenterSizeLimitPercent()

void ttk::MergeTreeBarycenter::setBarycenterSizeLimitPercent ( double  percent)
inline

Definition at line 106 of file MergeTreeBarycenter.h.

◆ setDeterministic()

void ttk::MergeTreeBarycenter::setDeterministic ( bool  deterministicT)
inline

Definition at line 74 of file MergeTreeBarycenter.h.

◆ setIsCalled()

void ttk::MergeTreeBarycenter::setIsCalled ( bool  ic)
inline

Definition at line 86 of file MergeTreeBarycenter.h.

◆ setPostprocess()

void ttk::MergeTreeBarycenter::setPostprocess ( bool  postproc)
inline

Definition at line 114 of file MergeTreeBarycenter.h.

◆ setPreprocess()

void ttk::MergeTreeBarycenter::setPreprocess ( bool  preproc)
inline

Definition at line 110 of file MergeTreeBarycenter.h.

◆ setProgressiveBarycenter()

void ttk::MergeTreeBarycenter::setProgressiveBarycenter ( bool  progressive)
inline

Definition at line 78 of file MergeTreeBarycenter.h.

◆ setProgressiveSpeedDivisor()

void ttk::MergeTreeBarycenter::setProgressiveSpeedDivisor ( double  progSpeed)
inline

Definition at line 82 of file MergeTreeBarycenter.h.

◆ setTol()

void ttk::MergeTreeBarycenter::setTol ( double  tolT)
inline

Definition at line 66 of file MergeTreeBarycenter.h.

◆ updateBarycenterTree()

template<class dataType >
void ttk::MergeTreeBarycenter::updateBarycenterTree ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< double > &  alphas,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings 
)
inline

Definition at line 691 of file MergeTreeBarycenter.h.

◆ updateBarycenterTreeScalars()

template<class dataType >
void ttk::MergeTreeBarycenter::updateBarycenterTreeScalars ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< double > &  alphas,
unsigned int  indexAddedNodes,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings 
)
inline

Definition at line 611 of file MergeTreeBarycenter.h.

◆ updateBarycenterTreeStructure()

template<class dataType >
void ttk::MergeTreeBarycenter::updateBarycenterTreeStructure ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  matchings 
)
inline

Definition at line 374 of file MergeTreeBarycenter.h.

◆ updateNodesAndScalars()

template<class dataType >
void ttk::MergeTreeBarycenter::updateNodesAndScalars ( ftm::MergeTree< dataType > &  mTree1,
int  noTrees,
std::vector< std::tuple< ftm::idNode, ftm::idNode, int > > &  nodesToProcess,
std::vector< dataType > &  newScalarsVector,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode > > > &  nodesProcessed 
)
inline

Definition at line 348 of file MergeTreeBarycenter.h.

◆ verifyBarycenterTwoTrees()

template<class dataType >
void ttk::MergeTreeBarycenter::verifyBarycenterTwoTrees ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  baryMergeTree,
std::vector< std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > > &  finalMatchings,
std::vector< dataType >  distances 
)
inline

Definition at line 1200 of file MergeTreeBarycenter.h.

Member Data Documentation

◆ addDeletedNodesTime_

double ttk::MergeTreeBarycenter::addDeletedNodesTime_ = 0
protected

Definition at line 47 of file MergeTreeBarycenter.h.

◆ addNodes_

bool ttk::MergeTreeBarycenter::addNodes_ = true
protected

Definition at line 36 of file MergeTreeBarycenter.h.

◆ allDistanceTime_

double ttk::MergeTreeBarycenter::allDistanceTime_ = 0
protected

Definition at line 45 of file MergeTreeBarycenter.h.

◆ alpha_

double ttk::MergeTreeBarycenter::alpha_ = 0.5
protected

Definition at line 41 of file MergeTreeBarycenter.h.

◆ barycenterMaximumNumberOfPairs_

unsigned int ttk::MergeTreeBarycenter::barycenterMaximumNumberOfPairs_ = 0
protected

Definition at line 42 of file MergeTreeBarycenter.h.

◆ barycenterSizeLimitPercent_

double ttk::MergeTreeBarycenter::barycenterSizeLimitPercent_ = 0.0
protected

Definition at line 43 of file MergeTreeBarycenter.h.

◆ deterministic_

bool ttk::MergeTreeBarycenter::deterministic_ = true
protected

Definition at line 37 of file MergeTreeBarycenter.h.

◆ finalDistances_

std::vector<double> ttk::MergeTreeBarycenter::finalDistances_
protected

Definition at line 53 of file MergeTreeBarycenter.h.

◆ isCalled_

bool ttk::MergeTreeBarycenter::isCalled_ = false
protected

Definition at line 38 of file MergeTreeBarycenter.h.

◆ postprocess_

bool ttk::MergeTreeBarycenter::postprocess_ = true
protected

Definition at line 50 of file MergeTreeBarycenter.h.

◆ preprocess_

bool ttk::MergeTreeBarycenter::preprocess_ = true
protected

Definition at line 49 of file MergeTreeBarycenter.h.

◆ progressiveBarycenter_

bool ttk::MergeTreeBarycenter::progressiveBarycenter_ = false
protected

Definition at line 39 of file MergeTreeBarycenter.h.

◆ progressiveSpeedDivisor_

double ttk::MergeTreeBarycenter::progressiveSpeedDivisor_ = 4.0
protected

Definition at line 40 of file MergeTreeBarycenter.h.

◆ tol_

double ttk::MergeTreeBarycenter::tol_ = 0.0
protected

Definition at line 35 of file MergeTreeBarycenter.h.


The documentation for this class was generated from the following file: