|
MorphoGraphX
2.0-1-227
|
#include <VVGraph.hpp>
Classes | |
| struct | neighbor_t |
| Structure maintaining the data for a single neighbor. More... | |
| struct | NeighborhoodPair |
| struct | search_result_t |
| Type of the result of the search for a vertex in a neighborhood. More... | |
| struct | single_neighborhood_t |
| Type of the neighborhood of a vertex. More... | |
Public Types | |
Iterators | |
| typedef SelectMemberPointerIterator< typename neighborhood_t::iterator, const vertex_t, &NeighborhoodPair::vertex > | iterator |
| Iterator on the vertexes. More... | |
| typedef SelectMemberPointerIterator< typename neighborhood_t::const_iterator, const vertex_t, &NeighborhoodPair::vertex > | const_iterator |
| Constant iterator on the vertexes. More... | |
| typedef SelectMemberIterator< typename edge_list_t::iterator, vertex_t, &neighbor_t::target > | neighbor_iterator |
| Iterator on the neighbors of a vertex. More... | |
| typedef std::pair< neighbor_iterator, neighbor_iterator > | neighbor_iterator_pair |
| Range of the neighbors of a vertex. More... | |
| typedef CircIterator< neighbor_iterator > | circ_neighbor_iterator |
| Iterator used to iterate over the neighbors, but specifying the starting point. More... | |
| typedef std::pair< circ_neighbor_iterator, circ_neighbor_iterator > | circ_neighbor_iterator_pair |
| Range of circular iterators. More... | |
| typedef SelectMemberIterator< typename edge_list_t::const_iterator, const vertex_t, &neighbor_t::target > | const_neighbor_iterator |
| Constant iterator on the neighbors of a vertex. More... | |
| typedef std::pair< const_neighbor_iterator, const_neighbor_iterator > | const_neighbor_iterator_pair |
| Constant range of the neighbors of a vertex. More... | |
| typedef CircIterator< const_neighbor_iterator > | const_circ_neighbor_iterator |
| Iterator used to iterate over the neighbors, but spcifying the starting point. More... | |
| typedef std::pair< const_circ_neighbor_iterator, const_circ_neighbor_iterator > | const_circ_neighbor_iterator_pair |
| Range of circular iterators. More... | |
Public Member Functions | |
| template<typename VertexContainer > | |
| VVGraph< VertexContent, EdgeContent > | subgraph (const VertexContainer &verts) const |
Vertex set editing methods | |
| size_type | erase (const vertex_t &v) |
| Remove a vertex from the graph. More... | |
| bool | insert (const vertex_t &v, bool checkUnique=true) |
| Insert a new vertex in the graph. More... | |
Vertex set lookup methods | |
| const vertex_t & | any () const |
| Return a vertex from the graph. More... | |
| const vertex_t & | operator[] (size_type idx) const |
Return the element of index idx. More... | |
| bool | contains (const vertex_t &v) const |
Test if v is in the graph. More... | |
| const vertex_t & | reference (vertex_t v) const |
| Get a reference on the vertex in the graph. More... | |
| size_type | size () const |
| Return the number of vertexes on the graph. More... | |
| bool | empty () const |
| Test if there is any vertex in the graph. More... | |
| bool | isModified () const |
| Test if vertex list has been modified. More... | |
| void | setModified (bool _modified) |
| Set modified status. More... | |
Neighborhood lookup methods | |
| const vertex_t & | anyIn (const vertex_t &v) const |
Return a vertex in the neighborhood of v. More... | |
| size_type | valence (const vertex_t &v) const |
Returns the number of neighbors of v. More... | |
| bool | empty (const vertex_t &v) const |
| Test if a vertex has a neighbor. More... | |
| const vertex_t & | nextTo (const vertex_t &v, const vertex_t &neighbor, unsigned int n=1) const |
Returns the nth vertex after neighbor in the neighborhood of v. More... | |
| const vertex_t & | prevTo (const vertex_t &v, const vertex_t &ref, unsigned int n=1) const |
| Returns the nth vertex before ref in the neighborhood of v. More... | |
| edge_t | edge (const vertex_t &src, const vertex_t &tgt) |
Returns the edge from src to tgt. More... | |
| const_edge_t | edge (const vertex_t &src, const vertex_t &tgt) const |
Returns the edge from src to tgt. More... | |
| const_neighbor_iterator_pair | neighbors (const vertex_t &v) const |
Return the constant range of neighbors of v. More... | |
| neighbor_iterator_pair | neighbors (const vertex_t &v) |
Return the range of neighbors of v. More... | |
| circ_neighbor_iterator_pair | neighbors (const vertex_t &v, const vertex_t &n) |
Return the range of neighbors of v, starting at n. More... | |
| const_circ_neighbor_iterator_pair | neighbors (const vertex_t &v, const vertex_t &n) const |
Return the range of neighbors of v, starting at n. More... | |
| const vertex_t & | source (const edge_t &edge) const |
| Return the source vertex of the edge. More... | |
| const vertex_t & | target (const edge_t &edge) const |
| Return the target vertex of the edge. More... | |
Neighborhood editing methods | |
| size_type | eraseEdge (const vertex_t &src, const vertex_t &tgt) |
Erase the edge from src to tgt. More... | |
| edge_t | replace (const vertex_t &v, const vertex_t &neighbor, const vertex_t &new_neighbor) |
| Replace a vertex by another in a neighborhood. More... | |
| edge_t | spliceAfter (const vertex_t &v, const vertex_t &neighbor, const vertex_t &new_neighbor) |
| Insert neighbor in the neighborhood of v after reference. More... | |
| edge_t | spliceBefore (const vertex_t &v, const vertex_t &neighbor, const vertex_t &new_neighbor) |
| Insert neighbor in the neighborhood of v before reference. More... | |
| edge_t | insertEdge (const vertex_t &src, const vertex_t &tgt) |
| Insert a new edge in the graph, without ordering. More... | |
| bool | eraseAllEdges (const vertex_t &v) |
| Clear the neighborhood of a vertex. More... | |
| bool | clear (const vertex_t &v) |
| Clear the outgoing edges of a vertex. More... | |
| bool | uniqueTri (const vertex_t &v, const vertex_t &n, const vertex_t &m) const |
| Test for unique triangle. More... | |
| bool | uniqueLine (const vertex_t &v, const vertex_t &n) const |
| Test for unique line. More... | |
Whole structure methods | |
| VVGraph & | operator= (const VVGraph &other) |
| Copy the graph into another graph. More... | |
| VVGraph & | reverse () |
| Reverse the order of all the neighbors. More... | |
| void | swap (VVGraph &other) |
| Swap the content of both graphs. More... | |
| bool | operator== (const VVGraph &other) const |
| Test equality for the graphs. More... | |
| void | clear () |
| Clear the graph. More... | |
| void | eraseAllEdges () |
| Clear all the edges in the graph. More... | |
| template<typename VertexContainer > | |
| VVGraph | subgraph (const VertexContainer &vertexes) const |
Extract the subgraph containing the vertexes. More... | |
Smart pointer types | |
| typedef Vertex< VertexContent > | vertex_t |
| Smart pointer on a vertex. More... | |
| typedef Edge< EdgeContent > | edge_t |
| Weak pointer on an edge. More... | |
| typedef Edge< const EdgeContent > | const_edge_t |
| Weak pointer on a constant edge. More... | |
| typedef vertex_t | value_type |
| Type of the value of the graph as standard container. More... | |
| typedef std::vector< NeighborhoodPair * > | neighborhood_t |
| Type of the list of vertexes, together with the neighborhood. More... | |
| typedef std::unordered_map< vertex_t, NeighborhoodPair * > | lookup_t |
| Type of the fast-search map. More... | |
| typedef neighborhood_t::value_type | neighborhood_value_type |
| Shortcut for the value_type of the neighborhood. More... | |
| typedef neighborhood_t::size_type | size_type |
| Type of a size. More... | |
| typedef neighbor_t::edge_list_t | edge_list_t |
| Type of the list of outgoing neighbors. More... | |
| VVGraph () | |
| Default constructor. More... | |
| VVGraph (const VVGraph ©) | |
| Copy constructor. More... | |
| ~VVGraph () | |
| Destructor. More... | |
| template<typename Iterator > | |
| VVGraph (Iterator begin, Iterator end, bool checkUnique=true) | |
| Construct from an existing list of vertices. More... | |
| template<typename Container > | |
| VVGraph (const Container &c, bool checkUnique=true) | |
| Construct from an existing list of vertices. More... | |
STL compatibility methods | |
| typedef edge_list_t::iterator | int_neighbor_iterator |
| Iterator on the outgoing edges. More... | |
| typedef edge_list_t::const_iterator | int_const_neighbor_iterator |
| Constant iterator on the outgoing edges. More... | |
| typedef search_result_t< single_neighborhood_t, int_neighbor_iterator > | neighbor_found_t |
| Result of a search in the neighborhood. More... | |
| typedef search_result_t< const single_neighborhood_t, int_const_neighbor_iterator > | const_neighbor_found_t |
| Constant result of a search in the neighborhood. More... | |
| neighborhood_t | neighborhood |
| Main data structure containing everything. More... | |
| lookup_t | lookup |
| Hash map to optimise look-up. More... | |
| bool | modified |
| If true, the vertex list has been modified. More... | |
| void | erase (iterator pos) |
Erase element at position pos. More... | |
| size_type | eraseEdge (const vertex_t &v, neighbor_iterator pos) |
| Erase the edge pointed to by the iterator. More... | |
| size_type | eraseEdge (const vertex_t &v, circ_neighbor_iterator pos) |
| Erase the edge pointed to by the iterator. More... | |
| template<typename Iterator > | |
| void | insert (Iterator first, Iterator last, bool checkUnique=true) |
| Insert all the vertexes from first to last-1 in the graph. More... | |
| template<typename Iterator > | |
| void | insert (const std::pair< Iterator, Iterator > &range, bool checkUnique=true) |
| Insert all the vertexes from range.first to range.last-1 in the graph. More... | |
| iterator | begin () |
| Returns an iterator on the beginning of the set of vertexes of the graph. More... | |
| iterator | end () |
| Returns an iterator on the end of the set of vertexes of the graph. More... | |
| const_iterator | begin () const |
| Returns an iterator on the beginning of the set of vertexes of the graph. More... | |
| const_iterator | end () const |
| Returns an iterator on the end of the set of vertexes of the graph. More... | |
| size_type | count (const vertex_t &v) const |
Count the number of vertexes v in the graph (can be 0 or 1 only) More... | |
| neighbor_iterator | findIn (const vertex_t &v, const vertex_t &n) |
Find the vertex n in the neighborhood of v. More... | |
| const_neighbor_iterator | findIn (const vertex_t &v, const vertex_t &n) const |
Find the vertex n in the neighborhood of v. More... | |
| void | eraseAllEdges (iterator it) |
| Clear the neighborhood of a vertex. More... | |
| void | clear (iterator it) |
| Clear the outgoing edges of a vertex. More... | |
| void | reserve (size_type s) |
| Reserve space for more vertices. More... | |
| void | eraseAllEdges (NeighborhoodPair *it) |
| NeighborhoodPair * | findVertex (const vertex_t &v) |
| Find a vertex in the graph and returns the iterator on it. More... | |
| const NeighborhoodPair * | findVertex (const vertex_t &v) const |
| Constant version of findVertex(const vertex_t&) More... | |
| neighborhood_t::iterator | findIterator (const NeighborhoodPair *np) |
| Find the iterator for a given neighborhood pair. More... | |
| neighborhood_t::const_iterator | findIterator (const NeighborhoodPair *np) const |
| neighbor_found_t | findInVertex (const vertex_t &v, const vertex_t &neighbor) |
| Find a vertex neighbor in the neighborhood of v. More... | |
| const_neighbor_found_t | findInVertex (const vertex_t &v, const vertex_t &neighbor) const |
| Constant version of findInVertex(const vertex_t&, const vertex_t&) More... | |
Class representing a VV graph.
A VV graph is a graph rotation system, that is, a graph where the neighbors of vertices are stored in a circular order.
VertexContent is the type used to hold the vertex data.
EdgeContent is the type used to hold the edge data. If no type is specified for EdgeContent, then an empty structure is used.
Definition at line 162 of file VVGraph.hpp.
| typedef CircIterator<neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::circ_neighbor_iterator |
Iterator used to iterate over the neighbors, but specifying the starting point.
Definition at line 390 of file VVGraph.hpp.
| typedef std::pair<circ_neighbor_iterator, circ_neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::circ_neighbor_iterator_pair |
Range of circular iterators.
Definition at line 395 of file VVGraph.hpp.
| typedef CircIterator<const_neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::const_circ_neighbor_iterator |
Iterator used to iterate over the neighbors, but spcifying the starting point.
Definition at line 415 of file VVGraph.hpp.
| typedef std::pair<const_circ_neighbor_iterator, const_circ_neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::const_circ_neighbor_iterator_pair |
Range of circular iterators.
Definition at line 421 of file VVGraph.hpp.
| typedef Edge<const EdgeContent> mgx::VVGraph< VertexContent, EdgeContent >::const_edge_t |
Weak pointer on a constant edge.
Definition at line 178 of file VVGraph.hpp.
| typedef SelectMemberPointerIterator<typename neighborhood_t::const_iterator, const vertex_t, &NeighborhoodPair::vertex> mgx::VVGraph< VertexContent, EdgeContent >::const_iterator |
Constant iterator on the vertexes.
Definition at line 373 of file VVGraph.hpp.
|
protected |
Constant result of a search in the neighborhood.
Definition at line 1293 of file VVGraph.hpp.
| typedef SelectMemberIterator<typename edge_list_t::const_iterator, const vertex_t, &neighbor_t::target> mgx::VVGraph< VertexContent, EdgeContent >::const_neighbor_iterator |
Constant iterator on the neighbors of a vertex.
Definition at line 402 of file VVGraph.hpp.
| typedef std::pair<const_neighbor_iterator, const_neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::const_neighbor_iterator_pair |
Constant range of the neighbors of a vertex.
The first element of the pair is a constant iterator on the beginning of the range, the second element is the past-the-end constant iterator.
Definition at line 409 of file VVGraph.hpp.
|
protected |
Type of the list of outgoing neighbors.
Definition at line 291 of file VVGraph.hpp.
| typedef Edge<EdgeContent> mgx::VVGraph< VertexContent, EdgeContent >::edge_t |
Weak pointer on an edge.
Definition at line 174 of file VVGraph.hpp.
|
protected |
Constant iterator on the outgoing edges.
Definition at line 1283 of file VVGraph.hpp.
|
protected |
Iterator on the outgoing edges.
Definition at line 1279 of file VVGraph.hpp.
| typedef SelectMemberPointerIterator<typename neighborhood_t::iterator, const vertex_t, &NeighborhoodPair::vertex> mgx::VVGraph< VertexContent, EdgeContent >::iterator |
Iterator on the vertexes.
Definition at line 368 of file VVGraph.hpp.
| typedef std::unordered_map<vertex_t, NeighborhoodPair*> mgx::VVGraph< VertexContent, EdgeContent >::lookup_t |
Type of the fast-search map.
Definition at line 350 of file VVGraph.hpp.
|
protected |
Result of a search in the neighborhood.
Definition at line 1288 of file VVGraph.hpp.
| typedef SelectMemberIterator<typename edge_list_t::iterator, vertex_t, &neighbor_t::target> mgx::VVGraph< VertexContent, EdgeContent >::neighbor_iterator |
Iterator on the neighbors of a vertex.
Definition at line 378 of file VVGraph.hpp.
| typedef std::pair<neighbor_iterator, neighbor_iterator> mgx::VVGraph< VertexContent, EdgeContent >::neighbor_iterator_pair |
Range of the neighbors of a vertex.
The first element of the pair is an iterator on the beginning of the range, the second element is the past-the-end iterator.
Definition at line 384 of file VVGraph.hpp.
| typedef std::vector<NeighborhoodPair*> mgx::VVGraph< VertexContent, EdgeContent >::neighborhood_t |
Type of the list of vertexes, together with the neighborhood.
Definition at line 345 of file VVGraph.hpp.
| typedef neighborhood_t::value_type mgx::VVGraph< VertexContent, EdgeContent >::neighborhood_value_type |
Shortcut for the value_type of the neighborhood.
Definition at line 355 of file VVGraph.hpp.
| typedef neighborhood_t::size_type mgx::VVGraph< VertexContent, EdgeContent >::size_type |
Type of a size.
Definition at line 360 of file VVGraph.hpp.
| typedef vertex_t mgx::VVGraph< VertexContent, EdgeContent >::value_type |
Type of the value of the graph as standard container.
Definition at line 184 of file VVGraph.hpp.
| typedef Vertex<VertexContent> mgx::VVGraph< VertexContent, EdgeContent >::vertex_t |
Smart pointer on a vertex.
Definition at line 170 of file VVGraph.hpp.
|
inline |
| mgx::VVGraph< VertexContent, EdgeContent >::VVGraph | ( | const VVGraph< VertexContent, EdgeContent > & | copy | ) |
Copy constructor.
Definition at line 1948 of file VVGraph.hpp.
|
inline |
Destructor.
Definition at line 201 of file VVGraph.hpp.
|
inline |
Construct from an existing list of vertices.
| checkUnique | If false, there must be not be duplicated vertex in the sequence |
Definition at line 217 of file VVGraph.hpp.
|
inline |
Construct from an existing list of vertices.
| checkUnique | If false, there must be not be duplicated vertex in the sequence |
Definition at line 227 of file VVGraph.hpp.
| const VVGraph< VertexContent, EdgeContent >::vertex_t & mgx::VVGraph< VertexContent, EdgeContent >::any |
Return a vertex from the graph.
Example:
Definition at line 1516 of file VVGraph.hpp.
| const VVGraph< VertexContent, EdgeContent >::vertex_t & mgx::VVGraph< VertexContent, EdgeContent >::anyIn | ( | const vertex_t & | v | ) | const |
Return a vertex in the neighborhood of v.
v, or a null vertex if v is not in the graph or v has no neighborhood.Example:
Definition at line 1536 of file VVGraph.hpp.
|
inline |
Returns an iterator on the beginning of the set of vertexes of the graph.
Definition at line 1155 of file VVGraph.hpp.
|
inline |
Returns an iterator on the beginning of the set of vertexes of the graph.
Definition at line 1168 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::clear |
Clear the graph.
Definition at line 1350 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::clear | ( | const vertex_t & | v | ) |
Clear the outgoing edges of a vertex.
Example:
Definition at line 1441 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::clear | ( | iterator | it | ) |
Clear the outgoing edges of a vertex.
Definition at line 1453 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::contains | ( | const vertex_t & | v | ) | const |
Test if v is in the graph.
true is v is in the graph.Example:
Definition at line 1703 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::count | ( | const vertex_t & | v | ) | const |
Count the number of vertexes v in the graph (can be 0 or 1 only)
Definition at line 1463 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::edge_t mgx::VVGraph< VertexContent, EdgeContent >::edge | ( | const vertex_t & | src, |
| const vertex_t & | tgt | ||
| ) |
Returns the edge from src to tgt.
If the edge does not exists, returns a null edge.
Example:
Definition at line 1766 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::const_edge_t mgx::VVGraph< VertexContent, EdgeContent >::edge | ( | const vertex_t & | src, |
| const vertex_t & | tgt | ||
| ) | const |
Returns the edge from src to tgt.
If the edge does not exists, returns a null edge.
Example:
Definition at line 1777 of file VVGraph.hpp.
|
inline |
Test if there is any vertex in the graph.
Definition at line 560 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::empty | ( | const vertex_t & | v | ) | const |
Test if a vertex has a neighbor.
Returns false if it does. If a vertex is not in the graph, it is considered as having no neighbor. In the same way, the null vertex has no neighbors.
Example:
Definition at line 1562 of file VVGraph.hpp.
|
inline |
Returns an iterator on the end of the set of vertexes of the graph.
Definition at line 1161 of file VVGraph.hpp.
|
inline |
Returns an iterator on the end of the set of vertexes of the graph.
Definition at line 1174 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::erase | ( | const vertex_t & | v | ) |
Remove a vertex from the graph.
| v | vertex to erase |
Example:
Definition at line 1379 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::erase | ( | iterator | pos | ) |
Erase element at position pos.
Definition at line 1366 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::eraseAllEdges |
Clear all the edges in the graph.
Example:
Definition at line 1396 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::eraseAllEdges | ( | const vertex_t & | v | ) |
Clear the neighborhood of a vertex.
All edges, to and from v will be erased.
Example:
Definition at line 1407 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::eraseAllEdges | ( | iterator | it | ) |
Clear the neighborhood of a vertex.
All edges, to and from *it will be erased.
Definition at line 1434 of file VVGraph.hpp.
|
protected |
Definition at line 1419 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::eraseEdge | ( | const vertex_t & | src, |
| const vertex_t & | tgt | ||
| ) |
Erase the edge from src to tgt.
Example:
Definition at line 1691 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::eraseEdge | ( | const vertex_t & | v, |
| circ_neighbor_iterator | pos | ||
| ) |
Erase the edge pointed to by the iterator.
Definition at line 1683 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::eraseEdge | ( | const vertex_t & | v, |
| neighbor_iterator | pos | ||
| ) |
Erase the edge pointed to by the iterator.
Definition at line 1675 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::neighbor_iterator mgx::VVGraph< VertexContent, EdgeContent >::findIn | ( | const vertex_t & | v, |
| const vertex_t & | n | ||
| ) |
Find the vertex n in the neighborhood of v.
n in the neighborhood of v, if foundn is not found in v Definition at line 1653 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::const_neighbor_iterator mgx::VVGraph< VertexContent, EdgeContent >::findIn | ( | const vertex_t & | v, |
| const vertex_t & | n | ||
| ) | const |
Find the vertex n in the neighborhood of v.
n in the neighborhood of v, if foundn is not found in v Definition at line 1664 of file VVGraph.hpp.
|
protected |
Find a vertex neighbor in the neighborhood of v.
If 'v' is in the graph and 'neighbor' is in its neighborhood, the result is convertible to true, 'neighborhood' points toward the neighborhood structure and 'it' points toward the neighbor.
If 'v' is in the graph, but 'neighbor' is not in the neighborhood, the result is convertible to false, 'neighborhood' points toward the neighborhood structure and 'it' is neighborhood->edges.end().
If v is not in the graph, the result is convertible to false and the address of the stored neighborhood is 0.
Definition at line 1613 of file VVGraph.hpp.
|
protected |
Constant version of findInVertex(const vertex_t&, const vertex_t&)
Definition at line 1633 of file VVGraph.hpp.
|
protected |
Find the iterator for a given neighborhood pair.
Definition at line 1575 of file VVGraph.hpp.
|
protected |
Definition at line 1583 of file VVGraph.hpp.
|
protected |
Find a vertex in the graph and returns the iterator on it.
Definition at line 1591 of file VVGraph.hpp.
|
protected |
Constant version of findVertex(const vertex_t&)
Definition at line 1602 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::insert | ( | const std::pair< Iterator, Iterator > & | range, |
| bool | checkUnique = true |
||
| ) |
Insert all the vertexes from range.first to range.last-1 in the graph.
Definition at line 1490 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::insert | ( | const vertex_t & | v, |
| bool | checkUnique = true |
||
| ) |
Insert a new vertex in the graph.
Example:
Definition at line 1470 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::insert | ( | Iterator | first, |
| Iterator | last, | ||
| bool | checkUnique = true |
||
| ) |
Insert all the vertexes from first to last-1 in the graph.
Definition at line 1498 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::edge_t mgx::VVGraph< VertexContent, EdgeContent >::insertEdge | ( | const vertex_t & | src, |
| const vertex_t & | tgt | ||
| ) |
Insert a new edge in the graph, without ordering.
If new_neighbor is already in the neighborhood of v, the insertion fails.
Example:
Definition at line 1823 of file VVGraph.hpp.
|
inline |
Test if vertex list has been modified.
Definition at line 568 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::neighbor_iterator_pair mgx::VVGraph< VertexContent, EdgeContent >::neighbors | ( | const vertex_t & | v | ) |
| VVGraph< VertexContent, EdgeContent >::const_neighbor_iterator_pair mgx::VVGraph< VertexContent, EdgeContent >::neighbors | ( | const vertex_t & | v | ) | const |
| VVGraph< VertexContent, EdgeContent >::circ_neighbor_iterator_pair mgx::VVGraph< VertexContent, EdgeContent >::neighbors | ( | const vertex_t & | v, |
| const vertex_t & | n | ||
| ) |
| VVGraph< VertexContent, EdgeContent >::const_circ_neighbor_iterator_pair mgx::VVGraph< VertexContent, EdgeContent >::neighbors | ( | const vertex_t & | v, |
| const vertex_t & | n | ||
| ) | const |
| const VVGraph< VertexContent, EdgeContent >::vertex_t & mgx::VVGraph< VertexContent, EdgeContent >::nextTo | ( | const vertex_t & | v, |
| const vertex_t & | neighbor, | ||
| unsigned int | n = 1 |
||
| ) | const |
Returns the nth vertex after neighbor in the neighborhood of v.
Example:
Definition at line 1730 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent > & mgx::VVGraph< VertexContent, EdgeContent >::operator= | ( | const VVGraph< VertexContent, EdgeContent > & | other | ) |
Copy the graph into another graph.
Definition at line 2007 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::operator== | ( | const VVGraph< VertexContent, EdgeContent > & | other | ) | const |
Test equality for the graphs.
Two graphs are equal if they shared the sames vertices and their neighborhood are equivalent.
Definition at line 1955 of file VVGraph.hpp.
| const VVGraph< VertexContent, EdgeContent >::vertex_t & mgx::VVGraph< VertexContent, EdgeContent >::operator[] | ( | size_type | idx | ) | const |
Return the element of index idx.
idx position after the first one (using iterators)Example:
This construct is useful is case you need to refer to your vertices by 32bits numbers. It is true if you use selection with OpenGL for example.
Definition at line 1526 of file VVGraph.hpp.
| const VVGraph< VertexContent, EdgeContent >::vertex_t & mgx::VVGraph< VertexContent, EdgeContent >::prevTo | ( | const vertex_t & | v, |
| const vertex_t & | ref, | ||
| unsigned int | n = 1 |
||
| ) | const |
Returns the nth vertex before ref in the neighborhood of v.
If ref is not in the neighborhood of v, return a null vertex.
Example:
Definition at line 1748 of file VVGraph.hpp.
|
inline |
Get a reference on the vertex in the graph.
If the vertex does not exist in the graph, the function returns a null vertex.
Example:
Definition at line 541 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::edge_t mgx::VVGraph< VertexContent, EdgeContent >::replace | ( | const vertex_t & | v, |
| const vertex_t & | neighbor, | ||
| const vertex_t & | new_neighbor | ||
| ) |
Replace a vertex by another in a neighborhood.
| [in] | v | Vertex whose neighborhood is changed. |
| [in] | neighbor | Vertex to replace |
| [in] | new_neighbor | Vertex replacing neighbor |
If new_neighbor is already in the neighborhood of v, then the operation fails and nothing is changed.
v and new_neighbor or a null edge if anything goes wrong.Example:
Definition at line 1711 of file VVGraph.hpp.
|
inline |
Reserve space for more vertices.
Definition at line 1219 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent > & mgx::VVGraph< VertexContent, EdgeContent >::reverse |
Reverse the order of all the neighbors.
Definition at line 1996 of file VVGraph.hpp.
|
inline |
Set modified status.
Definition at line 576 of file VVGraph.hpp.
|
inline |
Return the number of vertexes on the graph.
Definition at line 552 of file VVGraph.hpp.
|
inline |
| VVGraph< VertexContent, EdgeContent >::edge_t mgx::VVGraph< VertexContent, EdgeContent >::spliceAfter | ( | const vertex_t & | v, |
| const vertex_t & | neighbor, | ||
| const vertex_t & | new_neighbor | ||
| ) |
Insert neighbor in the neighborhood of v after reference.
If new_neighbor is already in the neighborhood of v, the insertion fails.
Example:
Definition at line 1788 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::edge_t mgx::VVGraph< VertexContent, EdgeContent >::spliceBefore | ( | const vertex_t & | v, |
| const vertex_t & | neighbor, | ||
| const vertex_t & | new_neighbor | ||
| ) |
Insert neighbor in the neighborhood of v before reference.
If new_neighbor is already in the neighborhood of v, the , checkUnique = trueinsertion fails.
Example:
Definition at line 1806 of file VVGraph.hpp.
| VVGraph mgx::VVGraph< VertexContent, EdgeContent >::subgraph | ( | const VertexContainer & | vertexes | ) | const |
Extract the subgraph containing the vertexes.
The subgraph is the set of vertexes and the edges whose source and target are in the extracted vertexes.
Example:
| VVGraph<VertexContent, EdgeContent> mgx::VVGraph< VertexContent, EdgeContent >::subgraph | ( | const VertexContainer & | verts | ) | const |
Definition at line 1911 of file VVGraph.hpp.
| void mgx::VVGraph< VertexContent, EdgeContent >::swap | ( | VVGraph< VertexContent, EdgeContent > & | other | ) |
Swap the content of both graphs.
Definition at line 2028 of file VVGraph.hpp.
|
inline |
| bool mgx::VVGraph< VertexContent, EdgeContent >::uniqueLine | ( | const vertex_t & | v, |
| const vertex_t & | n | ||
| ) | const |
Test for unique line.
Only true for one of (v,n) or (n,v). Only use in graphs that always have edges in both directions.
Definition at line 2046 of file VVGraph.hpp.
| bool mgx::VVGraph< VertexContent, EdgeContent >::uniqueTri | ( | const vertex_t & | v, |
| const vertex_t & | n, | ||
| const vertex_t & | m | ||
| ) | const |
Test for unique triangle.
Only true for one of (v,n,m) (n,m,v) or (m,v,n). Only for use with triangle meshes.
Definition at line 2036 of file VVGraph.hpp.
| VVGraph< VertexContent, EdgeContent >::size_type mgx::VVGraph< VertexContent, EdgeContent >::valence | ( | const vertex_t & | v | ) | const |
Returns the number of neighbors of v.
If v is not in the graph, the behavior is undefined.
Example:
Definition at line 1550 of file VVGraph.hpp.
|
protected |
Hash map to optimise look-up.
Definition at line 1340 of file VVGraph.hpp.
|
protected |
If true, the vertex list has been modified.
Definition at line 1345 of file VVGraph.hpp.
|
protected |
Main data structure containing everything.
Definition at line 1335 of file VVGraph.hpp.
1.8.17