![]() |
ACloudViewer
3.9.4
A Modern Library for 3D Data Processing
|
Generic graph structure. More...
Public Types | |
| typedef std::set< unsigned > | IndexSet |
| Set of indexes. More... | |
Public Member Functions | |
| Graph () | |
| Default constructor. More... | |
| bool | reserve (unsigned vertexCount) |
| Reserves memory for graph. More... | |
| unsigned | vertexCount () const |
| Returns the number of vertices. More... | |
| size_t | edgeCount () const |
| Returns the number of edges. More... | |
| float | weight (unsigned v1, unsigned v2) const |
| void | addEdge (unsigned v1, unsigned v2, float weight=0.0f) |
| Adds or updates the edge (v1,v2) More... | |
| const IndexSet & | getVertexNeighbors (unsigned index) const |
| Returns the set of edges connected to a given vertex. More... | |
Protected Attributes | |
| std::map< Edge::Key, float > | m_edges |
| Graph edges. More... | |
| std::vector< IndexSet > | m_vertexNeighbors |
| Set of neighbors for each vertex. More... | |
Generic graph structure.
Definition at line 62 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
| typedef std::set<unsigned> Graph::IndexSet |
Set of indexes.
Definition at line 68 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
|
inline |
Default constructor.
Definition at line 65 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
|
inline |
Adds or updates the edge (v1,v2)
Definition at line 109 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References Edge::ConstructKey(), m_edges, m_vertexNeighbors, cloudViewer::core::make_pair(), and weight().
Referenced by ComputeMSTGraphAtLevel().
|
inline |
Returns the number of edges.
Definition at line 94 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References m_edges.
|
inline |
Returns the set of edges connected to a given vertex.
Definition at line 118 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References m_vertexNeighbors.
|
inline |
Reserves memory for graph.
Must be called before using the structure! Clears the structure as well.
Definition at line 74 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References m_edges, m_vertexNeighbors, and vertexCount().
Referenced by ccMinimumSpanningTreeForNormsDirection::OrientNormals().
|
inline |
Returns the number of vertices.
Definition at line 88 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References m_vertexNeighbors.
Referenced by reserve().
|
inline |
Returns the weight associated to an edge (if it exists - returns -1 otherwise)
Definition at line 98 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
References Edge::ConstructKey(), m_edges, and m_vertexNeighbors.
Referenced by addEdge().
Graph edges.
Definition at line 124 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
Referenced by addEdge(), edgeCount(), reserve(), and weight().
|
protected |
Set of neighbors for each vertex.
Definition at line 127 of file ecvMinimumSpanningTreeForNormsDirection.cpp.
Referenced by addEdge(), getVertexNeighbors(), reserve(), vertexCount(), and weight().