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

#include <FTMTreePP.h>

Inheritance diagram for ttk::ftm::FTMTreePP:
ttk::ftm::FTMTree ttk::ftm::FTMTree_CT ttk::ftm::FTMTree_MT ttk::Debug ttk::BaseClass

Public Member Functions

 FTMTreePP ()
 
 ~FTMTreePP () override
 
template<typename scalarType >
void computePersistencePairs (std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &pairs, const bool jt)
 
void setCustomTree (ftm::FTMTree_MT *cTree)
 
template<typename scalarType >
void sortPairs (ftm::FTMTree_MT *ttkNotUsed(tree), std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &pairs)
 
- Public Member Functions inherited from ttk::ftm::FTMTree
 FTMTree ()
 
 ~FTMTree () override=default
 
template<typename scalarType , class triangulationType >
void build (const triangulationType *mesh)
 
- Public Member Functions inherited from ttk::ftm::FTMTree_CT
 FTMTree_CT (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars)
 
 ~FTMTree_CT () override=default
 
FTMTree_MTgetJoinTree ()
 
FTMTree_MTgetSplitTree ()
 
FTMTree_MTgetTree (const TreeType tt)
 
void preconditionTriangulation (AbstractTriangulation *tri, const bool preproc=true)
 
int setDebugLevel (const int &d) override
 
int setThreadNumber (const int n) override
 
template<class triangulationType >
int leafSearch (const triangulationType *mesh)
 
template<class triangulationType >
void build (const triangulationType *mesh, TreeType tt)
 
void insertNodes ()
 
int combine ()
 
void updateRegion (const ArcRegion &arcRegion, idSuperArc ctArc)
 
void createCTArcSegmentation (idSuperArc ctArc, const bool isJT, idSuperArc xtArc)
 
void finalizeSegmentation ()
 
- Public Member Functions inherited from ttk::ftm::FTMTree_MT
 FTMTree_MT (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars, TreeType type)
 
 ~FTMTree_MT () override
 
void clear ()
 
void setParamsScalars (const std::shared_ptr< Params > &params, const std::shared_ptr< Scalars > &scalars)
 
template<class triangulationType >
void initNbScalars (const triangulationType *triangulation)
 
void initComp ()
 
bool compLower (const SimplexId a, const SimplexId b)
 
template<typename scalarType >
void sortInput ()
 if sortedVertices_ is null, define and fill it
 
void makeAlloc ()
 clear local data for new computation
 
void makeInit ()
 
void initVectStates (const SimplexId nbLeaves)
 
template<class triangulationType >
void build (const triangulationType *mesh, const bool ct)
 Compute the merge.
 
template<class triangulationType >
int leafSearch (const triangulationType *mesh)
 
template<class triangulationType >
void leafGrowth (const triangulationType *mesh)
 
template<class triangulationType >
void arcGrowth (const triangulationType *mesh, const SimplexId startVert, const SimplexId orig)
 
template<class triangulationType >
std::tuple< bool, bool > propagate (const triangulationType *mesh, CurrentState &currentState, UF curUF)
 
template<class triangulationType >
void closeAndMergeOnSaddle (const triangulationType *mesh, SimplexId saddleVert)
 
template<class triangulationType >
void closeOnBackBone (const triangulationType *mesh, SimplexId saddleVert)
 
void closeArcsUF (idNode closeNode, UF uf)
 
template<class triangulationType >
SimplexId trunk (const triangulationType *mesh, const bool ct)
 
virtual SimplexId trunkSegmentation (const std::vector< SimplexId > &pendingNodesVerts, const SimplexId begin, const SimplexId stop)
 
SimplexId trunkCTSegmentation (const std::vector< SimplexId > &pendingNodesVerts, const SimplexId begin, const SimplexId stop)
 
void buildSegmentation ()
 use vert2tree to compute the segmentation of the fresh built merge tree.
 
void finalizeSegmentation ()
 
void normalizeIds ()
 
SimplexId getArcSize (const idSuperArc arcId)
 
bool isJT () const
 
bool isST () const
 
void preconditionTriangulation (AbstractTriangulation *tri, const bool preproc=true)
 
void setScalars (void *local_scalars)
 
void setTreeType (const int local_treeType)
 
void setSegmentation (const bool segm)
 
void setNormalizeIds (const bool normalize)
 
template<typename scalarType >
const scalarType & getValue (SimplexId nodeId) const
 
template<typename scalarType >
void setVertexScalars (const scalarType *vals)
 
void setVertexSoSoffsets (const SimplexId *const sos)
 
idSuperArc getNumberOfSuperArcs () const
 
SuperArcgetSuperArc (idSuperArc i)
 
const SuperArcgetSuperArc (idSuperArc i) const
 
idNode getNumberOfNodes () const
 
NodegetNode (idNode nodeId)
 
void setValence (const SimplexId v, const SimplexId val)
 
idNode getNumberOfLeaves () const
 
const std::vector< idNode > & getLeaves () const
 
idNode getLeave (const idNode id) const
 
const std::vector< idNode > & getRoots () const
 
SimplexId getNumberOfVertices () const
 
void setVert2Tree (decltype(mt_data_.vert2tree) const &vect2tree)
 
bool isCorrespondingArc (const SimplexId val) const
 
bool isCorrespondingNode (const SimplexId val) const
 
bool isCorrespondingNull (const SimplexId val) const
 
idNode getCorrespondingNodeId (const SimplexId val) const
 
idSuperArc getCorrespondingSuperArcId (const SimplexId val) const
 
SuperArcvertex2SuperArc (const SimplexId vert)
 
Nodevertex2Node (const SimplexId vert)
 
void updateCorrespondingArc (const SimplexId vert, const idSuperArc arc)
 
void updateCorrespondingNode (const SimplexId vert, const idNode node)
 
idCorresp idNode2corr (const idNode id) const
 
idNode corr2idNode (const idCorresp &corr) const
 
idSuperArc openSuperArc (idNode downNodeId)
 
idSuperArc makeSuperArc (idNode downNodeId, idNode upNodeId)
 
void closeSuperArc (idSuperArc superArcId, idNode upNodeId)
 
std::vector< idNodesortedNodes (const bool parallel=false)
 
void sortLeaves (const bool parallel=false)
 
void sortNodes ()
 Sort tree nodes according to vertex order.
 
void sortArcs ()
 Sort tree arcs.
 
idNode makeNode (SimplexId vertexId, SimplexId linked=nullVertex)
 
idNode makeNode (const Node *const n, SimplexId linked=nullVertex)
 
idSuperArc insertNode (Node *node, const bool segm=true)
 
NodegetDownNode (const SuperArc *a)
 
NodegetUpNode (const SuperArc *a)
 
idNode getDownNodeId (const SuperArc *a)
 
idNode getUpNodeId (const SuperArc *a)
 
NodegetLowerNode (const SuperArc *a)
 
NodegetUpperNode (const SuperArc *a)
 
idNode getLowerNodeId (const SuperArc *a)
 
idNode getUpperNodeId (const SuperArc *a)
 
idNode getParent (const idNode n)
 
void delNode (idNode node)
 
std::shared_ptr< FTMTree_MTclone () const
 
void move (FTMTree_MT &mt)
 
std::string printArc (idSuperArc a)
 
std::string printNode (idNode n)
 
void printTree2 ()
 
void printParams () const
 
int printTime (Timer &t, const std::string &s, const int debugLevel=2) const
 
bool isNodeOriginDefined (idNode nodeId)
 
bool isRoot (idNode nodeId)
 
bool isLeaf (idNode nodeId)
 
bool isNodeAlone (idNode nodeId)
 
bool isFullMerge ()
 
bool isBranchOrigin (idNode nodeId)
 
template<class dataType >
bool isJoinTree ()
 
template<class dataType >
bool isImportantPair (idNode nodeId, double threshold, std::vector< double > &excludeLower, std::vector< double > &excludeHigher)
 
template<class dataType >
bool isImportantPair (idNode nodeId, double threshold)
 
bool isNodeMerged (idNode nodeId)
 
bool isNodeIdInconsistent (idNode nodeId)
 
bool isThereOnlyOnePersistencePair ()
 
bool notNeedToNormalize (idNode nodeId)
 
bool isMultiPersPair (idNode nodeId)
 
template<class dataType >
bool isParentInconsistent (ftm::idNode nodeId)
 
template<class dataType >
bool verifyBranchDecompositionInconsistency ()
 
idNode getRoot ()
 
idNode getParentSafe (idNode nodeId)
 
void getChildren (idNode nodeId, std::vector< idNode > &res)
 
void getLeavesFromTree (std::vector< idNode > &res)
 
int getNumberOfLeavesFromTree ()
 
int getNumberOfNodeAlone ()
 
int getRealNumberOfNodes ()
 
template<class dataType >
idNode getMergedRootOrigin ()
 
void getBranchOriginsFromThisBranch (idNode node, std::tuple< std::vector< idNode >, std::vector< idNode > > &res)
 
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID, std::vector< std::vector< idNode > > &nodeBranching)
 
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID)
 
void getAllRoots (std::vector< idNode > &res)
 
int getNumberOfRoot ()
 
int getNumberOfChildren (idNode nodeId)
 
int getTreeDepth ()
 
int getNodeLevel (idNode nodeId)
 
void getAllNodeLevel (std::vector< int > &res)
 
void getLevelToNode (std::vector< std::vector< idNode > > &res)
 
void getBranchSubtree (std::vector< idNode > &branching, idNode branchRoot, std::vector< idNode > &res)
 
template<class dataType >
idNode getLowestNode (idNode nodeStart)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeathFromIds (idNode nodeId1, idNode nodeId2)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeathNodeFromIds (idNode nodeId1, idNode nodeId2)
 
template<class dataType >
std::tuple< dataType, dataType > getBirthDeath (idNode nodeId)
 
template<class dataType >
std::tuple< ftm::idNode, ftm::idNodegetBirthDeathNode (idNode nodeId)
 
template<class dataType >
std::tuple< dataType, dataType > getMergedRootBirthDeath ()
 
template<class dataType >
std::tuple< ftm::idNode, ftm::idNodegetMergedRootBirthDeathNode ()
 
template<class dataType >
dataType getBirth (idNode nodeId)
 
template<class dataType >
dataType getNodePersistence (idNode nodeId)
 
template<class dataType >
dataType getMaximumPersistence ()
 
template<class dataType >
ftm::idNode getSecondMaximumPersistenceNode ()
 
template<class dataType >
dataType getSecondMaximumPersistence ()
 
template<class dataType >
void getPersistencePairsFromTree (std::vector< std::tuple< ftm::idNode, ftm::idNode, dataType > > &pairs, bool useBD)
 
template<class dataType >
std::vector< ftm::idNodegetMultiPersOrigins (bool useBD)
 
void getMultiPersOriginsVectorFromTree (std::vector< std::vector< idNode > > &res)
 
void setParent (idNode nodeId, idNode newParentNodeId)
 
void deleteNode (idNode nodeId)
 
void deleteIthUpArc (idNode nodeId, int arcIth)
 
void deleteParent (idNode nodeId)
 
void deleteSubtree (idNode nodeId)
 
void copyMergeTreeStructure (FTMTree_MT *tree)
 
void printNodeSS (idNode node, std::stringstream &ss)
 
template<class dataType >
std::stringstream printNode2 (idNode nodeId, bool doPrint=true)
 
template<class dataType >
std::stringstream printMergedRoot (bool doPrint=true)
 
std::stringstream printSubTree (idNode subRoot)
 
std::stringstream printTree (bool doPrint=true)
 
std::stringstream printTreeStats (bool doPrint=true)
 
template<class dataType >
std::stringstream printTreeScalars (bool printNodeAlone=true, bool doPrint=true)
 
template<class dataType >
std::stringstream printPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true)
 
std::stringstream printMultiPersOriginsVectorFromTree (bool doPrint=true)
 
template<class dataType >
std::stringstream printMultiPersPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true)
 
template<class dataType >
void getPersistencePairsFromTree (std::vector< std::tuple< idNode, idNode, dataType > > &pairs, bool useBD)
 
template<class dataType >
std::vector< idNodegetMultiPersOrigins (bool useBD)
 
- Public Member Functions inherited from ttk::Debug
 Debug ()
 
 ~Debug () override
 
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
 

Protected Member Functions

template<typename scalarType >
void computePairs (ftm::FTMTree_MT *tree, std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &pairs)
 
template<typename scalarType >
void sortPairs (ftm::FTMTree_MT *tree, std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &pairs)
 
void addPendingNode (const idNode parentNode, const idNode toAdd)
 
idNode countPendingNode (const idNode current)
 
template<typename scalarType >
SimplexId getMostPersistVert (const idNode current, ftm::FTMTree_MT *tree)
 
void clearPendingNodes (const idNode current)
 
template<typename scalarType >
void createPairs (const idNode current, std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &pairs, ftm::FTMTree_MT *tree, const SimplexId mp)
 
- Protected Member Functions inherited from ttk::ftm::FTMTree_MT
idNode getVertInRange (const std::vector< SimplexId > &range, const SimplexId v, const idNode last=0) const
 
std::tuple< SimplexId, SimplexIdgetBoundsFromVerts (const std::vector< SimplexId > &nodes) const
 
idSuperArc upArcFromVert (const SimplexId v)
 
SimplexId getChunkSize (const SimplexId nbVerts=-1, const SimplexId nbtasks=100) const
 
SimplexId getChunkCount (const SimplexId nbVerts=-1, const SimplexId nbTasks=100) const
 
void sortUpArcs (const idNode nid)
 
void sortDownArcs (const idNode nid)
 
bool isLower (SimplexId a, SimplexId b) const
 
bool isHigher (SimplexId a, SimplexId b) const
 
template<typename type >
void createVector (std::vector< type > &vec)
 
template<typename type >
void createAtomicVector (std::shared_ptr< FTMAtomicVector< type > > &ptr)
 
template<typename type >
void initVector (std::vector< type > &vect, const type val)
 
- 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)
 

Additional Inherited Members

- Protected Attributes inherited from ttk::ftm::FTMTree_CT
FTMTree_MT jt_
 
FTMTree_MT st_
 
- Protected Attributes inherited from ttk::ftm::FTMTree_MT
std::shared_ptr< Paramsparams_
 
std::shared_ptr< Scalarsscalars_
 
TreeData mt_data_
 
Comparison comp_
 
- 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_
 
- Static Protected Attributes inherited from ttk::Debug
static COMMON_EXPORTS debug::LineMode lastLineMode = ttk::debug::LineMode::NEW
 

Detailed Description

Compute the persistence pairs of a function on a triangulation. TTK assumes that the input dataset is made of only one connected component.

Definition at line 25 of file FTMTreePP.h.

Constructor & Destructor Documentation

◆ FTMTreePP()

FTMTreePP::FTMTreePP ( )

Definition at line 21 of file FTMTreePP.cpp.

◆ ~FTMTreePP()

FTMTreePP::~FTMTreePP ( )
overridedefault

Member Function Documentation

◆ addPendingNode()

void ttk::ftm::FTMTreePP::addPendingNode ( const idNode  parentNode,
const idNode  toAdd 
)
inlineprotected

Definition at line 60 of file FTMTreePP.h.

◆ clearPendingNodes()

void ttk::ftm::FTMTreePP::clearPendingNodes ( const idNode  current)
inlineprotected

Definition at line 91 of file FTMTreePP.h.

◆ computePairs()

template<typename scalarType >
void ttk::ftm::FTMTreePP::computePairs ( ftm::FTMTree_MT tree,
std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &  pairs 
)
protected

Definition at line 159 of file FTMTreePP.h.

◆ computePersistencePairs()

template<typename scalarType >
void ttk::ftm::FTMTreePP::computePersistencePairs ( std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &  pairs,
const bool  jt 
)

Definition at line 128 of file FTMTreePP.h.

◆ countPendingNode()

idNode ttk::ftm::FTMTreePP::countPendingNode ( const idNode  current)
inlineprotected

Definition at line 66 of file FTMTreePP.h.

◆ createPairs()

template<typename scalarType >
void ttk::ftm::FTMTreePP::createPairs ( const idNode  current,
std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &  pairs,
ftm::FTMTree_MT tree,
const SimplexId  mp 
)
inlineprotected

Definition at line 96 of file FTMTreePP.h.

◆ getMostPersistVert()

template<typename scalarType >
SimplexId ttk::ftm::FTMTreePP::getMostPersistVert ( const idNode  current,
ftm::FTMTree_MT tree 
)
inlineprotected

Definition at line 71 of file FTMTreePP.h.

◆ setCustomTree()

void ttk::ftm::FTMTreePP::setCustomTree ( ftm::FTMTree_MT cTree)
inline

Definition at line 44 of file FTMTreePP.h.

◆ sortPairs() [1/2]

template<typename scalarType >
void ttk::ftm::FTMTreePP::sortPairs ( ftm::FTMTree_MT tree,
std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &  pairs 
)
protected

◆ sortPairs() [2/2]

template<typename scalarType >
void ttk::ftm::FTMTreePP::sortPairs ( ftm::FTMTree_MT ttkNotUsedtree,
std::vector< std::tuple< SimplexId, SimplexId, scalarType > > &  pairs 
)

Definition at line 202 of file FTMTreePP.h.


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