4#include <unordered_map>
17 res <<
"Graph:" << endl;
18 res <<
"leaves: " << leaves_.
size() << endl;
19 res <<
"nodes: " << nodes_.size() << endl;
20 res <<
"arcs: " << arcs_.size() << endl;
28 res <<
"Leaves: " << endl;
29 for(
const auto &v : leaves_) {
30 res << get<0>(v) <<
" ";
36 res <<
"Nodes:" << endl;
37 const idNode nbn = nodes_.size();
38 for(
idNode i = 0; i < nbn; ++i) {
41 res <<
"Arcs:" << endl;
55 std::stringstream res;
56 res <<
"a" << arcId <<
":";
57 if(!arcs_[arcId].isVisible()) {
60 if(arcs_[arcId].merged()) {
61 res <<
" merged in " << arcs_[arcId].mergedIn();
64 const idNode did = arcs_[arcId].getDownNodeId();
65 const idNode uid = arcs_[arcId].getUpNodeId();
67 res << nodes_[did].getVertexIdentifier();
73 res << nodes_[uid].getVertexIdentifier();
78 if(arcs_[arcId].isEmpty()) {
81 res << arcs_[arcId].getFirstReg() <<
".." << arcs_[arcId].getLastReg();
83 if(arcs_[arcId].getEnd() != nullVertex) {
84 res <<
" > " << arcs_[arcId].getEnd();
91 std::stringstream res;
92 res <<
"n" << nodeId <<
"v" << nodes_[nodeId].getVertexIdentifier() <<
":[v";
93 const idSuperArc nbd = nodes_[nodeId].getNbDownArcs();
95 res <<
" " << nodes_[nodeId].getDownArc(i);
98 const idSuperArc nbu = nodes_[nodeId].getNbUpArcs();
100 res <<
" " << nodes_[nodeId].getUpArc(i);
107 std::stringstream res;
118 std::stringstream res;
119 res <<
"Segmentation: " << std::endl;
131#ifndef TTK_ENABLE_KAMIKAZE
133 this->
printErr(
"setNumberOfElmt not called before alloc in Graph");
143#ifdef TTK_ENABLE_FTR_VERT_STATS
152 fillVector<SegmInfo>(segmentation_,
SegmInfo{});
153 fillVector<valence>(
valUp_, -1);
155#ifdef TTK_ENABLE_FTR_VERT_STATS
156 fillVector<idVertex>(nbTouch_, 0);
157 fillVector<idSuperArc>(nbArcActif_, 0);
int printErr(const std::string &msg, const debug::LineMode &lineMode=debug::LineMode::NEW, std::ostream &stream=std::cerr) const
void reserve(const std::size_t &newSize, const bool fromOther=false)
idVertex nbElmt_
Allocation may depends on the number of vertices.
std::string printNode(const idNode nodeId) const
idSuperArc getNumberOfArcs() const
bool isArc(const idVertex v) const
std::string printArc(const idSuperArc arcId) const
std::string printVisit() const
std::vector< valence > valUp_
bool isNode(const idVertex v) const
idSuperArc getArcId(const idVertex v) const
std::vector< valence > valDown_
idNode getNodeId(const idVertex v) const
std::string print(const int verbosity) const
idSuperArc getNumberOfVisibleArcs() const
long unsigned int idSuperArc
SuperArc index in vect_superArcs_.
SimplexId idVertex
Vertex index in scalars_.
unsigned int idNode
Node index in vect_nodes_.