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

#include <DynamicGraph.h>

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

Public Member Functions

 LocalForest ()
 
void setNumberOfNodes (const std::size_t nbNodes)
 
void setNbCC (const std::size_t nb)
 
void reset ()
 
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::size_t getNbCC () const
 count the number of connected component in a list of nodes
 
- Public Member Functions inherited from ttk::ftr::DynamicGraph< Type >
 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)
 

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::ftr::DynamicGraph< Type >
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_
 
- 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::LocalForest< Type >

Definition at line 200 of file DynamicGraph.h.

Constructor & Destructor Documentation

◆ LocalForest()

template<typename Type >
ttk::ftr::LocalForest< Type >::LocalForest ( )
inline

Definition at line 205 of file DynamicGraph.h.

Member Function Documentation

◆ getNbCC()

template<typename Type >
std::size_t ttk::ftr::LocalForest< Type >::getNbCC ( ) const
inline

count the number of connected component in a list of nodes

Definition at line 283 of file DynamicGraph.h.

◆ insertEdge() [1/2]

template<typename Type >
bool ttk::ftr::LocalForest< 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 241 of file DynamicGraph.h.

◆ insertEdge() [2/2]

template<typename Type >
bool ttk::ftr::LocalForest< 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 230 of file DynamicGraph.h.

◆ removeEdge() [1/4]

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

remove the link btwn n and its parent

Definition at line 258 of file DynamicGraph.h.

◆ removeEdge() [2/4]

template<typename Type >
int ttk::ftr::LocalForest< 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 275 of file DynamicGraph.h.

◆ removeEdge() [3/4]

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

remove the link btwn n and its parent

Definition at line 252 of file DynamicGraph.h.

◆ removeEdge() [4/4]

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

remove the edge btwn n1 and n2

Returns
0 if not an edge

Definition at line 265 of file DynamicGraph.h.

◆ reset()

template<typename Type >
void ttk::ftr::LocalForest< Type >::reset ( )
inline

Definition at line 219 of file DynamicGraph.h.

◆ setNbCC()

template<typename Type >
void ttk::ftr::LocalForest< Type >::setNbCC ( const std::size_t  nb)
inline

Definition at line 213 of file DynamicGraph.h.

◆ setNumberOfNodes()

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

Definition at line 208 of file DynamicGraph.h.


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