TTK
Loading...
Searching...
No Matches
AbstractTriangulation.cpp
Go to the documentation of this file.
2
3using namespace std;
4using namespace ttk;
5
7
8 setDebugMsgPrefix("AbstractTriangulation");
9 clear();
10}
11
13
15
37
38 boundaryEdges_.clear();
39 boundaryTriangles_.clear();
40 boundaryVertices_.clear();
41
42 tetraEdgeList_.clear();
43 cellNeighborList_.clear();
44 tetraTriangleList_.clear();
45
46 edgeLinkList_.clear();
47 edgeList_.clear();
48 edgeStarList_.clear();
49 edgeTriangleList_.clear();
50
51 triangleList_.clear();
52 triangleEdgeList_.clear();
53 triangleLinkList_.clear();
54 triangleStarList_.clear();
55
56 vertexEdgeList_.clear();
57 vertexLinkList_.clear();
58 vertexNeighborList_.clear();
59 vertexStarList_.clear();
60 vertexTriangleList_.clear();
61
62 return 0;
63}
64
65template <class itemType>
67 const vector<vector<itemType>> &table,
68 const string &tableName,
69 ostream &stream) const {
70
71 size_t localByteNumber = 0;
72 stringstream msg;
73
74 for(size_t i = 0; i < table.size(); i++) {
75 localByteNumber += table[i].size() * sizeof(itemType);
76 }
77
78 if((localByteNumber) && (tableName.length()) && (msg)) {
79 msg << tableName << ": " << localByteNumber << " bytes";
81 }
82
83 return localByteNumber;
84}
85
86size_t AbstractTriangulation::footprint(size_t size) const {
87
88 size += sizeof(*this);
89 stringstream msg;
90
91 size += tableFootprint<bool>(boundaryEdges_, "boundaryEdges_");
92
93 size += tableFootprint<bool>(boundaryTriangles_, "boundaryTriangles_");
94
95 size += tableFootprint<bool>(boundaryVertices_, "boundaryVertices_");
96
97 size += tableFootprint(tetraEdgeList_, "tetraEdgeList_");
98
99 size
100 += tableTableFootprint<SimplexId>(cellNeighborList_, "cellNeighborList_");
101
102 size += tableFootprint(tetraTriangleList_, "tetraTriangleList_");
103
104 size += tableTableFootprint<SimplexId>(edgeLinkList_, "edgeLinkList_");
105
106 size += tableFootprint(edgeList_, "edgeList_");
107
108 size += tableTableFootprint<SimplexId>(edgeStarList_, "edgeStarList_");
109
110 size
111 += tableTableFootprint<SimplexId>(edgeTriangleList_, "edgeTriangleList_");
112
113 size += tableFootprint(triangleList_, "triangleList_");
114
115 size += tableFootprint(triangleEdgeList_, "triangleEdgeList_");
116
117 size
118 += tableTableFootprint<SimplexId>(triangleLinkList_, "triangleLinkList_");
119
120 size
121 += tableTableFootprint<SimplexId>(triangleStarList_, "triangleStarList_");
122
123 size += tableTableFootprint<SimplexId>(vertexEdgeList_, "vertexEdgeList_");
124
125 size += tableTableFootprint<SimplexId>(vertexLinkList_, "vertexLinkList_");
126
127 size += tableTableFootprint<SimplexId>(
128 vertexNeighborList_, "vertexNeighborList_");
129
130 size += tableTableFootprint<SimplexId>(vertexStarList_, "vertexStarList_");
131
132 size += tableTableFootprint<SimplexId>(
133 vertexTriangleList_, "vertexTriangleList_");
134
135 size += tableTableFootprint(cellEdgeVector_, "cellEdgeVector_");
136 size += tableTableFootprint(cellTriangleVector_, "cellTriangleVector_");
137 size += tableTableFootprint(triangleEdgeVector_, "triangleEdgeVector_");
138
139 msg << "Total footprint: " << (size / 1024) / 1024 << " MB.";
140 printMsg(msg.str());
141
142 return size;
143}
std::vector< std::vector< SimplexId > > vertexStarList_
std::vector< std::array< SimplexId, 3 > > triangleList_
std::vector< std::array< SimplexId, 4 > > tetraTriangleList_
std::vector< std::vector< SimplexId > > triangleLinkList_
std::vector< std::vector< SimplexId > > vertexNeighborList_
std::vector< std::vector< SimplexId > > vertexLinkList_
std::vector< std::vector< SimplexId > > edgeLinkList_
std::vector< std::vector< SimplexId > > vertexEdgeList_
std::vector< std::vector< SimplexId > > triangleEdgeVector_
std::vector< std::vector< SimplexId > > triangleStarList_
std::vector< std::vector< SimplexId > > cellNeighborList_
std::vector< std::array< SimplexId, 2 > > edgeList_
std::vector< std::array< SimplexId, 6 > > tetraEdgeList_
std::vector< std::vector< SimplexId > > edgeStarList_
size_t tableFootprint(const std::vector< itemType > &table, const std::string &tableName="", std::ostream &stream=std::cout) const
std::vector< std::vector< SimplexId > > vertexTriangleList_
std::vector< std::vector< SimplexId > > cellEdgeVector_
size_t footprint(size_t size=0) const
std::vector< std::vector< SimplexId > > cellTriangleVector_
size_t tableTableFootprint(const std::vector< std::vector< itemType > > &table, const std::string &tableName="", std::ostream &stream=std::cout) const
std::vector< std::array< SimplexId, 3 > > triangleEdgeList_
std::vector< std::vector< SimplexId > > edgeTriangleList_
void setDebugMsgPrefix(const std::string &prefix)
Definition Debug.h:364
The Topology ToolKit.
printMsg(debug::output::BOLD+" | | | | | . \\ | | (__| | / __/| |_| / __/|__ _|"+debug::output::ENDCOLOR, debug::Priority::PERFORMANCE, debug::LineMode::NEW, stream)