TTK
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
ttk::ftr::Graph Class Reference

TTK FTRGraph graph skeleton. More...

#include <Graph.h>

Inheritance diagram for ttk::ftr::Graph:
ttk::ftr::Allocable ttk::Debug ttk::BaseClass

Public Member Functions

 Graph ()
 
 Graph (Graph &&other) noexcept=default
 
 Graph (const Graph &other)=delete
 
 ~Graph () override
 
Graphoperator= (Graph &&other) noexcept
 
Graphoperator= (Graph &other)=delete
 
idNode getNumberOfNodes () const
 
idSuperArc getNumberOfArcs () const
 
idSuperArc getNumberOfVisibleArcs () const
 
idNode getNumberOfLeaves () const
 
idVertex getLeaf (const idNode id) const
 
bool isLeafFromMin (const idNode id) const
 
const NodegetNode (const idNode id) const
 
NodegetNode (const idNode id)
 
const SuperArcgetArc (const idSuperArc id) const
 
SuperArcgetArc (const idSuperArc id)
 
bool isVisited (const idVertex v) const
 
void visit (const idVertex v, const idSegmentation id, bool isArc=true)
 
void setArc (const idVertex v, const idSegmentation id)
 
std::tuple< idNode, idSuperArcvisit (const idVertex v) const
 
bool isArc (const idVertex v) const
 
bool isArc (const idVertex v, const idSuperArc id) const
 
bool isNode (const idVertex v) const
 
bool isNode (const idVertex v, const idNode id) const
 
idNode getNodeId (const idVertex v) const
 
idSuperArc getArcId (const idVertex v) const
 
const NodegetDownNode (const idSuperArc a) const
 
const valencevalUp (const idVertex v) const
 
valencevalUp (const idVertex v)
 
const valencevalDown (const idVertex v) const
 
valencevalDown (const idVertex v)
 
void addLeaf (const idVertex v, bool isMax)
 
idNode makeNode (const idVertex v)
 
std::tuple< idNode, bool > getOrCreateNode (const idVertex v)
 
idSuperArc openArc (const idNode downId, Propagation *p=nullptr)
 
void closeArc (const idSuperArc arc, const idNode upId)
 
void makeArc (const idNode downId, const idNode upId)
 
idSuperArc makeHiddenArc (Propagation *const lp)
 
template<typename ScalarType >
void sortLeaves (const Scalars< ScalarType > *s, const bool parallel=false)
 
void shuffleLeaves ()
 
template<typename ScalarType >
void mergeArcs (const Scalars< ScalarType > *const s)
 
template<typename ScalarType >
void arcs2nodes (const Scalars< ScalarType > *const s)
 
template<typename ScalarType >
void buildArcSegmentation (const Scalars< ScalarType > *const s)
 
std::string print (const int verbosity) const
 
std::string printArc (const idSuperArc arcId) const
 
std::string printNode (const idNode nodeId) const
 
std::string printVisit (const idVertex v) const
 
std::string printVisit () const
 
void alloc () override
 
void init () override
 
- 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)
 
virtual void alloc ()=0
 
virtual void init ()=0
 
- 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)
 
virtual int setWrapper (const Wrapper *wrapper)
 

Public Attributes

std::vector< valencevalDown_
 
std::vector< valencevalUp_
 

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::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

TTK FTRGraph graph skeleton.

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-25

This class manage nodes and arcs of the graph structure along with their Segmentation

See also
ttk::FTRGraph

Definition at line 38 of file Graph.h.

Constructor & Destructor Documentation

◆ Graph() [1/3]

Graph::Graph ( )
default

◆ Graph() [2/3]

ttk::ftr::Graph::Graph ( Graph &&  other)
defaultnoexcept

◆ Graph() [3/3]

ttk::ftr::Graph::Graph ( const Graph other)
delete

◆ ~Graph()

Graph::~Graph ( )
overridedefault

Member Function Documentation

◆ addLeaf()

void ttk::ftr::Graph::addLeaf ( const idVertex  v,
bool  isMax 
)
inline

Definition at line 242 of file Graph.h.

◆ alloc()

void Graph::alloc ( )
overridevirtual

Implements ttk::ftr::Allocable.

Definition at line 130 of file Graph.cpp.

◆ arcs2nodes()

template<typename ScalarType >
void ttk::ftr::Graph::arcs2nodes ( const Scalars< ScalarType > *const  s)

Definition at line 95 of file Graph_Template.h.

◆ buildArcSegmentation()

template<typename ScalarType >
void ttk::ftr::Graph::buildArcSegmentation ( const Scalars< ScalarType > *const  s)

Definition at line 170 of file Graph_Template.h.

◆ closeArc()

void ttk::ftr::Graph::closeArc ( const idSuperArc  arc,
const idNode  upId 
)
inline

Definition at line 282 of file Graph.h.

◆ getArc() [1/2]

SuperArc & ttk::ftr::Graph::getArc ( const idSuperArc  id)
inline

Definition at line 125 of file Graph.h.

◆ getArc() [2/2]

const SuperArc & ttk::ftr::Graph::getArc ( const idSuperArc  id) const
inline

Definition at line 121 of file Graph.h.

◆ getArcId()

idSuperArc ttk::ftr::Graph::getArcId ( const idVertex  v) const
inline

Definition at line 214 of file Graph.h.

◆ getDownNode()

const Node & ttk::ftr::Graph::getDownNode ( const idSuperArc  a) const
inline

Definition at line 218 of file Graph.h.

◆ getLeaf()

idVertex ttk::ftr::Graph::getLeaf ( const idNode  id) const
inline

Definition at line 105 of file Graph.h.

◆ getNode() [1/2]

Node & ttk::ftr::Graph::getNode ( const idNode  id)
inline

Definition at line 117 of file Graph.h.

◆ getNode() [2/2]

const Node & ttk::ftr::Graph::getNode ( const idNode  id) const
inline

Definition at line 113 of file Graph.h.

◆ getNodeId()

idNode ttk::ftr::Graph::getNodeId ( const idVertex  v) const
inline

Definition at line 210 of file Graph.h.

◆ getNumberOfArcs()

idSuperArc ttk::ftr::Graph::getNumberOfArcs ( ) const
inline

Definition at line 88 of file Graph.h.

◆ getNumberOfLeaves()

idNode ttk::ftr::Graph::getNumberOfLeaves ( ) const
inline

Definition at line 101 of file Graph.h.

◆ getNumberOfNodes()

idNode ttk::ftr::Graph::getNumberOfNodes ( ) const
inline

Definition at line 84 of file Graph.h.

◆ getNumberOfVisibleArcs()

idSuperArc ttk::ftr::Graph::getNumberOfVisibleArcs ( ) const
inline

Definition at line 92 of file Graph.h.

◆ getOrCreateNode()

std::tuple< idNode, bool > ttk::ftr::Graph::getOrCreateNode ( const idVertex  v)
inline

Definition at line 256 of file Graph.h.

◆ init()

void Graph::init ( )
overridevirtual

Implements ttk::ftr::Allocable.

Definition at line 150 of file Graph.cpp.

◆ isArc() [1/2]

bool ttk::ftr::Graph::isArc ( const idVertex  v) const
inline

Definition at line 194 of file Graph.h.

◆ isArc() [2/2]

bool ttk::ftr::Graph::isArc ( const idVertex  v,
const idSuperArc  id 
) const
inline

Definition at line 198 of file Graph.h.

◆ isLeafFromMin()

bool ttk::ftr::Graph::isLeafFromMin ( const idNode  id) const
inline

Definition at line 109 of file Graph.h.

◆ isNode() [1/2]

bool ttk::ftr::Graph::isNode ( const idVertex  v) const
inline

Definition at line 202 of file Graph.h.

◆ isNode() [2/2]

bool ttk::ftr::Graph::isNode ( const idVertex  v,
const idNode  id 
) const
inline

Definition at line 206 of file Graph.h.

◆ isVisited()

bool ttk::ftr::Graph::isVisited ( const idVertex  v) const
inline

Definition at line 129 of file Graph.h.

◆ makeArc()

void ttk::ftr::Graph::makeArc ( const idNode  downId,
const idNode  upId 
)
inline

Definition at line 286 of file Graph.h.

◆ makeHiddenArc()

idSuperArc ttk::ftr::Graph::makeHiddenArc ( Propagation *const  lp)
inline

Definition at line 290 of file Graph.h.

◆ makeNode()

idNode ttk::ftr::Graph::makeNode ( const idVertex  v)
inline

Definition at line 248 of file Graph.h.

◆ mergeArcs()

template<typename ScalarType >
void ttk::ftr::Graph::mergeArcs ( const Scalars< ScalarType > *const  s)

Definition at line 19 of file Graph_Template.h.

◆ openArc()

idSuperArc ttk::ftr::Graph::openArc ( const idNode  downId,
Propagation p = nullptr 
)
inline

Definition at line 267 of file Graph.h.

◆ operator=() [1/2]

Graph & ttk::ftr::Graph::operator= ( Graph &&  other)
inlinenoexcept

Definition at line 62 of file Graph.h.

◆ operator=() [2/2]

Graph & ttk::ftr::Graph::operator= ( Graph other)
delete

◆ print()

std::string Graph::print ( const int  verbosity) const

Definition at line 14 of file Graph.cpp.

◆ printArc()

std::string Graph::printArc ( const idSuperArc  arcId) const

Definition at line 54 of file Graph.cpp.

◆ printNode()

std::string Graph::printNode ( const idNode  nodeId) const

Definition at line 90 of file Graph.cpp.

◆ printVisit() [1/2]

std::string Graph::printVisit ( ) const

Definition at line 117 of file Graph.cpp.

◆ printVisit() [2/2]

std::string Graph::printVisit ( const idVertex  v) const

Definition at line 106 of file Graph.cpp.

◆ setArc()

void ttk::ftr::Graph::setArc ( const idVertex  v,
const idSegmentation  id 
)
inline

Definition at line 186 of file Graph.h.

◆ shuffleLeaves()

void ttk::ftr::Graph::shuffleLeaves ( )
inline

Definition at line 317 of file Graph.h.

◆ sortLeaves()

template<typename ScalarType >
void ttk::ftr::Graph::sortLeaves ( const Scalars< ScalarType > *  s,
const bool  parallel = false 
)
inline

Definition at line 303 of file Graph.h.

◆ valDown() [1/2]

valence & ttk::ftr::Graph::valDown ( const idVertex  v)
inline

Definition at line 235 of file Graph.h.

◆ valDown() [2/2]

const valence & ttk::ftr::Graph::valDown ( const idVertex  v) const
inline

Definition at line 231 of file Graph.h.

◆ valUp() [1/2]

valence & ttk::ftr::Graph::valUp ( const idVertex  v)
inline

Definition at line 227 of file Graph.h.

◆ valUp() [2/2]

const valence & ttk::ftr::Graph::valUp ( const idVertex  v) const
inline

Definition at line 223 of file Graph.h.

◆ visit() [1/2]

std::tuple< idNode, idSuperArc > ttk::ftr::Graph::visit ( const idVertex  v) const
inline

Definition at line 190 of file Graph.h.

◆ visit() [2/2]

void ttk::ftr::Graph::visit ( const idVertex  v,
const idSegmentation  id,
bool  isArc = true 
)
inline

Definition at line 134 of file Graph.h.

Member Data Documentation

◆ valDown_

std::vector<valence> ttk::ftr::Graph::valDown_

Definition at line 55 of file Graph.h.

◆ valUp_

std::vector<valence> ttk::ftr::Graph::valUp_

Definition at line 55 of file Graph.h.


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