TTK
Loading...
Searching...
No Matches
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) const
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) const
bool isRoot (idNode nodeId) const
bool isLeaf (idNode nodeId) const
bool isNodeAlone (idNode nodeId) const
bool isFullMerge () const
bool isBranchOrigin (idNode nodeId) const
template<class dataType>
bool isJoinTree () const
template<class dataType>
bool isImportantPair (idNode nodeId, double threshold, std::vector< double > &excludeLower, std::vector< double > &excludeHigher) const
template<class dataType>
bool isImportantPair (idNode nodeId, double threshold) const
bool isNodeMerged (idNode nodeId) const
bool isNodeIdInconsistent (idNode nodeId) const
bool isThereOnlyOnePersistencePair () const
bool notNeedToNormalize (idNode nodeId) const
bool isMultiPersPair (idNode nodeId) const
template<class dataType>
bool isParentInconsistent (ftm::idNode nodeId) const
template<class dataType>
bool verifyBranchDecompositionInconsistency () const
idNode getRoot () const
idNode getParentSafe (idNode nodeId) const
void getChildren (idNode nodeId, std::vector< idNode > &res) const
void getLeavesFromTree (std::vector< idNode > &res) const
int getNumberOfLeavesFromTree () const
int getNumberOfNodeAlone () const
int getRealNumberOfNodes () const
template<class dataType>
idNode getMergedRootOrigin () const
void getBranchOriginsFromThisBranch (idNode node, std::tuple< std::vector< idNode >, std::vector< idNode > > &res) const
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID, std::vector< std::vector< idNode > > &nodeBranching) const
void getTreeBranching (std::vector< idNode > &branching, std::vector< int > &branchingID) const
void getAllRoots (std::vector< idNode > &res) const
int getNumberOfRoot () const
int getNumberOfChildren (idNode nodeId) const
int getTreeDepth () const
int getNodeLevel (idNode nodeId) const
void getAllNodeLevel (std::vector< int > &res) const
void getLevelToNode (std::vector< std::vector< idNode > > &res) const
void getBranchSubtree (std::vector< idNode > &branching, idNode branchRoot, std::vector< idNode > &res) const
template<class dataType>
idNode getLowestNode (idNode nodeStart) const
template<class dataType>
std::tuple< dataType, dataType > getBirthDeathFromIds (idNode nodeId1, idNode nodeId2) const
template<class dataType>
std::tuple< dataType, dataType > getBirthDeathNodeFromIds (idNode nodeId1, idNode nodeId2) const
template<class dataType>
std::tuple< dataType, dataType > getBirthDeath (idNode nodeId) const
template<class dataType>
std::tuple< ftm::idNode, ftm::idNodegetBirthDeathNode (idNode nodeId) const
template<class dataType>
std::tuple< dataType, dataType > getMergedRootBirthDeath () const
template<class dataType>
std::tuple< ftm::idNode, ftm::idNodegetMergedRootBirthDeathNode () const
template<class dataType>
dataType getBirth (idNode nodeId) const
template<class dataType>
dataType getNodePersistence (idNode nodeId) const
template<class dataType>
dataType getMaximumPersistence () const
template<class dataType>
ftm::idNode getSecondMaximumPersistenceNode () const
template<class dataType>
dataType getSecondMaximumPersistence () const
template<class dataType>
void getPersistencePairsFromTree (std::vector< std::tuple< ftm::idNode, ftm::idNode, dataType > > &pairs, bool useBD) const
template<class dataType>
std::vector< ftm::idNodegetMultiPersOrigins (bool useBD) const
void getMultiPersOriginsVectorFromTree (std::vector< std::vector< idNode > > &res) const
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 (const FTMTree_MT *tree)
void printNodeSS (idNode node, std::stringstream &ss) const
template<class dataType>
std::stringstream printNode2 (idNode nodeId, bool doPrint=true) const
template<class dataType>
std::stringstream printMergedRoot (bool doPrint=true) const
std::stringstream printSubTree (idNode subRoot) const
std::stringstream printTree (bool doPrint=true) const
std::stringstream printTreeStats (bool doPrint=true) const
template<class dataType>
std::stringstream printTreeScalars (bool printNodeAlone=true, bool doPrint=true) const
template<class dataType>
std::stringstream printPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true) const
std::stringstream printMultiPersOriginsVectorFromTree (bool doPrint=true) const
template<class dataType>
std::stringstream printMultiPersPairsFromTree (bool useBD=false, bool printPairs=true, bool doPrint=true) const
template<typename scalarType>
void sortInput ()
template<class dataType>
void getPersistencePairsFromTree (std::vector< std::tuple< idNode, idNode, dataType > > &pairs, bool useBD) const
template<class dataType>
std::vector< idNodegetMultiPersOrigins (bool useBD) const
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: