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

#include <FTMTree_CT.h>

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

Public Member Functions

 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 Attributes

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_
 

Additional Inherited Members

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

Detailed Description

Definition at line 30 of file FTMTree_CT.h.

Constructor & Destructor Documentation

◆ FTMTree_CT()

FTMTree_CT::FTMTree_CT ( const std::shared_ptr< Params > &  params,
const std::shared_ptr< Scalars > &  scalars 
)

Definition at line 24 of file FTMTree_CT.cpp.

◆ ~FTMTree_CT()

ttk::ftm::FTMTree_CT::~FTMTree_CT ( )
overridedefault

Member Function Documentation

◆ build()

template<class triangulationType >
void ttk::ftm::FTMTree_CT::build ( const triangulationType *  mesh,
TreeType  tt 
)

Definition at line 9 of file FTMTree_CT_Template.h.

◆ combine()

int FTMTree_CT::combine ( )

Definition at line 32 of file FTMTree_CT.cpp.

◆ createCTArcSegmentation()

void FTMTree_CT::createCTArcSegmentation ( idSuperArc  ctArc,
const bool  isJT,
idSuperArc  xtArc 
)

Definition at line 266 of file FTMTree_CT.cpp.

◆ finalizeSegmentation()

void FTMTree_CT::finalizeSegmentation ( )

Definition at line 301 of file FTMTree_CT.cpp.

◆ getJoinTree()

FTMTree_MT * ttk::ftm::FTMTree_CT::getJoinTree ( )
inline

Definition at line 47 of file FTMTree_CT.h.

◆ getSplitTree()

FTMTree_MT * ttk::ftm::FTMTree_CT::getSplitTree ( )
inline

Definition at line 51 of file FTMTree_CT.h.

◆ getTree()

FTMTree_MT * ttk::ftm::FTMTree_CT::getTree ( const TreeType  tt)
inline

Definition at line 55 of file FTMTree_CT.h.

◆ insertNodes()

void FTMTree_CT::insertNodes ( )

Definition at line 315 of file FTMTree_CT.cpp.

◆ leafSearch()

template<class triangulationType >
int ttk::ftm::FTMTree_CT::leafSearch ( const triangulationType *  mesh)

Definition at line 110 of file FTMTree_CT_Template.h.

◆ preconditionTriangulation()

void ttk::ftm::FTMTree_CT::preconditionTriangulation ( AbstractTriangulation tri,
const bool  preproc = true 
)
inline

Definition at line 72 of file FTMTree_CT.h.

◆ setDebugLevel()

int ttk::ftm::FTMTree_CT::setDebugLevel ( const int &  debugLevel)
inlineoverridevirtual

Set the debug level of a particular object. The global variable globalDebugLevel_ will over-ride this setting if it has a lower value.

Returns
Returns 0 upon success, negative values otherwise.

Reimplemented from ttk::Debug.

Definition at line 79 of file FTMTree_CT.h.

◆ setThreadNumber()

int ttk::ftm::FTMTree_CT::setThreadNumber ( const int  n)
inlineoverridevirtual

Reimplemented from ttk::BaseClass.

Definition at line 86 of file FTMTree_CT.h.

◆ updateRegion()

void ttk::ftm::FTMTree_CT::updateRegion ( const ArcRegion arcRegion,
idSuperArc  ctArc 
)

Member Data Documentation

◆ jt_

FTMTree_MT ttk::ftm::FTMTree_CT::jt_
protected

Definition at line 32 of file FTMTree_CT.h.

◆ st_

FTMTree_MT ttk::ftm::FTMTree_CT::st_
protected

Definition at line 32 of file FTMTree_CT.h.


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