MCPcopy Create free account
hub / github.com/Notgnoshi/generative / get_edge_pairs

Method get_edge_pairs

generative/noding/geometry-graph.cpp:51–69  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

49}
50
51std::vector<std::pair<const GeometryGraph::Node&, const GeometryGraph::Node&>>
52GeometryGraph::get_edge_pairs() const
53{
54 std::vector<std::pair<const GeometryGraph::Node&, const GeometryGraph::Node&>> pairs;
55 // A heuristic.
56 pairs.reserve(m_nodes.size() * 2);
57 for (const auto& node : m_nodes)
58 {
59 for (const auto adj : node.adjacencies)
60 {
61 // Only print each edge once.
62 if (node.index < adj)
63 {
64 pairs.emplace_back(node, m_nodes[adj]);
65 }
66 }
67 }
68 return pairs;
69}
70
71std::vector<std::unique_ptr<geos::geom::LineString>> GeometryGraph::get_edges() const
72{

Callers 5

get_edgesMethod · 0.95
TESTFunction · 0.80
TESTFunction · 0.80
edgesMethod · 0.80
writeMethod · 0.80

Calls

no outgoing calls

Tested by 2

TESTFunction · 0.64
TESTFunction · 0.64