MCPcopy Create free account
hub / github.com/PeterFWS/Structure-PLP-SLAM / Graph

Method Graph

src/PLPSLAM/solve/GCRANSAC/pearl/graph.cpp:9–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8template <typename captype, typename tcaptype, typename flowtype>
9Graph<captype, tcaptype, flowtype>::Graph(int node_num_max, int edge_num_max, void (*err_function)(const char *))
10 : node_num(0),
11 nodeptr_block(NULL),
12 error_function(err_function)
13{
14 if (node_num_max < 16)
15 node_num_max = 16;
16 if (edge_num_max < 16)
17 edge_num_max = 16;
18
19 nodes = (node *)malloc(node_num_max * sizeof(node));
20 arcs = (arc *)malloc(2 * edge_num_max * sizeof(arc));
21 if (!nodes || !arcs)
22 {
23 if (error_function)
24 (*error_function)("Not enough memory!");
25 exit(1);
26 }
27
28 node_last = nodes;
29 node_max = nodes + node_num_max;
30 arc_last = arcs;
31 arc_max = arcs + 2 * edge_num_max;
32
33 maxflow_iteration = 0;
34 flow = 0;
35}
36
37template <typename captype, typename tcaptype, typename flowtype>
38Graph<captype, tcaptype, flowtype>::~Graph()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected