TTK
Loading...
Searching...
No Matches
Public Member Functions | Protected Attributes | List of all members
ttk::ftr::DynamicGraph< Type > Class Template Reference

TTK fTRGraph dynamic graph tracking the evolution of level sets. More...

#include <DynamicGraph.h>

Inheritance diagram for ttk::ftr::DynamicGraph< Type >:
ttk::ftr::Allocable ttk::Debug ttk::BaseClass ttk::ftr::LocalForest< idVertex > ttk::ftr::LocalForest< Type >

Public Member Functions

 DynamicGraph ()
 
 ~DynamicGraph () override
 
void setNumberOfNodes (const std::size_t nbNodes)
 
void alloc () override
 
void init () override
 
DynGraphNode< Type > * getNode (const std::size_t nid)
 get the node with the id: nid
 
const DynGraphNode< Type > * getNode (const std::size_t nid) const
 
std::size_t getNodeId (DynGraphNode< Type > *node)
 get the id of the node: node
 
void setSubtreeArc (const std::size_t nid, const idSuperArc arc)
 
void setCorArc (const std::size_t nid, idSuperArc arc)
 
idSuperArc getSubtreeArc (const std::size_t nid) const
 
idSuperArc getCorArc (const std::size_t nid) const
 
bool isDisconnected (const DynGraphNode< Type > *const node) const
 
bool isDisconnected (const std::size_t nid)
 
DynGraphNode< Type > * findRoot (const DynGraphNode< Type > *const node)
 recover the root of a node
 
DynGraphNode< Type > * findRoot (const std::size_t nid)
 recover the root of a node using its id
 
std::vector< DynGraphNode< Type > * > findRoot (std::initializer_list< DynGraphNode< Type > * > nodes)
 recover the root of several nodes once, using brace initializers style: findRoot({n1,n2})
 
std::vector< DynGraphNode< Type > * > findRoot (std::initializer_list< std::size_t > nodesIds)
 findRoot but using ids of the nodes
 
template<typename type >
std::set< DynGraphNode< Type > * > findRoot (const std::vector< type > &nodesIds)
 findRoot but using ids of the nodes in a vector
 
bool insertEdge (DynGraphNode< Type > *const n1, DynGraphNode< Type > *const n2, const Type w, const idSuperArc corArc)
 
bool insertEdge (const std::size_t n1, const std::size_t n2, const Type w, const idSuperArc corArc)
 inert or replace existing edge between n1 and n2
 
void removeEdge (DynGraphNode< Type > *const n)
 remove the link btwn n and its parent
 
void removeEdge (const std::size_t nid)
 remove the link btwn n and its parent
 
int removeEdge (DynGraphNode< Type > *const n1, DynGraphNode< Type > *const n2)
 
int removeEdge (const std::size_t nid1, const std::size_t nid2)
 
std::string print ()
 
std::string print (const std::function< std::string(std::size_t)> &)
 
std::string printNbCC ()
 
void test ()
 
- Public Member Functions inherited from ttk::ftr::Allocable
void setNumberOfElmt (const idVertex nbVerts)
 
template<typename type >
void fillVector (std::vector< type > &vect, const type &elmt)
 
- 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)
 

Protected Attributes

std::vector< DynGraphNode< Type > > nodes_
 
- Protected Attributes inherited from ttk::ftr::Allocable
idVertex nbElmt_ = nullVertex
 Allocation may depends on the number of vertices.
 
- 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::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

template<typename Type>
class ttk::ftr::DynamicGraph< Type >

TTK fTRGraph dynamic graph tracking the evolution of level sets.

Author
Gueunet Charles charl.nosp@m.es.g.nosp@m.ueune.nosp@m.t+tt.nosp@m.k@gma.nosp@m.il.c.nosp@m.om
Date
2018-01-15

This class deal with dynamic graph part of the algorithm, thracking the number of contour on each vertex to deduce the Reeb graph. This is done using an ST-tree.

See also
ttk::FTRGraph

Definition at line 30 of file DynamicGraph.h.

Constructor & Destructor Documentation

◆ DynamicGraph()

template<typename Type >
ttk::ftr::DynamicGraph< Type >::DynamicGraph ( )
default

◆ ~DynamicGraph()

template<typename Type >
ttk::ftr::DynamicGraph< Type >::~DynamicGraph ( )
overridedefault

Member Function Documentation

◆ alloc()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::alloc ( )
overridevirtual

preallocate the array of tree representing the forset,

Precondition
needs nbElmt_ to be set.

Implements ttk::ftr::Allocable.

Definition at line 19 of file DynamicGraph_Template.h.

◆ findRoot() [1/5]

template<typename Type >
DynGraphNode< Type > * ttk::ftr::DynamicGraph< Type >::findRoot ( const DynGraphNode< Type > *const  node)
inline

recover the root of a node

Definition at line 97 of file DynamicGraph.h.

◆ findRoot() [2/5]

template<typename Type >
DynGraphNode< Type > * ttk::ftr::DynamicGraph< Type >::findRoot ( const std::size_t  nid)
inline

recover the root of a node using its id

Definition at line 102 of file DynamicGraph.h.

◆ findRoot() [3/5]

template<typename Type >
template<typename type >
std::set< DynGraphNode< Type > * > ttk::ftr::DynamicGraph< Type >::findRoot ( const std::vector< type > &  nodesIds)
inline

findRoot but using ids of the nodes in a vector

Definition at line 138 of file DynamicGraph.h.

◆ findRoot() [4/5]

template<typename Type >
std::vector< DynGraphNode< Type > * > ttk::ftr::DynamicGraph< Type >::findRoot ( std::initializer_list< DynGraphNode< Type > * >  nodes)
inline

recover the root of several nodes once, using brace initializers style: findRoot({n1,n2})

Definition at line 109 of file DynamicGraph.h.

◆ findRoot() [5/5]

template<typename Type >
std::vector< DynGraphNode< Type > * > ttk::ftr::DynamicGraph< Type >::findRoot ( std::initializer_list< std::size_t >  nodesIds)
inline

findRoot but using ids of the nodes

Definition at line 123 of file DynamicGraph.h.

◆ getCorArc()

template<typename Type >
idSuperArc ttk::ftr::DynamicGraph< Type >::getCorArc ( const std::size_t  nid) const
inline

Definition at line 82 of file DynamicGraph.h.

◆ getNode() [1/2]

template<typename Type >
DynGraphNode< Type > * ttk::ftr::DynamicGraph< Type >::getNode ( const std::size_t  nid)
inline

get the node with the id: nid

Definition at line 56 of file DynamicGraph.h.

◆ getNode() [2/2]

template<typename Type >
const DynGraphNode< Type > * ttk::ftr::DynamicGraph< Type >::getNode ( const std::size_t  nid) const
inline

Definition at line 60 of file DynamicGraph.h.

◆ getNodeId()

template<typename Type >
std::size_t ttk::ftr::DynamicGraph< Type >::getNodeId ( DynGraphNode< Type > *  node)
inline

get the id of the node: node

Definition at line 65 of file DynamicGraph.h.

◆ getSubtreeArc()

template<typename Type >
idSuperArc ttk::ftr::DynamicGraph< Type >::getSubtreeArc ( const std::size_t  nid) const
inline

Definition at line 77 of file DynamicGraph.h.

◆ init()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::init ( )
overridevirtual

Implements ttk::ftr::Allocable.

Definition at line 24 of file DynamicGraph_Template.h.

◆ insertEdge() [1/2]

template<typename Type >
bool ttk::ftr::DynamicGraph< Type >::insertEdge ( const std::size_t  n1,
const std::size_t  n2,
const Type  w,
const idSuperArc  corArc 
)
inline

inert or replace existing edge between n1 and n2

Definition at line 157 of file DynamicGraph.h.

◆ insertEdge() [2/2]

template<typename Type >
bool ttk::ftr::DynamicGraph< Type >::insertEdge ( DynGraphNode< Type > *const  n1,
DynGraphNode< Type > *const  n2,
const Type  w,
const idSuperArc  corArc 
)
inline
Returns
true if we have merged two tree, false if it was just an intern operation

Definition at line 149 of file DynamicGraph.h.

◆ isDisconnected() [1/2]

template<typename Type >
bool ttk::ftr::DynamicGraph< Type >::isDisconnected ( const DynGraphNode< Type > *const  node) const
inline

Definition at line 87 of file DynamicGraph.h.

◆ isDisconnected() [2/2]

template<typename Type >
bool ttk::ftr::DynamicGraph< Type >::isDisconnected ( const std::size_t  nid)
inline

Definition at line 92 of file DynamicGraph.h.

◆ print() [1/2]

template<typename Type >
std::string ttk::ftr::DynamicGraph< Type >::print ( )

Definition at line 44 of file DynamicGraph_Template.h.

◆ print() [2/2]

template<typename Type >
std::string ttk::ftr::DynamicGraph< Type >::print ( const std::function< std::string(std::size_t)> &  printFunction)

Definition at line 66 of file DynamicGraph_Template.h.

◆ printNbCC()

template<typename Type >
std::string ttk::ftr::DynamicGraph< Type >::printNbCC ( )

Definition at line 87 of file DynamicGraph_Template.h.

◆ removeEdge() [1/4]

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::removeEdge ( const std::size_t  nid)
inline

remove the link btwn n and its parent

Definition at line 170 of file DynamicGraph.h.

◆ removeEdge() [2/4]

template<typename Type >
int ttk::ftr::DynamicGraph< Type >::removeEdge ( const std::size_t  nid1,
const std::size_t  nid2 
)
inline

remove the edge btwn n1 and n2

Returns
0 if not an edge

Definition at line 181 of file DynamicGraph.h.

◆ removeEdge() [3/4]

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::removeEdge ( DynGraphNode< Type > *const  n)
inline

remove the link btwn n and its parent

Definition at line 165 of file DynamicGraph.h.

◆ removeEdge() [4/4]

template<typename Type >
int ttk::ftr::DynamicGraph< Type >::removeEdge ( DynGraphNode< Type > *const  n1,
DynGraphNode< Type > *const  n2 
)

remove the edge btwn n1 and n2

Returns
0 if not an edge

Definition at line 28 of file DynamicGraph_Template.h.

◆ setCorArc()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::setCorArc ( const std::size_t  nid,
idSuperArc  arc 
)
inline

Definition at line 73 of file DynamicGraph.h.

◆ setNumberOfNodes()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::setNumberOfNodes ( const std::size_t  nbNodes)
inline

Definition at line 41 of file DynamicGraph.h.

◆ setSubtreeArc()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::setSubtreeArc ( const std::size_t  nid,
const idSuperArc  arc 
)
inline

Definition at line 69 of file DynamicGraph.h.

◆ test()

template<typename Type >
void ttk::ftr::DynamicGraph< Type >::test ( )

Member Data Documentation

◆ nodes_

template<typename Type >
std::vector<DynGraphNode<Type> > ttk::ftr::DynamicGraph< Type >::nodes_
protected

Definition at line 32 of file DynamicGraph.h.


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