#include <vertex.hh>
Public Types | |
typedef Vertex< void > | Category |
Object category. | |
typedef Site< void > | category |
typedef vertex< G > | exact_t |
typedef G | graph_t |
Graph associated type. | |
typedef vertex_id_t | id_t |
The vertex type id. | |
typedef vertex_id_t::value_t | id_value_t |
The underlying type used to store vertex ids. | |
Public Member Functions | |
void | change_graph (const G &g) |
Change the parent graph of that vertex. | |
edge< G > | edge_with (const vertex< G > &v_id) const |
Returns true if this vertex has an edge with the given vertex. | |
const G & | graph () const |
Returns the graph pointer this vertex belongs to. | |
const vertex_id_t & | id () const |
Returns the vertex id. | |
void | invalidate () |
Invalidate that vertex. | |
bool | is_valid () const |
Check whether the vertex is still part of the graph. | |
edge_id_t | ith_nbh_edge (unsigned i) const |
Returns the ith edge starting from this vertex. | |
vertex_id_t | ith_nbh_vertex (unsigned i) const |
Returns the ith vertex adjacent to this vertex. | |
unsigned | nmax_nbh_edges () const |
Returns the number max of edges starting from this vertex. | |
unsigned | nmax_nbh_vertices () const |
Returns the number max of vertices adjacent to this vertex. | |
operator vertex_id_t () const | |
Conversion to the vertex id. | |
vertex_id_t | other (const edge_id_t &id_e) const |
Returns the other vertex located on edge id_e . | |
void | update_id (const vertex_id_t &id) |
Update the vertex id. | |
vertex () | |
Constructors. | |
vertex (const G &g) | |
vertex (const G &g, const id_value_t &id) | |
vertex (const G &g, const vertex_id_t &id) | |
Protected Attributes | |
G | g_ |
vertex_id_t | id_ |
Vertex of a graph G
.
typedef Vertex<void> mln::util::vertex< G >::Category |
Object category.
Reimplemented from mln::Object< vertex< G > >.
typedef vertex< G > mln::Object< vertex< G > >::exact_t [inherited] |
typedef G mln::util::vertex< G >::graph_t |
Graph associated type.
typedef vertex_id_t mln::util::vertex< G >::id_t |
The vertex type id.
typedef vertex_id_t::value_t mln::util::vertex< G >::id_value_t |
The underlying type used to store vertex ids.
mln::util::vertex< G >::vertex | ( | ) | [inline] |
Constructors.
References mln::util::vertex< G >::invalidate().
mln::util::vertex< G >::vertex | ( | const G & | g | ) | [inline, explicit] |
References mln::util::vertex< G >::invalidate().
mln::util::vertex< G >::vertex | ( | const G & | g, | |
const id_value_t & | id | |||
) | [inline] |
References mln::util::vertex< G >::is_valid().
mln::util::vertex< G >::vertex | ( | const G & | g, | |
const vertex_id_t & | id | |||
) | [inline] |
References mln::util::vertex< G >::is_valid().
void mln::util::vertex< G >::change_graph | ( | const G & | g | ) | [inline] |
Change the parent graph of that vertex.
References mln::util::vertex< G >::g_.
edge< G > mln::util::vertex< G >::edge_with | ( | const vertex< G > & | v_id | ) | const [inline] |
Returns true if this vertex has an edge with the given vertex.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
const G & mln::util::vertex< G >::graph | ( | ) | const [inline] |
Returns the graph pointer this vertex belongs to.
References mln::util::vertex< G >::g_.
Referenced by mln::p_vertices< G, F >::has(), mln::util::line_graph< G >::has(), and mln::util::operator==().
const vertex_id_t & mln::util::vertex< G >::id | ( | ) | const [inline] |
Returns the vertex id.
References mln::util::vertex< G >::id_.
Referenced by mln::util::graph::edge(), mln::util::line_graph< G >::has(), mln::util::internal::graph_base< E >::has(), mln::canvas::browsing::internal::graph_first_search_t< E, C >::operator()(), viota_t< S >::operator()(), and mln::util::operator==().
void mln::util::vertex< G >::invalidate | ( | ) | [inline] |
Invalidate that vertex.
References mln::util::vertex< G >::id_.
Referenced by mln::util::vertex< G >::vertex().
bool mln::util::vertex< G >::is_valid | ( | ) | const [inline] |
Check whether the vertex is still part of the graph.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
Referenced by mln::p_vertices< G, F >::has(), and mln::util::vertex< G >::vertex().
edge_id_t mln::util::vertex< G >::ith_nbh_edge | ( | unsigned | i | ) | const [inline] |
Returns the ith edge starting from this vertex.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
vertex_id_t mln::util::vertex< G >::ith_nbh_vertex | ( | unsigned | i | ) | const [inline] |
Returns the ith vertex adjacent to this vertex.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
Referenced by mln::canvas::browsing::internal::graph_first_search_t< E, C >::operator()().
unsigned mln::util::vertex< G >::nmax_nbh_edges | ( | ) | const [inline] |
Returns the number max of edges starting from this vertex.
If g_ is a sub graph of another graph, nmax will be retrived from the initial graph.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
unsigned mln::util::vertex< G >::nmax_nbh_vertices | ( | ) | const [inline] |
Returns the number max of vertices adjacent to this vertex.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
Referenced by mln::canvas::browsing::internal::graph_first_search_t< E, C >::operator()().
mln::util::vertex< G >::operator vertex_id_t | ( | ) | const [inline] |
Conversion to the vertex id.
FIXME: May cause ambiguities... :(
References mln::util::vertex< G >::id_.
vertex_id_t mln::util::vertex< G >::other | ( | const edge_id_t & | id_e | ) | const [inline] |
Returns the other vertex located on edge id_e
.
References mln::util::vertex< G >::g_, and mln::util::vertex< G >::id_.
void mln::util::vertex< G >::update_id | ( | const vertex_id_t & | id | ) | [inline] |
Update the vertex id.
References mln::util::vertex< G >::id_.
G mln::util::vertex< G >::g_ [protected] |
Referenced by mln::util::vertex< G >::change_graph(), mln::util::vertex< G >::edge_with(), mln::util::vertex< G >::graph(), mln::util::vertex< G >::is_valid(), mln::util::vertex< G >::ith_nbh_edge(), mln::util::vertex< G >::ith_nbh_vertex(), mln::util::vertex< G >::nmax_nbh_edges(), mln::util::vertex< G >::nmax_nbh_vertices(), and mln::util::vertex< G >::other().
vertex_id_t mln::util::vertex< G >::id_ [protected] |
Referenced by mln::util::vertex< G >::edge_with(), mln::util::vertex< G >::id(), mln::util::vertex< G >::invalidate(), mln::util::vertex< G >::is_valid(), mln::util::vertex< G >::ith_nbh_edge(), mln::util::vertex< G >::ith_nbh_vertex(), mln::util::vertex< G >::nmax_nbh_edges(), mln::util::vertex< G >::nmax_nbh_vertices(), mln::util::vertex< G >::operator vertex_id_t(), mln::util::vertex< G >::other(), and mln::util::vertex< G >::update_id().