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

#include <MergeTreeDistance.h>

Inheritance diagram for ttk::MergeTreeDistance:
ttk::Debug ttk::MergeTreeBase ttk::BaseClass ttk::Debug ttk::BaseClass

Public Member Functions

 MergeTreeDistance ()
 
 ~MergeTreeDistance () override=default
 
void setIsCalled (bool ic)
 
void setPreprocess (bool preproc)
 
void setPostprocess (bool postproc)
 
void setTesting (bool test)
 
void setSaveTree (bool save)
 
void setAuctionEpsilon (double aucEpsilon)
 
void setAuctionEpsilonDiviser (double aucEpsilonDiviser)
 
void setAuctionNoRounds (double aucNoRounds)
 
void setOnlyEmptyTreeDistance (double only)
 
void setMinMaxPairWeight (double weight)
 
template<class dataType >
void runAssignmentProblemSolver (std::vector< std::vector< dataType > > &costMatrix, std::vector< MatchingType > &matchings)
 
template<class dataType >
void createCostMatrix (std::vector< std::vector< dataType > > &treeTable, std::vector< ftm::idNode > &children1, std::vector< ftm::idNode > &children2, std::vector< std::vector< dataType > > &costMatrix)
 
template<class dataType >
dataType postprocessAssignment (std::vector< MatchingType > &matchings, std::vector< ftm::idNode > &children1, std::vector< ftm::idNode > &children2, std::vector< std::tuple< int, int > > &forestAssignment)
 
template<class dataType >
dataType forestAssignmentProblem (ftm::FTMTree_MT *ttkNotUsed(tree1), ftm::FTMTree_MT *ttkNotUsed(tree2), std::vector< std::vector< dataType > > &treeTable, std::vector< ftm::idNode > &children1, std::vector< ftm::idNode > &children2, std::vector< std::tuple< int, int > > &forestAssignment)
 
template<class dataType >
void computeForestsDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, int i, int j, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, std::vector< ftm::idNode > &children1, std::vector< ftm::idNode > &children2)
 
template<class dataType >
void computeForestToEmptyDistance (ftm::FTMTree_MT *tree1, ftm::idNode nodeI, int i, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable)
 
template<class dataType >
void computeSubtreeToEmptyDistance (ftm::FTMTree_MT *tree1, ftm::idNode nodeI, int i, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable)
 
template<class dataType >
void computeEmptyToForestDistance (ftm::FTMTree_MT *tree2, ftm::idNode nodeJ, int j, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable)
 
template<class dataType >
void computeEmptyToSubtreeDistance (ftm::FTMTree_MT *tree2, ftm::idNode nodeJ, int j, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable)
 
template<class dataType >
std::tuple< dataType, ftm::idNodecomputeTerm1_2 (std::vector< ftm::idNode > &childrens, int ind, std::vector< std::vector< dataType > > &table, bool computeTerm1)
 
template<class dataType >
void computeSubtreesDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, int i, int j, ftm::idNode nodeI, ftm::idNode nodeJ, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< ftm::idNode > &children1, std::vector< ftm::idNode > &children2)
 
template<class dataType >
void computeMatching (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &outputMatching, int startR, int startC)
 
template<class dataType >
dataType computeDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &outputMatching)
 
template<class dataType >
dataType computeDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode > > &outputMatching)
 
template<class dataType >
dataType execute (ftm::MergeTree< dataType > &mTree1, ftm::MergeTree< dataType > &mTree2, std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &outputMatching)
 
template<class dataType >
dataType execute (ftm::MergeTree< dataType > &tree1, ftm::MergeTree< dataType > &tree2, std::vector< std::tuple< ftm::idNode, ftm::idNode > > &outputMatching)
 
template<class dataType >
void computeEditDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, int nRows, int nCols)
 
template<class dataType >
void classicEditDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, bool processTree1, bool computeEmptyTree, ftm::idNode nodeI, ftm::idNode nodeJ, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, int nRows, int nCols)
 
template<class dataType >
void parallelEditDistance (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, int ttkNotUsed(nRows), int ttkNotUsed(nCols))
 
template<class dataType >
void parallelTreeDistance_v2 (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, bool isTree1, int i, std::vector< ftm::idNode > &tree1Leaves, std::vector< int > &tree1NodeChildSize, std::vector< ftm::idNode > &tree2Leaves, std::vector< int > &tree2NodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, bool firstCall=false)
 
template<class dataType >
void parallelTreeDistancePara (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, bool isTree1, int i, std::vector< ftm::idNode > &tree1Leaves, std::vector< int > &tree1NodeChildSize, std::vector< ftm::idNode > &tree2Leaves, std::vector< int > &tree2NodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, bool firstCall, ftm::idNode nodeT, std::vector< int > &treeChildDone, std::vector< bool > &treeNodeDone, std::queue< ftm::idNode > &treeQueue)
 
template<class dataType >
void parallelTreeDistanceTask (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2, bool isTree1, int i, std::vector< ftm::idNode > &tree1Leaves, std::vector< int > &tree1NodeChildSize, std::vector< ftm::idNode > &tree2Leaves, std::vector< int > &tree2NodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, ftm::idNode nodeT, std::vector< int > &treeChildDone, std::vector< bool > &treeNodeDone, std::queue< ftm::idNode > &treeQueue)
 
template<class dataType >
void parallelEmptyTreeDistance_v2 (ftm::FTMTree_MT *tree, bool isTree1, std::vector< ftm::idNode > &treeLeaves, std::vector< int > &treeNodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable)
 
template<class dataType >
void parallelEmptyTreeDistancePara (ftm::FTMTree_MT *tree, bool isTree1, std::vector< ftm::idNode > &treeLeaves, std::vector< int > &treeNodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, ftm::idNode nodeT, std::vector< int > &treeChildDone, std::vector< bool > &treeNodeDone, std::queue< ftm::idNode > &treeQueue)
 
template<class dataType >
void parallelEmptyTreeDistanceTask (ftm::FTMTree_MT *tree, bool isTree1, std::vector< ftm::idNode > &ttkNotUsed(treeLeaves), std::vector< int > &treeNodeChildSize, std::vector< std::vector< dataType > > &treeTable, std::vector< std::vector< dataType > > &forestTable, std::vector< std::vector< std::tuple< int, int > > > &treeBackTable, std::vector< std::vector< std::vector< std::tuple< int, int > > > > &forestBackTable, ftm::idNode nodeT, std::vector< int > &treeChildDone, std::vector< bool > &treeNodeDone, std::queue< ftm::idNode > &treeQueue)
 
void printMapIntInt (std::map< int, int > theMap)
 
template<class dataType >
void verifyMergeTreeStructure (ftm::FTMTree_MT *tree)
 
template<class dataType >
void classicalPersistenceAssignmentProblem (ftm::FTMTree_MT *tree1, ftm::FTMTree_MT *tree2)
 
- 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)
 

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::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

The MergeTreeDistance class provides methods to compute distance between two merge trees.

Definition at line 35 of file MergeTreeDistance.h.

Constructor & Destructor Documentation

◆ MergeTreeDistance()

ttk::MergeTreeDistance::MergeTreeDistance ( )
inline

Definition at line 63 of file MergeTreeDistance.h.

◆ ~MergeTreeDistance()

ttk::MergeTreeDistance::~MergeTreeDistance ( )
overridedefault

Member Function Documentation

◆ classicalPersistenceAssignmentProblem()

template<class dataType >
void ttk::MergeTreeDistance::classicalPersistenceAssignmentProblem ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2 
)
inline

Definition at line 1207 of file MergeTreeDistance.h.

◆ classicEditDistance()

template<class dataType >
void ttk::MergeTreeDistance::classicEditDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
bool  processTree1,
bool  computeEmptyTree,
ftm::idNode  nodeI,
ftm::idNode  nodeJ,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
int  nRows,
int  nCols 
)
inline

Definition at line 696 of file MergeTreeDistance.h.

◆ computeDistance() [1/2]

template<class dataType >
dataType ttk::MergeTreeDistance::computeDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
std::vector< std::tuple< ftm::idNode, ftm::idNode > > &  outputMatching 
)
inline

Definition at line 546 of file MergeTreeDistance.h.

◆ computeDistance() [2/2]

template<class dataType >
dataType ttk::MergeTreeDistance::computeDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  outputMatching 
)
inline

Definition at line 482 of file MergeTreeDistance.h.

◆ computeEditDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeEditDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
int  nRows,
int  nCols 
)
inline

Definition at line 653 of file MergeTreeDistance.h.

◆ computeEmptyToForestDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeEmptyToForestDistance ( ftm::FTMTree_MT tree2,
ftm::idNode  nodeJ,
int  j,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable 
)
inline

Definition at line 325 of file MergeTreeDistance.h.

◆ computeEmptyToSubtreeDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeEmptyToSubtreeDistance ( ftm::FTMTree_MT tree2,
ftm::idNode  nodeJ,
int  j,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable 
)
inline

Definition at line 339 of file MergeTreeDistance.h.

◆ computeForestsDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeForestsDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
int  i,
int  j,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
std::vector< ftm::idNode > &  children1,
std::vector< ftm::idNode > &  children2 
)
inline

Definition at line 234 of file MergeTreeDistance.h.

◆ computeForestToEmptyDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeForestToEmptyDistance ( ftm::FTMTree_MT tree1,
ftm::idNode  nodeI,
int  i,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable 
)
inline

Definition at line 301 of file MergeTreeDistance.h.

◆ computeMatching()

template<class dataType >
void ttk::MergeTreeDistance::computeMatching ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  outputMatching,
int  startR,
int  startC 
)
inline

Definition at line 429 of file MergeTreeDistance.h.

◆ computeSubtreesDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeSubtreesDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
int  i,
int  j,
ftm::idNode  nodeI,
ftm::idNode  nodeJ,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< ftm::idNode > &  children1,
std::vector< ftm::idNode > &  children2 
)
inline

Definition at line 376 of file MergeTreeDistance.h.

◆ computeSubtreeToEmptyDistance()

template<class dataType >
void ttk::MergeTreeDistance::computeSubtreeToEmptyDistance ( ftm::FTMTree_MT tree1,
ftm::idNode  nodeI,
int  i,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable 
)
inline

Definition at line 315 of file MergeTreeDistance.h.

◆ computeTerm1_2()

template<class dataType >
std::tuple< dataType, ftm::idNode > ttk::MergeTreeDistance::computeTerm1_2 ( std::vector< ftm::idNode > &  childrens,
int  ind,
std::vector< std::vector< dataType > > &  table,
bool  computeTerm1 
)
inline

Definition at line 351 of file MergeTreeDistance.h.

◆ createCostMatrix()

template<class dataType >
void ttk::MergeTreeDistance::createCostMatrix ( std::vector< std::vector< dataType > > &  treeTable,
std::vector< ftm::idNode > &  children1,
std::vector< ftm::idNode > &  children2,
std::vector< std::vector< dataType > > &  costMatrix 
)
inline

Definition at line 161 of file MergeTreeDistance.h.

◆ execute() [1/2]

template<class dataType >
dataType ttk::MergeTreeDistance::execute ( ftm::MergeTree< dataType > &  mTree1,
ftm::MergeTree< dataType > &  mTree2,
std::vector< std::tuple< ftm::idNode, ftm::idNode, double > > &  outputMatching 
)
inline

Definition at line 560 of file MergeTreeDistance.h.

◆ execute() [2/2]

template<class dataType >
dataType ttk::MergeTreeDistance::execute ( ftm::MergeTree< dataType > &  tree1,
ftm::MergeTree< dataType > &  tree2,
std::vector< std::tuple< ftm::idNode, ftm::idNode > > &  outputMatching 
)
inline

Definition at line 640 of file MergeTreeDistance.h.

◆ forestAssignmentProblem()

template<class dataType >
dataType ttk::MergeTreeDistance::forestAssignmentProblem ( ftm::FTMTree_MT ttkNotUsedtree1,
ftm::FTMTree_MT ttkNotUsedtree2,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< ftm::idNode > &  children1,
std::vector< ftm::idNode > &  children2,
std::vector< std::tuple< int, int > > &  forestAssignment 
)
inline

Definition at line 207 of file MergeTreeDistance.h.

◆ parallelEditDistance()

template<class dataType >
void ttk::MergeTreeDistance::parallelEditDistance ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
int   ttkNotUsednRows,
int   ttkNotUsednCols 
)
inline

Definition at line 771 of file MergeTreeDistance.h.

◆ parallelEmptyTreeDistance_v2()

template<class dataType >
void ttk::MergeTreeDistance::parallelEmptyTreeDistance_v2 ( ftm::FTMTree_MT tree,
bool  isTree1,
std::vector< ftm::idNode > &  treeLeaves,
std::vector< int > &  treeNodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable 
)
inline

Definition at line 1008 of file MergeTreeDistance.h.

◆ parallelEmptyTreeDistancePara()

template<class dataType >
void ttk::MergeTreeDistance::parallelEmptyTreeDistancePara ( ftm::FTMTree_MT tree,
bool  isTree1,
std::vector< ftm::idNode > &  treeLeaves,
std::vector< int > &  treeNodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
ftm::idNode  nodeT,
std::vector< int > &  treeChildDone,
std::vector< bool > &  treeNodeDone,
std::queue< ftm::idNode > &  treeQueue 
)
inline

Definition at line 1037 of file MergeTreeDistance.h.

◆ parallelEmptyTreeDistanceTask()

template<class dataType >
void ttk::MergeTreeDistance::parallelEmptyTreeDistanceTask ( ftm::FTMTree_MT tree,
bool  isTree1,
std::vector< ftm::idNode > &  ttkNotUsedtreeLeaves,
std::vector< int > &  treeNodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
ftm::idNode  nodeT,
std::vector< int > &  treeChildDone,
std::vector< bool > &  treeNodeDone,
std::queue< ftm::idNode > &  treeQueue 
)
inline

Definition at line 1066 of file MergeTreeDistance.h.

◆ parallelTreeDistance_v2()

template<class dataType >
void ttk::MergeTreeDistance::parallelTreeDistance_v2 ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
bool  isTree1,
int  i,
std::vector< ftm::idNode > &  tree1Leaves,
std::vector< int > &  tree1NodeChildSize,
std::vector< ftm::idNode > &  tree2Leaves,
std::vector< int > &  tree2NodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
bool  firstCall = false 
)
inline

Definition at line 818 of file MergeTreeDistance.h.

◆ parallelTreeDistancePara()

template<class dataType >
void ttk::MergeTreeDistance::parallelTreeDistancePara ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
bool  isTree1,
int  i,
std::vector< ftm::idNode > &  tree1Leaves,
std::vector< int > &  tree1NodeChildSize,
std::vector< ftm::idNode > &  tree2Leaves,
std::vector< int > &  tree2NodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
bool  firstCall,
ftm::idNode  nodeT,
std::vector< int > &  treeChildDone,
std::vector< bool > &  treeNodeDone,
std::queue< ftm::idNode > &  treeQueue 
)
inline

Definition at line 865 of file MergeTreeDistance.h.

◆ parallelTreeDistanceTask()

template<class dataType >
void ttk::MergeTreeDistance::parallelTreeDistanceTask ( ftm::FTMTree_MT tree1,
ftm::FTMTree_MT tree2,
bool  isTree1,
int  i,
std::vector< ftm::idNode > &  tree1Leaves,
std::vector< int > &  tree1NodeChildSize,
std::vector< ftm::idNode > &  tree2Leaves,
std::vector< int > &  tree2NodeChildSize,
std::vector< std::vector< dataType > > &  treeTable,
std::vector< std::vector< dataType > > &  forestTable,
std::vector< std::vector< std::tuple< int, int > > > &  treeBackTable,
std::vector< std::vector< std::vector< std::tuple< int, int > > > > &  forestBackTable,
ftm::idNode  nodeT,
std::vector< int > &  treeChildDone,
std::vector< bool > &  treeNodeDone,
std::queue< ftm::idNode > &  treeQueue 
)
inline

Definition at line 902 of file MergeTreeDistance.h.

◆ postprocessAssignment()

template<class dataType >
dataType ttk::MergeTreeDistance::postprocessAssignment ( std::vector< MatchingType > &  matchings,
std::vector< ftm::idNode > &  children1,
std::vector< ftm::idNode > &  children2,
std::vector< std::tuple< int, int > > &  forestAssignment 
)
inline

Definition at line 188 of file MergeTreeDistance.h.

◆ printMapIntInt()

void ttk::MergeTreeDistance::printMapIntInt ( std::map< int, int >  theMap)
inline

Definition at line 1149 of file MergeTreeDistance.h.

◆ runAssignmentProblemSolver()

template<class dataType >
void ttk::MergeTreeDistance::runAssignmentProblemSolver ( std::vector< std::vector< dataType > > &  costMatrix,
std::vector< MatchingType > &  matchings 
)
inline

Implementation of the algorithm.

Definition at line 122 of file MergeTreeDistance.h.

◆ setAuctionEpsilon()

void ttk::MergeTreeDistance::setAuctionEpsilon ( double  aucEpsilon)
inline

Definition at line 93 of file MergeTreeDistance.h.

◆ setAuctionEpsilonDiviser()

void ttk::MergeTreeDistance::setAuctionEpsilonDiviser ( double  aucEpsilonDiviser)
inline

Definition at line 97 of file MergeTreeDistance.h.

◆ setAuctionNoRounds()

void ttk::MergeTreeDistance::setAuctionNoRounds ( double  aucNoRounds)
inline

Definition at line 101 of file MergeTreeDistance.h.

◆ setIsCalled()

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

Definition at line 73 of file MergeTreeDistance.h.

◆ setMinMaxPairWeight()

void ttk::MergeTreeDistance::setMinMaxPairWeight ( double  weight)
inline

Definition at line 109 of file MergeTreeDistance.h.

◆ setOnlyEmptyTreeDistance()

void ttk::MergeTreeDistance::setOnlyEmptyTreeDistance ( double  only)
inline

Definition at line 105 of file MergeTreeDistance.h.

◆ setPostprocess()

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

Definition at line 81 of file MergeTreeDistance.h.

◆ setPreprocess()

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

Definition at line 77 of file MergeTreeDistance.h.

◆ setSaveTree()

void ttk::MergeTreeDistance::setSaveTree ( bool  save)
inline

Definition at line 89 of file MergeTreeDistance.h.

◆ setTesting()

void ttk::MergeTreeDistance::setTesting ( bool  test)
inline

Definition at line 85 of file MergeTreeDistance.h.

◆ verifyMergeTreeStructure()

template<class dataType >
void ttk::MergeTreeDistance::verifyMergeTreeStructure ( ftm::FTMTree_MT tree)
inline

Definition at line 1159 of file MergeTreeDistance.h.


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