TTK
Loading...
Searching...
No Matches
Public Member Functions | List of all members
ttk::MergeTreeClustering< dataType2 > Class Template Reference

#include <MergeTreeClustering.h>

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

Public Member Functions

 MergeTreeClustering ()
 
 ~MergeTreeClustering () override=default
 
void setNoCentroids (unsigned int noCentroidsT)
 
void setMixtureCoefficient (double coef)
 
std::vector< std::vector< int > > getTrees2NodeCorr ()
 
template<class dataType >
void initCentroids (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< std::vector< ftm::MergeTree< dataType > > > &allCentroids)
 
template<class dataType >
void initNewCentroid (std::vector< ftm::FTMTree_MT * > &trees, ftm::MergeTree< dataType > &centroid, int noNewCentroid)
 
template<class dataType >
void initAcceleratedKMeansVectors (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::FTMTree_MT * > &ttkNotUsed(trees2))
 
template<class dataType >
void initAcceleratedKMeans (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void copyCentroids (std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::MergeTree< dataType > > &oldCentroids)
 
template<class dataType >
void assignmentCentroidsAccelerated (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< std::tuple< int, int > > &assignmentC, std::vector< dataType > &bestDistanceT, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void assignmentCentroids (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< std::tuple< int, int > > &assignmentC, std::vector< dataType > &bestDistanceT, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void finalAssignmentCentroids (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, matchingVectorType &matchingsC, std::vector< std::tuple< int, int > > &assignmentC, std::vector< dataType > &bestDistanceT, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2, matchingVectorType &matchingsC2)
 
template<class dataType >
void assignmentCentroidsNaive (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< std::tuple< int, int > > &assignmentC, std::vector< dataType > &bestDistanceT, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void getCentroidsDistanceMatrix (std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< std::vector< double > > &distanceMatrix, bool useDoubleInput=false, bool isFirstInput=true)
 
void matchingCorrespondence (treesMatchingVector &matchingT, std::vector< int > &nodeCorr, std::vector< int > &assignedTreesIndex)
 
bool samePreviousAssignment (int clusterId)
 
template<class dataType >
bool updateCentroids (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< double > &alphas, std::vector< std::tuple< int, int > > &assignmentC)
 
template<class dataType >
void computeOneBarycenter (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)
 
template<class dataType >
void computeCentroids (std::vector< ftm::FTMTree_MT * > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, matchingVectorType &outputMatching, std::vector< double > &alphas, std::vector< int > &clusteringAssignment, std::vector< ftm::FTMTree_MT * > &trees2, std::vector< ftm::MergeTree< dataType > > &centroids2, matchingVectorType &outputMatching2)
 
template<class dataType >
void execute (std::vector< ftm::MergeTree< dataType > > &trees, matchingVectorType &outputMatching, std::vector< double > &alphas, std::vector< int > &clusteringAssignment, std::vector< ftm::MergeTree< dataType > > &trees2, matchingVectorType &outputMatching2, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void execute (std::vector< ftm::MergeTree< dataType > > &trees, matchingVectorType &outputMatching, std::vector< int > &clusteringAssignment, std::vector< ftm::MergeTree< dataType > > &trees2, matchingVectorType &outputMatching2, std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void execute (std::vector< ftm::MergeTree< dataType > > &trees, matchingVectorType &outputMatching, std::vector< int > &clusteringAssignment, std::vector< ftm::MergeTree< dataType > > &centroids)
 
template<class dataType >
void preprocessingClustering (std::vector< ftm::MergeTree< dataType > > &trees, std::vector< std::vector< int > > &nodeCorr, bool useMinMaxPairT=true)
 
template<class dataType >
void fixMergedRootOriginClustering (std::vector< ftm::MergeTree< dataType > > &centroids)
 
template<class dataType >
void putBackMinMaxPair (std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
template<class dataType >
void postprocessingClustering (std::vector< ftm::MergeTree< dataType > > &trees, std::vector< ftm::MergeTree< dataType > > &centroids, matchingVectorType &outputMatching, std::vector< int > &clusteringAssignment)
 
template<class dataType >
void printCentroidsStats (std::vector< ftm::MergeTree< dataType > > &centroids, std::vector< ftm::MergeTree< dataType > > &centroids2)
 
- 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::MergeTreeBarycenter
 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::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)
 

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)
 
- 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::MergeTreeBarycenter
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::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_
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

template<class dataType2>
class ttk::MergeTreeClustering< dataType2 >

The MergeTreeClustering class that computes a clustering of an ensemble of merge trees in k clusters

Definition at line 50 of file MergeTreeClustering.h.

Constructor & Destructor Documentation

◆ MergeTreeClustering()

template<class dataType2 >
ttk::MergeTreeClustering< dataType2 >::MergeTreeClustering ( )
inline

Definition at line 74 of file MergeTreeClustering.h.

◆ ~MergeTreeClustering()

template<class dataType2 >
ttk::MergeTreeClustering< dataType2 >::~MergeTreeClustering ( )
overridedefault

Member Function Documentation

◆ assignmentCentroids()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::assignmentCentroids ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< std::tuple< int, int > > &  assignmentC,
std::vector< dataType > &  bestDistanceT,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 401 of file MergeTreeClustering.h.

◆ assignmentCentroidsAccelerated()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::assignmentCentroidsAccelerated ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< std::tuple< int, int > > &  assignmentC,
std::vector< dataType > &  bestDistanceT,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 261 of file MergeTreeClustering.h.

◆ assignmentCentroidsNaive()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::assignmentCentroidsNaive ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< std::tuple< int, int > > &  assignmentC,
std::vector< dataType > &  bestDistanceT,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 461 of file MergeTreeClustering.h.

◆ computeCentroids()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::computeCentroids ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
matchingVectorType outputMatching,
std::vector< double > &  alphas,
std::vector< int > &  clusteringAssignment,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2,
matchingVectorType outputMatching2 
)
inline

Definition at line 646 of file MergeTreeClustering.h.

◆ computeOneBarycenter()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::computeOneBarycenter ( 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 
)
inline

Definition at line 614 of file MergeTreeClustering.h.

◆ copyCentroids()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::copyCentroids ( std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::MergeTree< dataType > > &  oldCentroids 
)
inline

Definition at line 250 of file MergeTreeClustering.h.

◆ execute() [1/3]

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::execute ( std::vector< ftm::MergeTree< dataType > > &  trees,
matchingVectorType outputMatching,
std::vector< double > &  alphas,
std::vector< int > &  clusteringAssignment,
std::vector< ftm::MergeTree< dataType > > &  trees2,
matchingVectorType outputMatching2,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 761 of file MergeTreeClustering.h.

◆ execute() [2/3]

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::execute ( std::vector< ftm::MergeTree< dataType > > &  trees,
matchingVectorType outputMatching,
std::vector< int > &  clusteringAssignment,
std::vector< ftm::MergeTree< dataType > > &  centroids 
)
inline

Definition at line 836 of file MergeTreeClustering.h.

◆ execute() [3/3]

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::execute ( std::vector< ftm::MergeTree< dataType > > &  trees,
matchingVectorType outputMatching,
std::vector< int > &  clusteringAssignment,
std::vector< ftm::MergeTree< dataType > > &  trees2,
matchingVectorType outputMatching2,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 817 of file MergeTreeClustering.h.

◆ finalAssignmentCentroids()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::finalAssignmentCentroids ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
matchingVectorType matchingsC,
std::vector< std::tuple< int, int > > &  assignmentC,
std::vector< dataType > &  bestDistanceT,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2,
matchingVectorType matchingsC2 
)
inline

Definition at line 413 of file MergeTreeClustering.h.

◆ fixMergedRootOriginClustering()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::fixMergedRootOriginClustering ( std::vector< ftm::MergeTree< dataType > > &  centroids)
inline

Definition at line 867 of file MergeTreeClustering.h.

◆ getCentroidsDistanceMatrix()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::getCentroidsDistanceMatrix ( std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< std::vector< double > > &  distanceMatrix,
bool  useDoubleInput = false,
bool  isFirstInput = true 
)
inline

Definition at line 500 of file MergeTreeClustering.h.

◆ getTrees2NodeCorr()

template<class dataType2 >
std::vector< std::vector< int > > ttk::MergeTreeClustering< dataType2 >::getTrees2NodeCorr ( )
inline

Definition at line 89 of file MergeTreeClustering.h.

◆ initAcceleratedKMeans()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::initAcceleratedKMeans ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 231 of file MergeTreeClustering.h.

◆ initAcceleratedKMeansVectors()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::initAcceleratedKMeansVectors ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::FTMTree_MT * > &  ttkNotUsedtrees2 
)
inline

Definition at line 210 of file MergeTreeClustering.h.

◆ initCentroids()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::initCentroids ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::FTMTree_MT * > &  trees2,
std::vector< std::vector< ftm::MergeTree< dataType > > > &  allCentroids 
)
inline

Implementation of the algorithm.

Definition at line 102 of file MergeTreeClustering.h.

◆ initNewCentroid()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::initNewCentroid ( std::vector< ftm::FTMTree_MT * > &  trees,
ftm::MergeTree< dataType > &  centroid,
int  noNewCentroid 
)
inline

Definition at line 195 of file MergeTreeClustering.h.

◆ matchingCorrespondence()

template<class dataType2 >
void ttk::MergeTreeClustering< dataType2 >::matchingCorrespondence ( treesMatchingVector matchingT,
std::vector< int > &  nodeCorr,
std::vector< int > &  assignedTreesIndex 
)
inline

Definition at line 513 of file MergeTreeClustering.h.

◆ postprocessingClustering()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::postprocessingClustering ( std::vector< ftm::MergeTree< dataType > > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
matchingVectorType outputMatching,
std::vector< int > &  clusteringAssignment 
)
inline

Definition at line 882 of file MergeTreeClustering.h.

◆ preprocessingClustering()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::preprocessingClustering ( std::vector< ftm::MergeTree< dataType > > &  trees,
std::vector< std::vector< int > > &  nodeCorr,
bool  useMinMaxPairT = true 
)
inline

Definition at line 850 of file MergeTreeClustering.h.

◆ printCentroidsStats()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::printCentroidsStats ( std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 902 of file MergeTreeClustering.h.

◆ putBackMinMaxPair()

template<class dataType2 >
template<class dataType >
void ttk::MergeTreeClustering< dataType2 >::putBackMinMaxPair ( std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< ftm::MergeTree< dataType > > &  centroids2 
)
inline

Definition at line 874 of file MergeTreeClustering.h.

◆ samePreviousAssignment()

template<class dataType2 >
bool ttk::MergeTreeClustering< dataType2 >::samePreviousAssignment ( int  clusterId)
inline

Definition at line 528 of file MergeTreeClustering.h.

◆ setMixtureCoefficient()

template<class dataType2 >
void ttk::MergeTreeClustering< dataType2 >::setMixtureCoefficient ( double  coef)
inline

Definition at line 85 of file MergeTreeClustering.h.

◆ setNoCentroids()

template<class dataType2 >
void ttk::MergeTreeClustering< dataType2 >::setNoCentroids ( unsigned int  noCentroidsT)
inline

Definition at line 81 of file MergeTreeClustering.h.

◆ updateCentroids()

template<class dataType2 >
template<class dataType >
bool ttk::MergeTreeClustering< dataType2 >::updateCentroids ( std::vector< ftm::FTMTree_MT * > &  trees,
std::vector< ftm::MergeTree< dataType > > &  centroids,
std::vector< double > &  alphas,
std::vector< std::tuple< int, int > > &  assignmentC 
)
inline

Definition at line 537 of file MergeTreeClustering.h.


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