graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact > Class Template Reference

Class representing a VV graph. More...

#include <graph/vvbigraph.h>

Inheritance diagram for graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >:
Inheritance graph
[legend]

List of all members.

Classes

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

typedef std::unordered_map
< vertex1_t, typename
neighborhood1_t::iterator > 
lookup1_t
 Type of the lookup hash map for vertices of type 1.
typedef std::unordered_map
< vertex2_t, typename
neighborhood2_t::iterator > 
lookup2_t
 Type of the lookup hash map for vertices of type 2.
typedef std::list< std::pair
< vertex1_t,
single_neighborhood1_t > > 
neighborhood1_t
 Type of the list of vertices of type 1, together with their neighborhood.
typedef neighborhood1_t::value_type neighborhood1_value_type
 Shortcut for the value_type of the neighborhood for a vertex of type 1.
typedef std::list< std::pair
< vertex2_t,
single_neighborhood2_t > > 
neighborhood2_t
 Type of the list of vertices of type 2, together with their neighborhood.
typedef neighborhood2_t::value_type neighborhood2_value_type
 Shortcut for the value_type of the neighborhood for a vertex of type 2.
typedef neighborhood1_t::size_type size_type
 Type of a size.
Iterators

typedef util::CircIterator
< neighbor_iterator1
circ_neighbor_iterator1
 Iterator used to iterate over the neighbors of a vertex of type 1, but specifying the starting point.
typedef util::range
< circ_neighbor_iterator1
circ_neighbor_iterator1_range
 Range of circular iterators for the neighbors of a vertex of type 1.
typedef util::CircIterator
< neighbor_iterator2
circ_neighbor_iterator2
 Iterator used to iterate over the neighbors of a vertex of type 2, but specifying the starting point.
typedef util::range
< circ_neighbor_iterator2
circ_neighbor_iterator2_range
 Range of circular iterators for the neighbors of a vertex of type 2.
typedef util::CircIterator
< const_neighbor_iterator1
const_circ_neighbor_iterator1
 Iterator used to iterate over the neighbors of a vertex of type 1, but specifying the starting point.
typedef util::range
< const_circ_neighbor_iterator1
const_circ_neighbor_iterator1_range
 Range of circular iterators for the neighbors of a vertex of type 1.
typedef util::CircIterator
< const_neighbor_iterator2
const_circ_neighbor_iterator2
 Iterator used to iterate over the neighbors of a vertex of type 2, but specifying the starting point.
typedef util::range
< const_circ_neighbor_iterator2
const_circ_neighbor_iterator2_range
 Range of circular iterators for the neighbors of a vertex of type 2.
typedef
util::SelectMemberIterator
< typename
neighborhood1_t::const_iterator,
const vertex1_t,&neighborhood1_value_type::first > 
const_iterator1
 Constant iterator on the vertices of type 1.
typedef
util::SelectMemberIterator
< typename
neighborhood2_t::const_iterator,
const vertex2_t,&neighborhood2_value_type::first > 
const_iterator2
 Constant iterator on the vertices of type 1.
typedef
util::SelectMemberIterator
< typename
edge_list1_t::const_iterator,
const vertex2_t,&neighbor1_t::target > 
const_neighbor_iterator1
 Constant iterator on the neighbors of a vertex of type 1.
typedef util::range
< const_neighbor_iterator1
const_neighbor_iterator1_range
 Constant range of the neighbors of a vertex of type 1.
typedef
util::SelectMemberIterator
< typename
edge_list2_t::const_iterator,
const vertex1_t,&neighbor2_t::target > 
const_neighbor_iterator2
 Constant iterator on the neighbors of a vertex of type 2.
typedef util::range
< const_neighbor_iterator2
const_neighbor_iterator2_range
 Constant range of the neighbors of a vertex of type 2.
typedef util::range
< const_iterator1
const_range_vertex1
 Range of vertex of type 1.
typedef util::range
< const_iterator2
const_range_vertex2
 Range of vertex of type 2.
typedef in_edges1_t::const_iterator ineighbor_iterator1
 Iterator on the incoming neighbors of a vertex of type 1.
typedef util::range
< ineighbor_iterator1
ineighbor_iterator1_range
 Range of the incoming neighbors of a vertex of type 1.
typedef in_edges2_t::const_iterator ineighbor_iterator2
 Iterator on the incoming neighbors of a vertex of type 2.
typedef util::range
< ineighbor_iterator2
ineighbor_iterator2_range
 Range of the incoming neighbors of a vertex of type 2.
typedef
util::SelectMemberIterator
< typename
neighborhood1_t::iterator,
const vertex1_t,&neighborhood1_value_type::first > 
iterator1
 Iterator on the vertices of type 1.
typedef
util::SelectMemberIterator
< typename
neighborhood2_t::iterator,
const vertex2_t,&neighborhood2_value_type::first > 
iterator2
 Iterator on the vertices of type 2.
typedef
util::SelectMemberIterator
< typename
edge_list1_t::iterator,
vertex2_t,&neighbor1_t::target > 
neighbor_iterator1
 Iterator on the neighbors of a vertex of type 1.
typedef util::range
< neighbor_iterator1
neighbor_iterator1_range
 Range of the neighbors of a vertex of type 1.
typedef
util::SelectMemberIterator
< typename
edge_list2_t::iterator,
vertex1_t,&neighbor2_t::target > 
neighbor_iterator2
 Iterator on the neighbors of a vertex of type 2.
typedef util::range
< neighbor_iterator2
neighbor_iterator2_range
 Range of the neighbors of a vertex of type 2.
typedef util::range< iterator1range_vertex1
 Range of vertex of type 1.
typedef util::range< iterator2range_vertex2
 Range of vertex of type 2.
Smart pointer types

typedef Edge< const Edge1Content > const_edge1_t
 Weak pointer on a constant edge from a vertex of type 1 to a vertex of type 2.
typedef Edge< const Edge2Content > const_edge2_t
 Weak pointer on a constant edge from a vertex of type 2 to a vertex of type 1.
typedef Edge< Edge1Content > edge1_t
 Weak pointer on an edge from a vertex of type 1 to a vertex of type 2.
typedef Edge< Edge2Content > edge2_t
 Weak pointer on an edge from a vertex of type 2 to a vertex of type 1.
typedef Vertex< Vertex1Content > vertex1_t
 Smart pointer on a vertex of type 1.
typedef Vertex< Vertex2Content > vertex2_t
 Smart pointer on a vertex of type 2.

Public Member Functions

 VVBiGraph (const VVBiGraph &copy)
 Copy constructor.
 VVBiGraph ()
 Default constructor.
Vertex set lookup methods

const vertex1_tany_vertex1 () const
 Return a vertex of type 1 from the graph.
const vertex2_tany_vertex2 () const
 Return a vertex of type 2 from the graph.
bool contains (const vertex2_t &v) const
 Test if v is in the graph.
bool contains (const vertex1_t &v) const
 Test if v is in the graph.
bool empty () const
 Test if there is any vertex in the graph.
const vertex1_tget_vertex1 (size_type idx) const
 Return the vertex of type 1 of index idx.
const vertex2_tget_vertex2 (size_type idx) const
 Return the vertex of type 2 of index idx.
size_type nb_vertices1 () const
 Return the number of vertices on the graph.
size_type nb_vertices2 () const
 Return the number of vertices on the graph.
bool no_vertex1 () const
 Test if there is any vertex in the graph.
bool no_vertex2 () const
 Test if there is any vertex in the graph.
const vertex2_treference (vertex2_t v) const
 Get a reference on the vertex in the graph.
const vertex1_treference (vertex1_t v) const
 Get a reference on the vertex in the graph.
size_type size () const
 Return the number of vertices on the graph.
Neighborhood lookup methods

const vertex1_tanyIn (const vertex2_t &v) const
 Return a vertex in the neighborhood of v.
const vertex2_tanyIn (const vertex1_t &v) const
 Return a vertex in the neighborhood of v.
const_edge2_t edge (const vertex2_t &src, const vertex1_t &tgt) const
 Returns the edge from src to tgt.
const_edge1_t edge (const vertex1_t &src, const vertex2_t &tgt) const
 Returns the edge from src to tgt.
edge2_t edge (const vertex2_t &src, const vertex1_t &tgt)
 Returns the edge from src to tgt.
edge1_t edge (const vertex1_t &src, const vertex2_t &tgt)
 Returns the edge from src to tgt.
bool empty (const vertex2_t &v) const
 Test if a vertex has a neighbor.
bool empty (const vertex1_t &v) const
 Test if a vertex has a neighbor.
bool flag (const vertex2_t &src, const vertex1_t &neighbor)
 Flag a neighbor of src for quick retrieval.
bool flag (const vertex1_t &src, const vertex2_t &neighbor)
 Flag a neighbor of src for quick retrieval.
const vertex1_tflagged (const vertex2_t &src) const
 Return the flagged neighbor of src.
const vertex2_tflagged (const vertex1_t &src) const
 Return the flagged neighbor of src.
const vertex1_tiAnyIn (const vertex2_t &v) const
 Returns any incoming neighbor of v.
const vertex2_tiAnyIn (const vertex1_t &v) const
 Returns any incoming neighbor of v.
bool iEmpty (const vertex2_t &v) const
 Test if a vertex has an incoming neighbor.
bool iEmpty (const vertex1_t &v) const
 Test if a vertex has an incoming neighbor.
ineighbor_iterator2_range iNeighbors (const vertex2_t &v) const
 Return the range of incoming neighbors of v.
ineighbor_iterator1_range iNeighbors (const vertex1_t &v) const
 Return the range of incoming neighbors of v.
size_type iValence (const vertex2_t &v) const
 Returns the number of incoming neighbors of v.
size_type iValence (const vertex1_t &v) const
 Returns the number of incoming neighbors of v.
circ_neighbor_iterator2_range neighbors (const vertex2_t &v, const vertex1_t &n)
 Return the range of neighbors of v starting from n.
circ_neighbor_iterator1_range neighbors (const vertex1_t &v, const vertex2_t &n)
 Return the range of neighbors of v starting from n.
const_circ_neighbor_iterator2_range neighbors (const vertex2_t &v, const vertex1_t &n) const
 Return the constant range of neighbors of v starting from n.
const_circ_neighbor_iterator1_range neighbors (const vertex1_t &v, const vertex2_t &n) const
 Return the constant range of neighbors of v starting from n.
neighbor_iterator2_range neighbors (const vertex2_t &v)
 Return the range of neighbors of v.
neighbor_iterator1_range neighbors (const vertex1_t &v)
 Return the range of neighbors of v.
const_neighbor_iterator2_range neighbors (const vertex2_t &v) const
 Return the constant range of neighbors of v.
const_neighbor_iterator1_range neighbors (const vertex1_t &v) const
 Return the constant range of neighbors of v.
const vertex1_tnextTo (const vertex2_t &v, const vertex1_t &neighbor, unsigned int n=1) const
 Returns the nth vertex after neighbor in the neighborhood of v.
const vertex2_tnextTo (const vertex1_t &v, const vertex2_t &neighbor, unsigned int n=1) const
 Returns the nth vertex after neighbor in the neighborhood of v.
const vertex1_tprevTo (const vertex2_t &v, const vertex1_t &ref, unsigned int n=1) const
 Returns the nth vertex before ref in the neighborhood of v.
const vertex2_tprevTo (const vertex1_t &v, const vertex2_t &ref, unsigned int n=1) const
 Returns the nth vertex before ref in the neighborhood of v.
const vertex2_tsource (const edge2_t &edge) const
 Return the source vertex of the edge.
const vertex1_tsource (const edge1_t &edge) const
 Return the source vertex of the edge.
const vertex1_ttarget (const edge2_t &edge) const
 Return the target vertex of the edge.
const vertex2_ttarget (const edge1_t &edge) const
 Return the target vertex of the edge.
size_type valence (const vertex2_t &v) const
 Returns the number of neighbors of v.
size_type valence (const vertex1_t &v) const
 Returns the number of neighbors of v.
STL compatibility methods

const_iterator1 begin_vertex1 () const
 Returns an iterator on the beginning of the set of vertices of the graph.
iterator1 begin_vertex1 ()
 Returns an iterator on the beginning of the set of vertices of the graph.
const_iterator2 begin_vertex2 () const
 Returns an iterator on the beginning of the set of vertices of the graph.
iterator2 begin_vertex2 ()
 Returns an iterator on the beginning of the set of vertices of the graph.
void clear (iterator2 it)
 Clear the neighborhood of a vertex.
void clear (iterator1 it)
 Clear the neighborhood of a vertex.
size_type count (const vertex2_t &v) const
 Count the number of vertices v in the graph (can be 0 or 1 only).
size_type count (const vertex1_t &v) const
 Count the number of vertices v in the graph (can be 0 or 1 only).
const_iterator1 end_vertex1 () const
 Returns an iterator on the end of the set of vertices of the graph.
iterator1 end_vertex1 ()
 Returns an iterator on the end of the set of vertices of the graph.
const_iterator2 end_vertex2 () const
 Returns an iterator on the end of the set of vertices of the graph.
iterator2 end_vertex2 ()
 Returns an iterator on the end of the set of vertices of the graph.
iterator2 erase (iterator2 pos)
 Erase element at position pos.
iterator1 erase (iterator1 pos)
 Erase element at position pos.
void eraseAllEdges (iterator2 it)
 Clear the neighborhood of a vertex.
void eraseAllEdges (iterator1 it)
 Clear the neighborhood of a vertex.
circ_neighbor_iterator2 eraseEdge (const vertex2_t &v, circ_neighbor_iterator2 pos)
 Erase the edge pointed to by the iterator.
neighbor_iterator2 eraseEdge (const vertex2_t &v, neighbor_iterator2 pos)
 Erase the edge pointed to by the iterator.
circ_neighbor_iterator1 eraseEdge (const vertex1_t &v, circ_neighbor_iterator1 pos)
 Erase the edge pointed to by the iterator.
neighbor_iterator1 eraseEdge (const vertex1_t &v, neighbor_iterator1 pos)
 Erase the edge pointed to by the iterator.
const_iterator2 find (const vertex2_t &v) const
 Find the vertex v in the graph.
const_iterator1 find (const vertex1_t &v) const
 Find the vertex v in the graph.
iterator2 find (const vertex2_t &v)
 Find the vertex v in the graph.
iterator1 find (const vertex1_t &v)
 Find the vertex v in the graph.
const_neighbor_iterator2 findIn (const vertex2_t &v, const vertex1_t &n) const
 Find the vertex n in the neighborhood of v.
const_neighbor_iterator1 findIn (const vertex1_t &v, const vertex2_t &n) const
 Find the vertex n in the neighborhood of v.
neighbor_iterator2 findIn (const vertex2_t &v, const vertex1_t &n)
 Find the vertex n in the neighborhood of v.
neighbor_iterator1 findIn (const vertex1_t &v, const vertex2_t &n)
 Find the vertex n in the neighborhood of v.
void insert (iterator2 first, iterator2 last)
 Insert all the vertices from first to last-1 in the graph.
void insert (iterator1 first, iterator1 last)
 Insert all the vertices from first to last-1 in the graph.
iterator2 insert (iterator2 pos, const vertex2_t &v)
 Insert a new vertex in the graph.
iterator1 insert (iterator1 pos, const vertex1_t &v)
 Insert a new vertex in the graph.
range_vertex1 vertices1 ()
 Returns a range of vertices.
const_range_vertex1 vertices1 () const
 Returns a range of vertices.
range_vertex2 vertices2 ()
 Returns a range of vertices.
const_range_vertex2 vertices2 () const
 Returns a range of vertices.
Whole structure methods

void clear ()
 Clear the graph.
void eraseAllEdges ()
 Clear all the edges in the graph.
VVBiGraphoperator= (const VVBiGraph &other)
 Copy the graph into another graph.
bool operator== (const VVBiGraph &other) const
 Test equality for the graphs.
template<typename Vertex1Container , typename Vertex2Container >
VVBiGraph subgraph (const Vertex1Container &vertices1, const Vertex2Container &vertices2) const
void swap (VVBiGraph &other)
 Swap the content of two graphs.
Neighborhood edition methods

bool clear (const vertex2_t &v)
 Clear the neighborhood of a vertex.
bool clear (const vertex1_t &v)
 Clear the neighborhood of a vertex.
bool eraseAllEdges (const vertex2_t &v)
 Clear the neighborhood of a vertex.
bool eraseAllEdges (const vertex1_t &v)
 Clear the neighborhood of a vertex.
size_type eraseEdge (const vertex2_t &src, const vertex1_t &tgt)
 Erase the edge from src to tgt.
size_type eraseEdge (const vertex1_t &src, const vertex2_t &tgt)
 Erase the edge from src to tgt.
edge2_t insertEdge (const vertex2_t &src, const vertex1_t &tgt)
 Insert a new edge in the graph, without ordering.
edge1_t insertEdge (const vertex1_t &src, const vertex2_t &tgt)
 Insert a new edge in the graph, without ordering.
edge2_t replace (const vertex2_t &v, const vertex1_t &neighbor, const vertex1_t &new_neighbor)
 Replace a vertex by another in a neighborhood.
edge1_t replace (const vertex1_t &v, const vertex2_t &neighbor, const vertex2_t &new_neighbor)
 Replace a vertex by another in a neighborhood.
edge2_t spliceAfter (const vertex2_t &v, const vertex1_t &neighbor, const vertex1_t &new_neighbor)
 Insert neighbor in the neighborhood of v after reference.
edge1_t spliceAfter (const vertex1_t &v, const vertex2_t &neighbor, const vertex2_t &new_neighbor)
 Insert neighbor in the neighborhood of v after reference.
edge2_t spliceBefore (const vertex2_t &v, const vertex1_t &neighbor, const vertex1_t &new_neighbor)
 Insert neighbor in the neighborhood of v before reference.
edge1_t spliceBefore (const vertex1_t &v, const vertex2_t &neighbor, const vertex2_t &new_neighbor)
 Insert neighbor in the neighborhood of v before reference.
Vertex set edition methods

size_type erase (const vertex2_t &v)
 Remove a vertex from the graph.
size_type erase (const vertex1_t &v)
 Remove a vertex from the graph.
iterator2 insert (const vertex2_t &v)
 Insert a new vertex in the graph.
iterator1 insert (const vertex1_t &v)
 Insert a new vertex in the graph.

Protected Types

typedef search_result_t< const
single_neighborhood1_t,
int_const_neighbor_iterator1
const_neighbor1_found_t
 Constant result of a search in the neighborhood.
typedef search_result_t< const
single_neighborhood2_t,
int_const_neighbor_iterator2
const_neighbor2_found_t
 Constant result of a search in the neighborhood.
typedef neighbor1_t::edge_list_t edge_list1_t
 Type of the ordered list of the outgoing edges of a vertex of type 1.
typedef neighbor2_t::edge_list_t edge_list2_t
 Type of the ordered list of the outgoing edges of a vertex of type 2.
typedef neighbor1_t::base EdgeCache1
typedef neighbor2_t::base EdgeCache2
typedef __vvbigraph_set
< compact, vertex2_t >::type 
in_edges1_t
 Type of the list of sources of the in-edges of a vertex of type 1.
typedef __vvbigraph_set
< compact, vertex1_t >::type 
in_edges2_t
 Type of the list of sources of the in-edges of a vertex of type 2.
typedef
edge_list1_t::const_iterator 
int_const_neighbor_iterator1
 Constant iterator on the outgoing edges.
typedef
edge_list2_t::const_iterator 
int_const_neighbor_iterator2
 Constant iterator on the outgoing edges.
typedef edge_list1_t::iterator int_neighbor_iterator1
 Iterator on the outgoing edges.
typedef edge_list2_t::iterator int_neighbor_iterator2
 Iterator on the outgoing edges.
typedef search_result_t
< single_neighborhood1_t,
int_neighbor_iterator1
neighbor1_found_t
 Result of a search in the neighborhood.
typedef neighbor_t
< Vertex1Content,
Vertex2Content, Edge1Content > 
neighbor1_t
 Type of a neighbor of a vertex of type 1 (i.e.
typedef search_result_t
< single_neighborhood2_t,
int_neighbor_iterator2
neighbor2_found_t
 Result of a search in the neighborhood.
typedef neighbor_t
< Vertex2Content,
Vertex1Content, Edge2Content > 
neighbor2_t
 Type of a neighbor of a vertex of type 1 (i.e.
typedef single_neighborhood_t
< Vertex1Content,
Vertex2Content, Edge1Content > 
single_neighborhood1_t
 Type of the neighborhood of a vertex of type 1.
typedef single_neighborhood_t
< Vertex2Content,
Vertex1Content, Edge2Content > 
single_neighborhood2_t
 Type of the neighborhood of a vertex of type 2.
typedef
single_neighborhood1_t::base 
VertexCache1
typedef
single_neighborhood2_t::base 
VertexCache2

Protected Member Functions

const_neighbor2_found_t findInVertex (const vertex2_t &v, const vertex1_t &neighbor) const
 Constant version of findInVertex(const vertex_t&, const vertex_t&).
const_neighbor1_found_t findInVertex (const vertex1_t &v, const vertex2_t &neighbor) const
 Constant version of findInVertex(const vertex_t&, const vertex_t&).
neighbor2_found_t findInVertex (const vertex2_t &v, const vertex1_t &neighbor)
 Find a vertex neighbor in the neighborhood of v.
neighbor1_found_t findInVertex (const vertex1_t &v, const vertex2_t &neighbor)
 Find a vertex neighbor in the neighborhood of v.
neighborhood2_t::const_iterator findVertex (const vertex2_t &v) const
 Constant version of findVertex(const vertex2_t&).
neighborhood1_t::const_iterator findVertex (const vertex1_t &v) const
 Constant version of findVertex(const vertex1_t&).
neighborhood2_t::iterator findVertex (const vertex2_t &v)
 Find a vertex in the graph and returns the iterator on it.
neighborhood1_t::iterator findVertex (const vertex1_t &v)
 Find a vertex in the graph and returns the iterator on it.
std::pair< ineighbor_iterator1,
bool > 
insertInEdge (const vertex2_t &v, const vertex1_t &new_neighbor)
 Insert v in the in_edges of new_neighbor and return true if the insertion was actually done, or false if v was already there.
std::pair< ineighbor_iterator2,
bool > 
insertInEdge (const vertex1_t &v, const vertex2_t &new_neighbor)
 Insert v in the in_edges of new_neighbor and return true if the insertion was actually done, or false if v was already there.
void undoInEdge (const vertex2_t &new_neighbor, ineighbor_iterator2 &it)
 Undo the insertion of an in edge as a roll-back mechanism if the whole edge insertion fails.
void undoInEdge (const vertex1_t &new_neighbor, ineighbor_iterator1 &it)
 Undo the insertion of an in edge as a roll-back mechanism if the whole edge insertion fails.
void updateEdgeCache (const vertex2_t &v, typename edge_list2_t::iterator new_edge_it, const vertex2_t &in_edge)
 Update the edge cache information of vertex v in its neighborhood and the in_edge too.
void updateEdgeCache (const vertex1_t &v, typename edge_list1_t::iterator new_edge_it, const vertex1_t &in_edge)
 Update the edge cache information of vertex v in its neighborhood and the in_edge too.
void updateVertexCache (const vertex2_t &v, typename neighborhood2_t::iterator it)
 Update the vertex cache for vertex v.
void updateVertexCache (const vertex1_t &v, typename neighborhood1_t::iterator it)
 Update the vertex cache for vertex v.

Protected Attributes

intptr_t graph_id
 Unique id for this graph.
lookup1_t lookup1
 Lookup hash map for vertex1's.
lookup2_t lookup2
 Lookup hash map for vertex2's.
neighborhood1_t neighborhood1
 Main data structure containing the neighborhood of the vertex1's.
neighborhood2_t neighborhood2
 Main data structure containing the neighborhood of the vertex2's.

Detailed Description

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
class graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >

Class representing a VV graph.

A VV graph is an oriented rotational graph. That is, the edges of a given vertex have a circular order. That is, if an edge has three edges e1, e2, e3, there is no first edge, but we can say e1 < e2 < e3 < e1. In that case, '<' denote the succession.

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.

Performance notes

The graph includes two caching mecanisms to improve performances when iterating over the graph and retrieve edge information:

  1. while iterating over the graph, the vertex cache the current iterator. So that accessing the neighborhood of the vertex is constant time (i.e. it's dereferencing the cached iterator).
  2. while iterating over the neighborhood of a vertex, the target vertex (i.e. the one returned by the iteration) cache the iterator on the neighborhood. So that any operation using that specific edge (i.e. getting edge data, splicing, replacing or erasing) is alos constant time.

To make this caching mecanism correct, the cached data are never copied. This means, to make use of the caching mecanism, you have to iterate using constant references (references will end up with compilation errors if used on the graph):

 forall_named(const vertex1_t &v, S, vertex1)
 {
   // Here the vertex v has the vertex cache
   forall(const vertex2_t &n, S.neighbors(v)) // Makes use of the cache
   {
     S.edge(v,n)->pos = Point3d(1,2,3); // Uses the edge cache
     S.edge(n,v)->pos = Point3d(3,2,1); // Do not use any cache
   }
   v->pos = Point3d(0,0,0); // Valid
 }
Warning:
Do not iterate using constant references if you ever remove the vertex you iterate on ! (i.e. remove from the graph if you iterate on the graph or remove from the neighborhood if you iterate on the neighborhood)

Even though this code manipulate constant references, modifying the data pointed by the vertex is allowed. The vertices are coded to allow that. That means if you are using vertices in a dictionary or a set, using their content to compare them, you must not modify them ! The compiler won't guard you against it.

Definition at line 336 of file vvbigraph.h.


Member Typedef Documentation

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::CircIterator<neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::circ_neighbor_iterator1

Iterator used to iterate over the neighbors of a vertex of type 1, but specifying the starting point.

Definition at line 690 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<circ_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::circ_neighbor_iterator1_range

Range of circular iterators for the neighbors of a vertex of type 1.

Definition at line 700 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::CircIterator<neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::circ_neighbor_iterator2

Iterator used to iterate over the neighbors of a vertex of type 2, but specifying the starting point.

Definition at line 695 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<circ_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::circ_neighbor_iterator2_range

Range of circular iterators for the neighbors of a vertex of type 2.

Definition at line 704 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::CircIterator<const_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_circ_neighbor_iterator1

Iterator used to iterate over the neighbors of a vertex of type 1, but specifying the starting point.

Definition at line 772 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_circ_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_circ_neighbor_iterator1_range

Range of circular iterators for the neighbors of a vertex of type 1.

Definition at line 782 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::CircIterator<const_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_circ_neighbor_iterator2

Iterator used to iterate over the neighbors of a vertex of type 2, but specifying the starting point.

Definition at line 777 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_circ_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_circ_neighbor_iterator2_range

Range of circular iterators for the neighbors of a vertex of type 2.

Definition at line 786 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Edge<const Edge1Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_edge1_t

Weak pointer on a constant edge from a vertex of type 1 to a vertex of type 2.

Definition at line 382 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Edge<const Edge2Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_edge2_t

Weak pointer on a constant edge from a vertex of type 2 to a vertex of type 1.

Definition at line 387 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename neighborhood1_t::const_iterator, const vertex1_t, &neighborhood1_value_type::first> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_iterator1
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename neighborhood2_t::const_iterator, const vertex2_t, &neighborhood2_value_type::first> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_iterator2
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef search_result_t<const single_neighborhood1_t, int_const_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor1_found_t [protected]

Constant result of a search in the neighborhood.

Definition at line 1705 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef search_result_t<const single_neighborhood2_t, int_const_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor2_found_t [protected]

Constant result of a search in the neighborhood.

Definition at line 1709 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename edge_list1_t::const_iterator, const vertex2_t, &neighbor1_t::target> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor_iterator1

Constant iterator on the neighbors of a vertex of type 1.

Definition at line 744 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor_iterator1_range

Constant range of the neighbors of a vertex of type 1.

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 758 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename edge_list2_t::const_iterator, const vertex1_t, &neighbor2_t::target> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor_iterator2

Constant iterator on the neighbors of a vertex of type 2.

Definition at line 749 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_neighbor_iterator2_range

Constant range of the neighbors of a vertex of type 2.

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 766 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_range_vertex1

Range of vertex of type 1.

Definition at line 791 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<const_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::const_range_vertex2

Range of vertex of type 2.

Definition at line 795 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Edge<Edge1Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge1_t

Weak pointer on an edge from a vertex of type 1 to a vertex of type 2.

Definition at line 372 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Edge<Edge2Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge2_t

Weak pointer on an edge from a vertex of type 2 to a vertex of type 1.

Definition at line 376 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighbor1_t::edge_list_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge_list1_t [protected]

Type of the ordered list of the outgoing edges of a vertex of type 1.

Definition at line 510 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighbor2_t::edge_list_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge_list2_t [protected]

Type of the ordered list of the outgoing edges of a vertex of type 2.

Definition at line 514 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef __vvbigraph_set<compact,vertex2_t>::type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::in_edges1_t [protected]

Type of the list of sources of the in-edges of a vertex of type 1.

Definition at line 519 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef __vvbigraph_set<compact,vertex1_t>::type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::in_edges2_t [protected]

Type of the list of sources of the in-edges of a vertex of type 2.

Definition at line 523 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef in_edges1_t::const_iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::ineighbor_iterator1

Iterator on the incoming neighbors of a vertex of type 1.

An incoming neighbor is a source vertex of an edge whose target is the current vertex.

Definition at line 712 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<ineighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::ineighbor_iterator1_range

Range of the incoming neighbors of a vertex of type 1.

The first element of the pair is an iterator on the beginning of the range, the second element is the past-the-end iterator.

See also:
ineighbor_iterator

Definition at line 729 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef in_edges2_t::const_iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::ineighbor_iterator2

Iterator on the incoming neighbors of a vertex of type 2.

An incoming neighbor is a source vertex of an edge whose target is the current vertex.

Definition at line 719 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<ineighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::ineighbor_iterator2_range

Range of the incoming neighbors of a vertex of type 2.

The first element of the pair is an iterator on the beginning of the range, the second element is the past-the-end iterator.

See also:
ineighbor_iterator

Definition at line 738 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef edge_list1_t::const_iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::int_const_neighbor_iterator1 [protected]

Constant iterator on the outgoing edges.

Definition at line 1687 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef edge_list2_t::const_iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::int_const_neighbor_iterator2 [protected]

Constant iterator on the outgoing edges.

Definition at line 1691 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef edge_list1_t::iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::int_neighbor_iterator1 [protected]

Iterator on the outgoing edges.

Definition at line 1678 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef edge_list2_t::iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::int_neighbor_iterator2 [protected]

Iterator on the outgoing edges.

Definition at line 1682 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename neighborhood1_t::iterator, const vertex1_t, &neighborhood1_value_type::first> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iterator1
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename neighborhood2_t::iterator, const vertex2_t, &neighborhood2_value_type::first> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iterator2
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef std::unordered_map<vertex1_t, typename neighborhood1_t::iterator> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1_t

Type of the lookup hash map for vertices of type 1.

Definition at line 619 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef std::unordered_map<vertex2_t, typename neighborhood2_t::iterator> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2_t

Type of the lookup hash map for vertices of type 2.

Definition at line 624 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef search_result_t<single_neighborhood1_t, int_neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor1_found_t [protected]

Result of a search in the neighborhood.

Definition at line 1696 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighbor_t<Vertex1Content, Vertex2Content, Edge1Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor1_t [protected]

Type of a neighbor of a vertex of type 1 (i.e.

it is of type 2)

Definition at line 496 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef search_result_t<single_neighborhood2_t, int_neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor2_found_t [protected]

Result of a search in the neighborhood.

Definition at line 1700 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighbor_t<Vertex2Content, Vertex1Content, Edge2Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor2_t [protected]

Type of a neighbor of a vertex of type 1 (i.e.

it is of type 2)

Definition at line 503 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename edge_list1_t::iterator, vertex2_t, &neighbor1_t::target> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor_iterator1

Iterator on the neighbors of a vertex of type 1.

Definition at line 667 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<neighbor_iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor_iterator1_range

Range of the neighbors of a vertex of type 1.

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 678 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::SelectMemberIterator<typename edge_list2_t::iterator, vertex1_t, &neighbor2_t::target> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor_iterator2

Iterator on the neighbors of a vertex of type 2.

Definition at line 672 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<neighbor_iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbor_iterator2_range

Range of the neighbors of a vertex of type 2.

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 684 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef std::list<std::pair<vertex1_t, single_neighborhood1_t> > graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1_t

Type of the list of vertices of type 1, together with their neighborhood.

Definition at line 609 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighborhood1_t::value_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1_value_type

Shortcut for the value_type of the neighborhood for a vertex of type 1.

Definition at line 629 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef std::list<std::pair<vertex2_t, single_neighborhood2_t> > graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2_t

Type of the list of vertices of type 2, together with their neighborhood.

Definition at line 614 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighborhood2_t::value_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2_value_type

Shortcut for the value_type of the neighborhood for a vertex of type 2.

Definition at line 633 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<iterator1> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::range_vertex1

Range of vertex of type 1.

Definition at line 800 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef util::range<iterator2> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::range_vertex2

Range of vertex of type 2.

Definition at line 804 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef single_neighborhood_t<Vertex1Content, Vertex2Content, Edge1Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::single_neighborhood1_t [protected]

Type of the neighborhood of a vertex of type 1.

Definition at line 594 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef single_neighborhood_t<Vertex2Content, Vertex1Content, Edge2Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::single_neighborhood2_t [protected]

Type of the neighborhood of a vertex of type 2.

Definition at line 598 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef neighborhood1_t::size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::size_type
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Vertex<Vertex1Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertex1_t

Smart pointer on a vertex of type 1.

Definition at line 358 of file vvbigraph.h.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
typedef Vertex<Vertex2Content> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertex2_t

Smart pointer on a vertex of type 2.

Definition at line 366 of file vvbigraph.h.


Constructor & Destructor Documentation

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::VVBiGraph (  )  [inline]

Default constructor.

Creates an empty VV graph

Definition at line 395 of file vvbigraph.h.

00395 : graph_id(graph::getNextGraphId()) {}

template<BIGRAPH_TEMPLATE >
graph::VVBiGraph< BIGRAPH_TEMPLATE >::VVBiGraph ( const VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact > &  copy  )  [inline]

Copy constructor.

Maintains the caches in a valid state

Definition at line 3380 of file vvbigraph.h.

03381     : graph_id(graph::getNextGraphId())
03382     {
03383       *this = copy;
03384     }


Member Function Documentation

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::any_vertex1 (  )  const [inline]

Return a vertex of type 1 from the graph.

Returns:
A vertex of the graph, or a null vertex if the graph is empty.

Definition at line 2182 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::Vertex< VertexContent >::null.

02183     {
02184       if(neighborhood1.empty())
02185         return vertex1_t::null;
02186       return *begin_vertex1();
02187     }

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex2_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::any_vertex2 (  )  const [inline]

Return a vertex of type 2 from the graph.

Returns:
A vertex of the graph, or a null vertex if the graph is empty.

Definition at line 2191 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex2(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2, and graph::Vertex< VertexContent >::null.

02192     {
02193       if(neighborhood2.empty())
02194         return vertex2_t::null;
02195       return *begin_vertex2();
02196     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::anyIn ( const vertex2_t v  )  const

Return a vertex in the neighborhood of v.

Returns:
A vertex in the neighborhood of v, or a null vertex if v is not in the graph or v has no neighborhood.
template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::anyIn ( const vertex1_t v  )  const [inline]

Return a vertex in the neighborhood of v.

Returns:
A vertex in the neighborhood of v, or a null vertex if v is not in the graph or v has no neighborhood.

Definition at line 2218 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::Vertex< VertexContent >::null.

Referenced by algorithms::TriangleSurface::center3d(), algorithms::TriangleSurface::centerPosition(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::deleteJunction(), and algorithms::TriangleSurface::position().

02219     {
02220       if(v.isNull())
02221         return vertex2_t::null;//vertex_t(0);
02222       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02223       if(it_found == neighborhood1.end() || it_found->second.edges.empty())
02224         return vertex2_t::null;//vertex_t(0);
02225       const edge_list1_t& lst = it_found->second.edges;
02226       return lst.front().target;
02227     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex1 (  )  const [inline]

Returns an iterator on the beginning of the set of vertices of the graph.

Definition at line 1497 of file vvbigraph.h.

01497 { return neighborhood1.begin(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex1 (  )  [inline]

Returns an iterator on the beginning of the set of vertices of the graph.

Definition at line 1461 of file vvbigraph.h.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::any_vertex1(), and graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::vertices1().

01461 { return neighborhood1.begin(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex2 (  )  const [inline]

Returns an iterator on the beginning of the set of vertices of the graph.

Definition at line 1501 of file vvbigraph.h.

01501 { return neighborhood2.begin(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::begin_vertex2 (  )  [inline]

Returns an iterator on the beginning of the set of vertices of the graph.

Definition at line 1465 of file vvbigraph.h.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::any_vertex2(), and graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::vertices2().

01465 { return neighborhood2.begin(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
void graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear ( iterator2  it  ) 

Clear the neighborhood of a vertex.

All edges from *it will be erased.

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::clear ( iterator1  it  )  [inline]

Clear the neighborhood of a vertex.

All edges from *it will be erased.

Definition at line 2024 of file vvbigraph.h.

References util::SelectMemberIterator< Iterator, T, member, Reference, Pointer >::base(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex().

02025     {
02026       const vertex1_t& v = *it_found;
02027       for(typename edge_list1_t::iterator it_el = it_found.base()->second.edges.begin() ;
02028           it_el != it_found.base()->second.edges.end() ; ++it_el)
02029       {
02030         typename neighborhood2_t::iterator it_found = this->findVertex(it_el->target);
02031         it_found->second.in_edges.erase(v);
02032       }
02033       it_found.base()->second.edges.clear();
02034     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
void graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear (  )  [inline]

Clear the graph.

Definition at line 1364 of file vvbigraph.h.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear().

01364 { neighborhood1.clear(); neighborhood2.clear(); lookup1.clear(); lookup2.clear(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear ( const vertex2_t v  ) 

Clear the neighborhood of a vertex.

All edges from v will be erased.

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::clear ( const vertex1_t v  )  [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::contains ( const vertex2_t v  )  const

Test if v is in the graph.

Returns:
true is v is in the graph.
template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::contains ( const vertex1_t v  )  const [inline]

Test if v is in the graph.

Returns:
true is v is in the graph.

Definition at line 2707 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

02708     {
02709       return this->findVertex(v) != neighborhood1.end();
02710     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::count ( const vertex2_t v  )  const

Count the number of vertices v in the graph (can be 0 or 1 only).

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::size_type graph::VVBiGraph< BIGRAPH_TEMPLATE >::count ( const vertex1_t v  )  const [inline]

Count the number of vertices v in the graph (can be 0 or 1 only).

Definition at line 2070 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1.

02071     {
02072       return lookup1.count(v);
02073     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge ( const vertex2_t src,
const vertex1_t tgt 
) const

Returns the edge from src to tgt.

If the edge does not exists, returns a null edge.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::const_edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::edge ( const vertex1_t src,
const vertex2_t tgt 
) const [inline]

Returns the edge from src to tgt.

If the edge does not exists, returns a null edge.

Definition at line 2948 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::Vertex< VertexContent >::id(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it.

02950     {
02951       const_neighbor1_found_t found = findInVertex(src, tgt);
02952       if(!found)
02953         return const_edge1_t();
02954       return const_edge1_t(src.id(), tgt.id(), &*found.it);
02955     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge ( const vertex2_t src,
const vertex1_t tgt 
)

Returns the edge from src to tgt.

If the edge does not exists, returns a null edge.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::edge ( const vertex1_t src,
const vertex2_t tgt 
) [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::empty ( const vertex2_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.

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::empty ( const vertex1_t v  )  const [inline]

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.

Definition at line 2267 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

02268     {
02269       if(v.isNull())
02270         return true;
02271       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02272       if(it_found == neighborhood1.end())
02273         return true;
02274       return it_found->second.edges.empty();
02275     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::empty (  )  const [inline]

Test if there is any vertex in the graph.

Definition at line 942 of file vvbigraph.h.

00942 { return this->no_vertex1() and this->no_vertex2(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::end_vertex1 (  )  const [inline]

Returns an iterator on the end of the set of vertices of the graph.

Definition at line 1506 of file vvbigraph.h.

01506 { return neighborhood1.end(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::end_vertex1 (  )  [inline]

Returns an iterator on the end of the set of vertices of the graph.

Definition at line 1470 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::vertices1().

01470 { return neighborhood1.end(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::end_vertex2 (  )  const [inline]

Returns an iterator on the end of the set of vertices of the graph.

Definition at line 1510 of file vvbigraph.h.

01510 { return neighborhood2.end(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::end_vertex2 (  )  [inline]

Returns an iterator on the end of the set of vertices of the graph.

Definition at line 1474 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::vertices2().

01474 { return neighborhood2.end(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::erase ( iterator2  pos  ) 

Erase element at position pos.

Returns the iterator on the next element (as required for sequence containers)

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::erase ( iterator1  pos  )  [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::erase ( const vertex2_t v  ) 

Remove a vertex from the graph.

Parameters:
v vertex to erase
Returns:
1 if the vertex was erased, 0 else.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::size_type graph::VVBiGraph< BIGRAPH_TEMPLATE >::erase ( const vertex1_t v  )  [inline]

Remove a vertex from the graph.

Parameters:
v vertex to erase
Returns:
1 if the vertex was erased, 0 else.

Definition at line 1878 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::deleteJunction().

01879     {
01880       if(eraseAllEdges(v))
01881       {
01882         typename lookup1_t::iterator it_found = lookup1.find(v);
01883         if(it_found == lookup1.end()) return 0;
01884         typename neighborhood1_t::iterator it = it_found->second;
01885         neighborhood1.erase(it);
01886         lookup1.erase(v);
01887         return 1;
01888       }
01889       return 0;
01890     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
void graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges ( iterator2  it  ) 

Clear the neighborhood of a vertex.

All edges, to and from *it will be erased.

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseAllEdges ( iterator1  it  )  [inline]

Clear the neighborhood of a vertex.

All edges, to and from *it will be erased.

Definition at line 1933 of file vvbigraph.h.

References util::SelectMemberIterator< Iterator, T, member, Reference, Pointer >::base(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood.

01934     {
01935       const vertex1_t& v = *it_found;
01936       // Remove all the edges and their incoming counterpart
01937       for(typename edge_list1_t::iterator it_el = it_found.base()->second.edges.begin() ;
01938           it_el != it_found.base()->second.edges.end() ; ++it_el)
01939       {
01940         typename lookup2_t::iterator it_found = lookup2.find(it_el->target);
01941         if(it_found != lookup2.end())
01942           it_found->second->second.in_edges.erase(v);
01943       }
01944       it_found.base()->second.edges.clear();
01945       it_found.base()->second.flagged = 0;
01946       // Remove the incoming edges
01947       in_edges1_t &in_edges = it_found.base()->second.in_edges;
01948       for( typename in_edges1_t::iterator it = in_edges.begin() ;
01949            it != in_edges.end() ; ++it )
01950       {
01951 #ifndef VVBIGRAPH_NO_EDGE_CACHE
01952         EdgeCache2 *cache = reinterpret_cast<EdgeCache2*>(it->cache);
01953         if(!cache or !cache->eraseEdge())
01954         {
01955 #endif
01956           neighbor2_found_t found = findInVertex(*it, v);
01957           found.neighborhood->edges.erase(found.it);
01958           if(found.neighborhood->flagged && *found.neighborhood->flagged == v) found.neighborhood->flagged = 0;
01959 #ifndef VVBIGRAPH_NO_EDGE_CACHE
01960         }
01961 #endif
01962       }
01963       in_edges.clear();
01964     }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseAllEdges (  )  [inline]

Clear all the edges in the graph.

Example:

 vvgraph S;
 // Initialize S
 vvgraph::size_type s1 = S.size(); // Save the number of vertices
 S.eraseAllEdges();
 assert(s1 == S.size()); // The number of vertices didn't change
 forall_named(const vertex1_t& v, S, vertex1)
 {
   assert(S.empty(v)); // No neighbor
 }
 forall_named(const vertex2_t& v, S, vertex2)
 {
   assert(S.empty(v)); // No neighbor
 }

Definition at line 2050 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::erase(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges().

02051     {
02052       for(typename neighborhood1_t::iterator it = neighborhood1.begin() ;
02053           it != neighborhood1.end() ; ++it)
02054       {
02055         it->second.edges.clear();
02056         it->second.in_edges.clear();
02057         it->second.flagged = 0;
02058       }
02059       for(typename neighborhood2_t::iterator it = neighborhood2.begin() ;
02060           it != neighborhood2.end() ; ++it)
02061       {
02062         it->second.edges.clear();
02063         it->second.in_edges.clear();
02064         it->second.flagged = 0;
02065       }
02066     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges ( const vertex2_t v  ) 

Clear the neighborhood of a vertex.

All edges, to and from v will be erased.

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseAllEdges ( const vertex1_t v  )  [inline]

Clear the neighborhood of a vertex.

All edges, to and from v will be erased.

Definition at line 1909 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

01910     {
01911       typename neighborhood1_t::iterator it_found = this->findVertex(v);
01912       if(it_found != neighborhood1.end() )
01913       {
01914         eraseAllEdges(it_found);
01915         return true;
01916       }
01917       return false;
01918     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
circ_neighbor_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge ( const vertex2_t v,
circ_neighbor_iterator2  pos 
)

Erase the edge pointed to by the iterator.

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighbor_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge ( const vertex2_t v,
neighbor_iterator2  pos 
)

Erase the edge pointed to by the iterator.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::circ_neighbor_iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseEdge ( const vertex1_t v,
circ_neighbor_iterator1  pos 
) [inline]

Erase the edge pointed to by the iterator.

Definition at line 2658 of file vvbigraph.h.

References util::CircIterator< ForwardIterator >::end(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge(), and util::CircIterator< ForwardIterator >::isInitIterator().

02659     {
02660       neighbor_iterator1 nit =  eraseEdge(v, pos.base());
02661       if(pos.isInitIterator(nit))
02662         return pos.end();
02663       return circ_neighbor_iterator1(pos, nit);
02664     }

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighbor_iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseEdge ( const vertex1_t v,
neighbor_iterator1  pos 
) [inline]

Erase the edge pointed to by the iterator.

Definition at line 2618 of file vvbigraph.h.

References util::SelectMemberIterator< Iterator, T, member, Reference, Pointer >::base(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2.

02619     {
02620       typename neighborhood1_t::iterator it_found = this->findVertex(v);
02621       if(it_found == neighborhood1.end())
02622         return neighbor_iterator1();
02623       const vertex2_t& n = *pos;
02624       typename neighborhood2_t::iterator it_found2 = this->findVertex(n);
02625       if(it_found2 == neighborhood2.end())
02626         return neighbor_iterator1();
02627       size_type result = it_found2->second.in_edges.erase(v);
02628       if(result)
02629       {
02630         typename edge_list1_t::iterator it = pos.base();
02631         return it_found->second.edges.erase(it);
02632       }
02633       return neighbor_iterator1();
02634     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge ( const vertex2_t src,
const vertex1_t tgt 
)

Erase the edge from src to tgt.

Returns:
True if successful.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::size_type graph::VVBiGraph< BIGRAPH_TEMPLATE >::eraseEdge ( const vertex1_t src,
const vertex2_t tgt 
) [inline]

Erase the edge from src to tgt.

Returns:
True if successful.

Definition at line 2678 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge().

02679     {
02680       neighbor1_found_t found = this->findInVertex(v, n);
02681       if(!found)
02682         return false;
02683       if(found.neighborhood->flagged && *found.neighborhood->flagged == n) found.neighborhood->flagged = 0;
02684       found.neighborhood->edges.erase(found.it);
02685       typename lookup2_t::iterator it_found = lookup2.find(n);
02686       if(it_found != lookup2.end())
02687         it_found->second->second.in_edges.erase(v);
02688       return true;
02689     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::find ( const vertex2_t v  )  const [inline]

Find the vertex v in the graph.

Returns:
An iterator on v if found, or end()

Definition at line 1536 of file vvbigraph.h.

01536 { return this->findVertex(v); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::find ( const vertex1_t v  )  const [inline]

Find the vertex v in the graph.

Returns:
An iterator on v if found, or end()

Definition at line 1530 of file vvbigraph.h.

01530 { return this->findVertex(v); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::find ( const vertex2_t v  )  [inline]

Find the vertex v in the graph.

Returns:
An iterator on v if found, or end()

Definition at line 1523 of file vvbigraph.h.

01523 { return this->findVertex(v); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::find ( const vertex1_t v  )  [inline]

Find the vertex v in the graph.

Returns:
An iterator on v if found, or end()

Definition at line 1517 of file vvbigraph.h.

01517 { return this->findVertex(v); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_neighbor_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findIn ( const vertex2_t v,
const vertex1_t n 
) const

Find the vertex n in the neighborhood of v.

Returns:
  • An iterator on n in the neighborhood of v, if found
  • An iterator on the end of the neighborhood if n is not found in v
  • Otherwise, the result is undefined
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::const_neighbor_iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::findIn ( const vertex1_t v,
const vertex2_t n 
) const [inline]

Find the vertex n in the neighborhood of v.

Returns:
  • An iterator on n in the neighborhood of v, if found
  • An iterator on the end of the neighborhood if n is not found in v
  • Otherwise, the result is undefined

Definition at line 2598 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood.

02599     {
02600       const_neighbor1_found_t found = findInVertex(v, n);
02601       if(found.neighborhood)
02602         return const_neighbor_iterator1(found.it);
02603       return const_neighbor_iterator1(found.it);
02604     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighbor_iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findIn ( const vertex2_t v,
const vertex1_t n 
)

Find the vertex n in the neighborhood of v.

Returns:
  • An iterator on n in the neighborhood of v, if found
  • An iterator on the end of the neighborhood if n is not found in v
  • Otherwise, the result is undefined
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighbor_iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::findIn ( const vertex1_t v,
const vertex2_t n 
) [inline]

Find the vertex n in the neighborhood of v.

Returns:
  • An iterator on n in the neighborhood of v, if found
  • An iterator on the end of the neighborhood if n is not found in v
  • Otherwise, the result is undefined

Definition at line 2578 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood.

02579     {
02580       neighbor1_found_t found = findInVertex(v, n);
02581       if(found.neighborhood)
02582         return neighbor_iterator1(found.it);
02583       return neighbor_iterator1();
02584     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_neighbor2_found_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex ( const vertex2_t v,
const vertex1_t neighbor 
) const [protected]

Constant version of findInVertex(const vertex_t&, const vertex_t&).

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::const_neighbor2_found_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::findInVertex ( const vertex1_t v,
const vertex2_t neighbor 
) const [inline, protected]

Constant version of findInVertex(const vertex_t&, const vertex_t&).

Definition at line 2516 of file vvbigraph.h.

References graph::Vertex< VertexContent >::cache, graph::Vertex< VertexContent >::cache_source, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::Vertex< VertexContent >::id(), graph::Vertex< VertexContent >::isNull(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

02517     {
02518       if(v.isNull() || n.isNull())
02519         return const_neighbor1_found_t();
02520 #ifndef VVBIGRAPH_NO_EDGE_CACHE
02521       if(n.cache_source == v.id())
02522       {
02523         EdgeCache1 *cache = reinterpret_cast<EdgeCache1*>(n.cache);
02524         if(cache->graph_id() == graph_id)
02525         {
02526           return const_neighbor1_found_t(cache->it(), cache->neighborhood());
02527         }
02528       }
02529 #endif // VVBIGRAPH_NO_EDGE_CACHE
02530       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02531       if(it_found == neighborhood1.end())
02532         return const_neighbor1_found_t();
02533       const edge_list1_t &lst = it_found->second.edges;
02534       for(typename edge_list1_t::const_iterator it = lst.begin() ;
02535           it != lst.end() ; ++it)
02536       {
02537         if(it->target == n)
02538         {
02539           return const_neighbor1_found_t(it, &it_found->second);
02540         }
02541       }
02542       return const_neighbor1_found_t(lst.end(), &it_found->second, false);
02543     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighbor2_found_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex ( const vertex2_t v,
const vertex1_t neighbor 
) [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 of v and 'it' points toward the neighbor itself.

If 'v' is in the graph, but 'neighbor' is not in the neighborhood, the result is convertible to false, 'neighborhood' points toward the neighborhood of v 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.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighbor2_found_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::findInVertex ( const vertex1_t v,
const vertex2_t neighbor 
) [inline, 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 of v and 'it' points toward the neighbor itself.

If 'v' is in the graph, but 'neighbor' is not in the neighborhood, the result is convertible to false, 'neighborhood' points toward the neighborhood of v 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 2454 of file vvbigraph.h.

References graph::Vertex< VertexContent >::cache, graph::Vertex< VertexContent >::cache_source, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::Vertex< VertexContent >::id(), graph::Vertex< VertexContent >::isNull(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::edge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findIn(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::flag(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nextTo(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::prevTo(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::replace(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceAfter(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceBefore().

02455     {
02456       if(v.isNull() || n.isNull())
02457         return neighbor1_found_t();
02458 #ifndef VVBIGRAPH_NO_EDGE_CACHE
02459       if(n.cache_source == v.id())
02460       {
02461         EdgeCache1 *cache = reinterpret_cast<EdgeCache1*>(n.cache);
02462         if(cache->graph_id() == graph_id)
02463         {
02464           return neighbor1_found_t(cache->it(), cache->neighborhood());
02465         }
02466       }
02467 #endif // VVBIGRAPH_NO_EDGE_CACHE
02468       typename neighborhood1_t::iterator it_found = this->findVertex(v);
02469       if(it_found == neighborhood1.end())
02470         return neighbor1_found_t();
02471       edge_list1_t &lst = it_found->second.edges;
02472       for(typename edge_list1_t::iterator it = lst.begin() ;
02473           it != lst.end() ; ++it)
02474       {
02475         if(it->target == n)
02476         {
02477           return neighbor1_found_t(it, &it_found->second);
02478         }
02479       }
02480       return neighbor1_found_t(lst.end(), &it_found->second, false);
02481     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighborhood2_t::const_iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex ( const vertex2_t v  )  const [protected]

Constant version of findVertex(const vertex2_t&).

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighborhood2_t::const_iterator graph::VVBiGraph< BIGRAPH_TEMPLATE >::findVertex ( const vertex1_t v  )  const [inline, protected]

Constant version of findVertex(const vertex1_t&).

Definition at line 2408 of file vvbigraph.h.

References graph::Vertex< VertexContent >::cache, graph::Vertex< VertexContent >::cache_source, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

02409     {
02410 #ifndef VVBIGRAPH_NO_VERTEX_CACHE
02411       if(v.cache)
02412       {
02413         if(v.cache_source == 0)
02414         {
02415           VertexCache1* cache = reinterpret_cast<VertexCache1*>(v.cache);
02416           if(cache->graph_id() == graph_id)
02417           {
02418             return cache->neighborhood();
02419           }
02420         }
02421       }
02422 #endif // VVBIGRAPH_NO_VERTEX_CACHE
02423       typename lookup1_t::const_iterator it_found = lookup1.find(v);
02424       if(it_found != lookup1.end())
02425         return it_found->second;
02426       return neighborhood1.end();
02427     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighborhood2_t::iterator graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex ( const vertex2_t v  )  [protected]

Find a vertex in the graph and returns the iterator on it.

Goal is to introduce a new optimization. When iterating over the vertices of the graph, they will cache their own iterator. So accessing their neighborhood would be constant time.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighborhood2_t::iterator graph::VVBiGraph< BIGRAPH_TEMPLATE >::findVertex ( const vertex1_t v  )  [inline, protected]

Find a vertex in the graph and returns the iterator on it.

Goal is to introduce a new optimization. When iterating over the vertices of the graph, they will cache their own iterator. So accessing their neighborhood would be constant time.

Definition at line 2362 of file vvbigraph.h.

References graph::Vertex< VertexContent >::cache, graph::Vertex< VertexContent >::cache_source, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::anyIn(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::contains(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::empty(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::find(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::flagged(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iAnyIn(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iEmpty(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iNeighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iValence(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::reference(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::replace(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::source(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::target(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::valence().

02363     {
02364 #ifndef VVBIGRAPH_NO_VERTEX_CACHE
02365       if(v.cache)
02366       {
02367         if(v.cache_source == 0)
02368         {
02369           VertexCache1* cache = reinterpret_cast<VertexCache1*>(v.cache);
02370           if(cache->graph_id() == graph_id)
02371           {
02372             return cache->neighborhood();
02373           }
02374         }
02375       }
02376 #endif // VVBIGRAPH_NO_VERTEX_CACHE
02377       typename lookup1_t::const_iterator it_found = lookup1.find(v);
02378       if(it_found != lookup1.end())
02379         return it_found->second;
02380       return neighborhood1.end();
02381     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::flag ( const vertex2_t src,
const vertex1_t neighbor 
)

Flag a neighbor of src for quick retrieval.

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::flag ( const vertex1_t src,
const vertex2_t neighbor 
) [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::flagged ( const vertex2_t src  )  const

Return the flagged neighbor of src.

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::flagged ( const vertex1_t src  )  const [inline]

Return the flagged neighbor of src.

Definition at line 2990 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::Vertex< VertexContent >::null.

02991     {
02992       typename neighborhood1_t::const_iterator it_found = this->findVertex(src);
02993       if(it_found == neighborhood1.end() or it_found->second.flagged == 0)
02994         return vertex2_t::null;
02995       return *it_found->second.flagged;
02996     }

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::get_vertex1 ( size_type  idx  )  const [inline]

Return the vertex of type 1 of index idx.

Note:
This is a convenience function whose complexity if O(idx)
Returns:
The element idx position after the first one (using iterators)

Definition at line 2200 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

02201     {
02202       typename neighborhood1_t::const_iterator it = neighborhood1.begin();
02203       std::advance(it, idx);
02204       return it->first;
02205     }

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex2_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::get_vertex2 ( size_type  idx  )  const [inline]

Return the vertex of type 2 of index idx.

Note:
This is a convenience function whose complexity if O(idx)
Returns:
The element idx position after the first one (using iterators)

Definition at line 2209 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2.

02210     {
02211       typename neighborhood2_t::const_iterator it = neighborhood2.begin();
02212       std::advance(it, idx);
02213       return it->first;
02214     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iAnyIn ( const vertex2_t v  )  const

Returns any incoming neighbor of v.

Returns:
A vertex in the incoming neighborhood of v, or a null vertex if v is not in the graph or v has no incoming neighbor.
template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::iAnyIn ( const vertex1_t v  )  const [inline]

Returns any incoming neighbor of v.

Returns:
A vertex in the incoming neighborhood of v, or a null vertex if v is not in the graph or v has no incoming neighbor.

Definition at line 2290 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::Vertex< VertexContent >::null.

Referenced by algorithms::TriangleGrowth::readOBJs().

02291     {
02292       if(v.isNull())
02293         return vertex2_t::null;//vertex_t(0);
02294       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02295       if(it_found == neighborhood1.end() || it_found->second.in_edges.empty())
02296         return vertex2_t::null;//vertex_t(0);
02297       const in_edges1_t& lst = it_found->second.in_edges;
02298       return *lst.begin();
02299     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iEmpty ( const vertex2_t v  )  const

Test if a vertex has an incoming neighbor.

Returns false if it does. If a vertex is not in the graph, it is considered as having no incoming neighbor. In the same way, the null vertex has no incoming neighbors.

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::iEmpty ( const vertex1_t v  )  const [inline]

Test if a vertex has an incoming neighbor.

Returns false if it does. If a vertex is not in the graph, it is considered as having no incoming neighbor. In the same way, the null vertex has no incoming neighbors.

Definition at line 2339 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by algorithms::TriangleGrowth::readOBJs().

02340     {
02341       if(v.isNull())
02342         return true;
02343       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02344       if(it_found == neighborhood1.end())
02345         return true;
02346       return it_found->second.in_edges.empty();
02347     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
ineighbor_iterator2_range graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iNeighbors ( const vertex2_t v  )  const

Return the range of incoming neighbors of v.

Iterating over iNeighbors will go through all the vertices having an edge toward v.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::ineighbor_iterator2_range graph::VVBiGraph< BIGRAPH_TEMPLATE >::iNeighbors ( const vertex1_t v  )  const [inline]

Return the range of incoming neighbors of v.

Iterating over iNeighbors will go through all the vertices having an edge toward v.

Definition at line 3265 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), util::make_range(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by algorithms::TriangleGrowth::readOBJs().

03266     {
03267       ineighbor_iterator1_range result;
03268       if(v.isNull())
03269         return result;
03270       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
03271       if(it_found == neighborhood1.end())
03272         return result;
03273       const in_edges1_t &lst = it_found->second.in_edges;
03274       result = util::make_range(ineighbor_iterator1(lst.begin()),
03275                                 ineighbor_iterator1(lst.end()));
03276       return result;
03277     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
void graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert ( iterator2  first,
iterator2  last 
)

Insert all the vertices from first to last-1 in the graph.

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::insert ( iterator1  first,
iterator1  last 
) [inline]

Insert all the vertices from first to last-1 in the graph.

Definition at line 2163 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert().

02164     {
02165       for(iterator1 it = first ; it != last ; ++it)
02166       {
02167         insert(*it);
02168       }
02169     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert ( iterator2  pos,
const vertex2_t v 
)

Insert a new vertex in the graph.

The iterator is ignored ...

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::insert ( iterator1  pos,
const vertex1_t v 
) [inline]

Insert a new vertex in the graph.

The iterator is ignored ...

Definition at line 2150 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert().

02151     {
02152       return this->insert(v);
02153     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
iterator2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert ( const vertex2_t v  ) 

Insert a new vertex in the graph.

Returns:
An iterator on the inserted vertex.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::iterator2 graph::VVBiGraph< BIGRAPH_TEMPLATE >::insert ( const vertex1_t v  )  [inline]

Insert a new vertex in the graph.

Returns:
An iterator on the inserted vertex.

Definition at line 2084 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, util::tie(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateVertexCache().

Referenced by algorithms::TriangleGrowth::init(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert(), and algorithms::TriangleGrowth::readOBJs().

02085     {
02086       typename lookup1_t::iterator it_found;
02087       bool inserted;
02088       util::tie(it_found, inserted) = lookup1.insert(std::make_pair(v, typename neighborhood1_t::iterator()));
02089       if(inserted)
02090       {
02091         neighborhood1.push_front(std::make_pair(v,single_neighborhood1_t()));
02092         typename neighborhood1_t::iterator it = neighborhood1.begin();
02093         it_found->second = it;
02094         updateVertexCache(it->first, it);
02095         return it;
02096       }
02097       return it_found->second;
02098 
02099       //neighborhood1.push_front(std::make_pair(v,single_neighborhood1_t()));
02100       //typename neighborhood1_t::iterator it = neighborhood1.begin();
02101       //lookup1[v] = it;
02102       //updateVertexCache(it->first, it);
02103       //return it;
02104     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertEdge ( const vertex2_t src,
const vertex1_t tgt 
)

Insert a new edge in the graph, without ordering.

If new_neighbor is already in the neighborhood of v, the insertion fails.

Returns:
The just created edge if everything succeed, or a null edge.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::insertEdge ( const vertex1_t src,
const vertex2_t tgt 
) [inline]

Insert a new edge in the graph, without ordering.

If new_neighbor is already in the neighborhood of v, the insertion fails.

Returns:
The just created edge if everything succeed, or a null edge.

Definition at line 3096 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::Vertex< VertexContent >::id(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertInEdge(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, util::tie(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache().

Referenced by algorithms::TriangleGrowth::init(), and algorithms::TriangleGrowth::readOBJs().

03098     {
03099       if(v.isNull() || new_neighbor.isNull())
03100         return edge1_t();
03101       typename neighborhood1_t::iterator it_found = this->findVertex(v);
03102       if(it_found == neighborhood1.end())
03103         return edge1_t();
03104       ineighbor_iterator2 it_in;
03105       bool inserted;
03106       util::tie(it_in, inserted) = insertInEdge(v, new_neighbor);
03107       if(!inserted)
03108         return edge1_t();
03109       edge_list1_t &lst = it_found->second.edges;
03110       lst.push_front(neighbor1_t(new_neighbor, Edge1Content(), it_found->second, graph_id));
03111       typename edge_list1_t::iterator it = lst.begin();
03112       updateEdgeCache(v, it, *it_in);
03113       return edge1_t(v.id(), new_neighbor.id(), &*it);
03114     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
std::pair<ineighbor_iterator1,bool> graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertInEdge ( const vertex2_t v,
const vertex1_t new_neighbor 
) [protected]

Insert v in the in_edges of new_neighbor and return true if the insertion was actually done, or false if v was already there.

template<BIGRAPH_TEMPLATE >
std::pair< typename VVBiGraph< BIGRAPH_ARGS >::ineighbor_iterator1, bool > graph::VVBiGraph< BIGRAPH_TEMPLATE >::insertInEdge ( const vertex1_t v,
const vertex2_t new_neighbor 
) [inline, protected]

Insert v in the in_edges of new_neighbor and return true if the insertion was actually done, or false if v was already there.

Definition at line 2720 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::replace(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceAfter(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceBefore().

02721     {
02722       typename lookup2_t::iterator found = lookup2.find(new_neighbor);
02723       if(found == lookup2.end())
02724         return std::make_pair(ineighbor_iterator2(), false);
02725       return found->second->second.in_edges.insert(v);
02726     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iValence ( const vertex2_t v  )  const

Returns the number of incoming neighbors of v.

The incoming neighbors are the set of vertices with on edge ending on v.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::size_type graph::VVBiGraph< BIGRAPH_TEMPLATE >::iValence ( const vertex1_t v  )  const [inline]

Returns the number of incoming neighbors of v.

The incoming neighbors are the set of vertices with on edge ending on v.

Definition at line 2316 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by algorithms::TriangleGrowth::readOBJs().

02317     {
02318       if(v.isNull())
02319         return 0;
02320       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
02321       if(it_found == neighborhood1.end())
02322         return 0;
02323       return it_found->second.in_edges.size();
02324     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nb_vertices1 (  )  const [inline]

Return the number of vertices on the graph.

Definition at line 921 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::size().

00921 { return neighborhood1.size(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nb_vertices2 (  )  const [inline]

Return the number of vertices on the graph.

Definition at line 925 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::size().

00925 { return neighborhood2.size(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
circ_neighbor_iterator2_range graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors ( const vertex2_t v,
const vertex1_t n 
)

Return the range of neighbors of v starting from n.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::circ_neighbor_iterator2_range graph::VVBiGraph< BIGRAPH_TEMPLATE >::neighbors ( const vertex1_t v,
const vertex2_t n 
) [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_circ_neighbor_iterator2_range graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors ( const vertex2_t v,
const vertex1_t n 
) const

Return the constant range of neighbors of v starting from n.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::const_circ_neighbor_iterator2_range graph::VVBiGraph< BIGRAPH_TEMPLATE >::neighbors ( const vertex1_t v,
const vertex2_t n 
) const [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighbor_iterator2_range graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors ( const vertex2_t v  ) 

Return the range of neighbors of v.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::neighbor_iterator2_range graph::VVBiGraph< BIGRAPH_TEMPLATE >::neighbors ( const vertex1_t v  )  [inline]

Return the range of neighbors of v.

Definition at line 3171 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), util::make_range(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

03172     {
03173       neighbor_iterator1_range result;
03174       if(v.isNull())
03175         return result;
03176       typename neighborhood1_t::iterator it_found = this->findVertex(v);
03177       if(it_found == neighborhood1.end())
03178         return result;
03179       edge_list1_t &lst = it_found->second.edges;
03180       result = util::make_range(neighbor_iterator1(lst.begin()), neighbor_iterator1(lst.end()));
03181       return result;
03182     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_neighbor_iterator2_range graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors ( const vertex2_t v  )  const

Return the constant range of neighbors of v.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::const_neighbor_iterator2_range graph::VVBiGraph< BIGRAPH_TEMPLATE >::neighbors ( const vertex1_t v  )  const [inline]

Return the constant range of neighbors of v.

Definition at line 3140 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::isNull(), util::make_range(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1.

Referenced by vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::border(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::connectFromJunctions(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::divideCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCellContour(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawSimplifiedCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), vvcomplex::findCenter(), vvcomplex::FindOppositeWall(), and algorithms::TriangleGrowth::readOBJs().

03141     {
03142       const_neighbor_iterator1_range result;
03143       if(v.isNull())
03144         return result;
03145       typename neighborhood1_t::const_iterator it_found = this->findVertex(v);
03146       if(it_found == neighborhood1.end())
03147         return result;
03148       const edge_list1_t &lst = it_found->second.edges;
03149       result = util::make_range(const_neighbor_iterator1(lst.begin()),
03150                                 const_neighbor_iterator1(lst.end()));
03151       return result;
03152     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::nextTo ( const vertex2_t v,
const vertex1_t neighbor,
unsigned int  n = 1 
) const

Returns the nth vertex after neighbor in the neighborhood of v.

Returns:
The vertex found or a null vertex if there is any problem.
template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::nextTo ( const vertex1_t v,
const vertex2_t neighbor,
unsigned int  n = 1 
) const [inline]

Returns the nth vertex after neighbor in the neighborhood of v.

Returns:
The vertex found or a null vertex if there is any problem.

Definition at line 2846 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood, and graph::Vertex< VertexContent >::null.

Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads(), algorithms::TriangleSurface::center3d(), algorithms::TriangleSurface::centerPosition(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::connectFromJunctions(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::deleteJunction(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), vvcomplex::FindOppositeWall(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::mergeCells(), algorithms::TriangleSurface::position(), algorithms::TriangleGrowth::readOBJs(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::splitWall(), and vvcomplex::testDivisionOnVertices().

02849     {
02850       const_neighbor1_found_t found = findInVertex(v, ref);
02851       if(!found)
02852         return vertex2_t::null;//vertex_t(0);
02853       typename edge_list1_t::const_iterator it = found.it;
02854       const edge_list1_t& lst = found.neighborhood->edges;
02855       for(unsigned int i = 0 ; i < n ; ++i)
02856       {
02857         ++it;
02858         if(it == lst.end())
02859           it = lst.begin();
02860       }
02861       return it->target;
02862     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::no_vertex1 (  )  const [inline]

Test if there is any vertex in the graph.

Definition at line 934 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::empty().

00934 { return neighborhood1.empty(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
bool graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::no_vertex2 (  )  const [inline]

Test if there is any vertex in the graph.

Definition at line 938 of file vvbigraph.h.

Referenced by graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::empty().

00938 { return neighborhood2.empty(); }

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS > & graph::VVBiGraph< BIGRAPH_TEMPLATE >::operator= ( const VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact > &  other  )  [inline]

Copy the graph into another graph.

Definition at line 3491 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateVertexCache().

03492     {
03493       // Copy the structure
03494       neighborhood1 = other.neighborhood1;
03495       neighborhood2 = other.neighborhood2;
03496       lookup1.clear();
03497       lookup2.clear();
03498       for(typename neighborhood1_t::iterator it1 = neighborhood1.begin() ;
03499           it1 != neighborhood1.end() ; ++it1)
03500         lookup1[it1->first] = it1;
03501       for(typename neighborhood2_t::iterator it2 = neighborhood2.begin() ;
03502           it2 != neighborhood2.end() ; ++it2)
03503         lookup2[it2->first] = it2;
03504       // And reconstruct the cache for vertex type 1
03505       for(typename neighborhood1_t::iterator it1 = neighborhood1.begin() ;
03506           it1 != neighborhood1.end() ; ++it1)
03507       {
03508         const vertex1_t& src = it1->first;
03509         updateVertexCache(src, it1);
03510 #ifndef VVBIGRAPH_NO_EDGE_CACHE
03511         edge_list1_t& lst = it1->second.edges;
03512         for(typename edge_list1_t::iterator it1_e = lst.begin() ;
03513             it1_e != lst.end() ; ++it1_e)
03514         {
03515           // Find the incoming vertex corresponding to this edge
03516           typename lookup2_t::iterator it_found = lookup2.find(it1_e->target);
03517           const vertex1_t& iv = *(it_found->second->second.in_edges.find(src));
03518           updateEdgeCache(src, it1_e, iv);
03519           it1_e->set(&it1->second, graph_id);
03520         }
03521 #endif
03522       }
03523       // And reconstruct the cache for vertex type 2
03524       for(typename neighborhood2_t::iterator it2 = neighborhood2.begin() ;
03525           it2 != neighborhood2.end() ; ++it2)
03526       {
03527         const vertex2_t& src = it2->first;
03528         updateVertexCache(src, it2);
03529 #ifndef VVBIGRAPH_NO_EDGE_CACHE
03530         edge_list2_t& lst = it2->second.edges;
03531         for(typename edge_list2_t::iterator it2_e = lst.begin() ;
03532             it2_e != lst.end() ; ++it2_e)
03533         {
03534           // Find the incoming vertex corresponding to this edge
03535           typename lookup1_t::iterator it_found = lookup1.find(it2_e->target);
03536           const vertex2_t& iv = *(it_found->second->second.in_edges.find(src));
03537           updateEdgeCache(src, it2_e, iv);
03538           it2_e->set(&it2->second, graph_id);
03539         }
03540 #endif
03541       }
03542       return *this;
03543     }

template<BIGRAPH_TEMPLATE >
bool graph::VVBiGraph< BIGRAPH_TEMPLATE >::operator== ( const VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact > &  other  )  const [inline]

Test equality for the graphs.

Two graphs are equal if they shared the sames vertices and their neighborhood are equivalent.

Note:
Current implementation do not consider invariance of neighborhood by rotation.

Definition at line 3405 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1, and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2.

03406     {
03407       if(neighborhood1.size() != other.neighborhood1.size() or
03408          neighborhood2.size() != other.neighborhood2.size())
03409         return false;
03410       for(typename neighborhood1_t::const_iterator it1 = neighborhood1.begin() ;
03411           it1 != neighborhood1.end() ; ++it1)
03412       {
03413         const vertex1_t& v1 = it1->first;
03414         typename lookup1_t::const_iterator it_found = other.lookup1.find(v1);
03415         if(it_found == other.lookup1.end())
03416           return false;
03417         if(it1->second.edges.empty())
03418         {
03419           if(!it_found->second->second.edges.empty())
03420             return false;
03421         }
03422         else
03423         {
03424           const edge_list1_t& lst = it1->second.edges;
03425           const edge_list1_t& olst = it_found->second->second.edges;
03426           if(lst.size() != olst.size()) return false;
03427           const vertex2_t& v2 = lst.begin()->target;
03428           bool found = false;
03429           for(typename edge_list1_t::const_iterator it_olst = olst.begin() ;
03430               it_olst != olst.end() ; ++it_olst)
03431           {
03432             if(it_olst->target == v2)
03433             {
03434               found = true;
03435               for(typename edge_list1_t::const_iterator it_lst = lst.begin() ;
03436                   it_lst != lst.end() ; ++it_lst)
03437               {
03438                 if(it_lst->target != it_olst->target) return false;
03439                 ++it_olst;
03440                 if(it_olst == olst.end()) it_olst = olst.begin();
03441               }
03442               break;
03443             }
03444           }
03445           if(!found) return false;
03446         }
03447       }
03448       for(typename neighborhood2_t::const_iterator it2 = neighborhood2.begin() ;
03449           it2 != neighborhood2.end() ; ++it2)
03450       {
03451         const vertex2_t& v2 = it2->first;
03452         typename lookup2_t::const_iterator it_found = other.lookup2.find(v2);
03453         if(it_found == other.lookup2.end())
03454           return false;
03455         if(it2->second.edges.empty())
03456         {
03457           if(!it_found->second->second.edges.empty())
03458             return false;
03459         }
03460         else
03461         {
03462           const edge_list2_t& lst = it2->second.edges;
03463           const edge_list2_t& olst = it_found->second->second.edges;
03464           if(lst.size() != olst.size()) return false;
03465           const vertex1_t& v1 = lst.begin()->target;
03466           bool found = false;
03467           for(typename edge_list2_t::const_iterator it_olst = olst.begin() ;
03468               it_olst != olst.end() ; ++it_olst)
03469           {
03470             if(it_olst->target == v1)
03471             {
03472               found = true;
03473               for(typename edge_list2_t::const_iterator it_lst = lst.begin() ;
03474                   it_lst != lst.end() ; ++it_lst)
03475               {
03476                 if(it_lst->target != it_olst->target) return false;
03477                 ++it_olst;
03478                 if(it_olst == olst.end()) it_olst = olst.begin();
03479               }
03480               break;
03481             }
03482           }
03483           if(!found) return false;
03484         }
03485       }
03486       return true;
03487     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::prevTo ( const vertex2_t v,
const vertex1_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.

template<BIGRAPH_TEMPLATE >
const VVBiGraph< BIGRAPH_ARGS >::vertex1_t & graph::VVBiGraph< BIGRAPH_TEMPLATE >::prevTo ( const vertex1_t v,
const vertex2_t ref,
unsigned int  n = 1 
) const [inline]

Returns the nth vertex before ref in the neighborhood of v.

If ref is not in the neighborhood of v, return a null vertex.

Definition at line 2886 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood, and graph::Vertex< VertexContent >::null.

Referenced by tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::calcQuads(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::connectFromJunctions(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::deleteJunction(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawCell(), tissue::Tissue< Model, CellContent, JunctionContent, WallContent, CellEdgeContent, CellJunctionContent, JunctionCellContent, compact, LeafClass >::drawWalledCell(), vvcomplex::findCenter(), vvcomplex::VVComplex< MANDATORY_COMPLEX_TEMPLATE_ARGS, RESOLVE_LEAF_CLASS(LeafClass, Tissue< ALL_COMPLEX_TEMPLATE_ARGS >)>::mergeCells(), and algorithms::TriangleGrowth::readOBJs().

02889     {
02890       const_neighbor1_found_t found = findInVertex(v, ref);
02891       if(!found)
02892         return vertex2_t::null;//vertex_t(0);
02893       typename edge_list1_t::const_iterator it = found.it;
02894       const edge_list1_t& lst = found.neighborhood->edges;
02895       for(unsigned int i = 0 ; i < n ; ++i)
02896       {
02897         if(it == lst.begin())
02898           it = lst.end();
02899         --it;
02900       }
02901       return it->target;
02902     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex2_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::reference ( vertex2_t  v  )  const [inline]

Get a reference on the vertex in the graph.

If the vertex do not exist in the graph, the result is totally undefined and the program might even crash.

Definition at line 910 of file vvbigraph.h.

00911                {
00912                  typename neighborhood2_t::const_iterator found = this->findVertex(v);
00913                  if(found != neighborhood2.end())
00914                    return found->first;
00915                  return vertex2_t::null;//vertex_t(0);
00916                }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::reference ( vertex1_t  v  )  const [inline]

Get a reference on the vertex in the graph.

If the vertex do not exist in the graph, the result is totally undefined and the program might even crash.

Definition at line 897 of file vvbigraph.h.

Referenced by algorithms::TriangleSurface::center3d(), algorithms::TriangleSurface::centerPosition(), and algorithms::TriangleGrowth::init().

00898                {
00899                  typename neighborhood1_t::const_iterator found = this->findVertex(v);
00900                  if(found != neighborhood1.end())
00901                    return found->first;
00902                  return vertex1_t::null;//vertex_t(0);
00903                }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::replace ( const vertex2_t v,
const vertex1_t neighbor,
const vertex1_t new_neighbor 
)

Replace a vertex by another in a neighborhood.

Parameters:
[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.

Returns:
The edge between v and new_neighbor or a null edge if anything goes wrong.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::replace ( const vertex1_t v,
const vertex2_t neighbor,
const vertex2_t new_neighbor 
) [inline]

Replace a vertex by another in a neighborhood.

Parameters:
[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.

Returns:
The edge between v and new_neighbor or a null edge if anything goes wrong.

Definition at line 2796 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::Vertex< VertexContent >::id(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertInEdge(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, util::tie(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache().

02799     {
02800       if(new_neighbor.isNull() || (neighbor == new_neighbor))
02801         return edge1_t();
02802       neighbor1_found_t found = findInVertex(v, neighbor);
02803       if(!found)
02804         return edge1_t();
02805       typename neighborhood2_t::iterator n_found = this->findVertex(neighbor);
02806       ineighbor_iterator2 it_in;
02807       bool inserted;
02808       util::tie(it_in, inserted) = insertInEdge(v, new_neighbor);
02809       if(!inserted)
02810         return edge1_t();
02811       n_found->second.in_edges.erase(v);
02812       found.it->target = new_neighbor;
02813       found.it->clear_edge();
02814       updateEdgeCache(v, found.it, *it_in);
02815       if(n_found->second.flagged and *n_found->second.flagged == neighbor) n_found->second.flagged = 0;
02816       return edge1_t(v.id(), new_neighbor.id(), &*found.it);
02817     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::size (  )  const [inline]

Return the number of vertices on the graph.

Definition at line 929 of file vvbigraph.h.

00929 { return this->nb_vertices1() + this->nb_vertices2(); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex2_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::source ( const edge2_t edge  )  const [inline]

Return the source vertex of the edge.

Definition at line 1177 of file vvbigraph.h.

01178                {
01179                  typename neighborhood2_t::const_iterator found = this->findVertex(vertex2_t(edge.source()));
01180                  if(found != neighborhood2.end())
01181                    return found->first;
01182                  return vertex2_t::null;//vertex_t(0);
01183                }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::source ( const edge1_t edge  )  const [inline]

Return the source vertex of the edge.

Definition at line 1166 of file vvbigraph.h.

01167                {
01168                  typename neighborhood1_t::const_iterator found = this->findVertex(vertex1_t(edge.source()));
01169                  if(found != neighborhood1.end())
01170                    return found->first;
01171                  return vertex1_t::null;//vertex_t(0);
01172                }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceAfter ( const vertex2_t v,
const vertex1_t neighbor,
const vertex1_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.

Returns:
The just created edge if everything succeed, or a null edge.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::spliceAfter ( const vertex1_t v,
const vertex2_t neighbor,
const vertex2_t new_neighbor 
) [inline]

Insert neighbor in the neighborhood of v after reference.

If new_neighbor is already in the neighborhood of v, the insertion fails.

Returns:
The just created edge if everything succeed, or a null edge.

Definition at line 3010 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::Vertex< VertexContent >::id(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertInEdge(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood, util::tie(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache().

Referenced by algorithms::TriangleGrowth::init(), and algorithms::TriangleGrowth::readOBJs().

03013     {
03014       if(new_neighbor.isNull())
03015         return edge1_t();
03016       neighbor1_found_t found = findInVertex(v, neighbor);
03017       if(!found)
03018         return edge1_t();
03019       ineighbor_iterator2 it_in;
03020       bool inserted;
03021       util::tie(it_in, inserted) = insertInEdge(v, new_neighbor);
03022       if(!inserted)
03023         return edge1_t();
03024       ++found.it;
03025       typename edge_list1_t::iterator new_edge_it = found.neighborhood->edges.insert(found.it, neighbor1_t(new_neighbor, Edge1Content(), *found.neighborhood, graph_id));
03026       updateEdgeCache(v, new_edge_it, *it_in);
03027       return edge1_t(v.id(), new_neighbor.id(), &*new_edge_it);
03028     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
edge2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceBefore ( const vertex2_t v,
const vertex1_t neighbor,
const vertex1_t new_neighbor 
)

Insert neighbor in the neighborhood of v before reference.

If new_neighbor is already in the neighborhood of v, the insertion fails.

Returns:
The just created edge if everything succeed, or a null edge.
template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::edge2_t graph::VVBiGraph< BIGRAPH_TEMPLATE >::spliceBefore ( const vertex1_t v,
const vertex2_t neighbor,
const vertex2_t new_neighbor 
) [inline]

Insert neighbor in the neighborhood of v before reference.

If new_neighbor is already in the neighborhood of v, the insertion fails.

Returns:
The just created edge if everything succeed, or a null edge.

Definition at line 3054 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id, graph::Vertex< VertexContent >::id(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertInEdge(), graph::Vertex< VertexContent >::isNull(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::it, graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::search_result_t< Neighborhood, Iterator >::neighborhood, util::tie(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache().

Referenced by algorithms::TriangleGrowth::readOBJs().

03057     {
03058       if(new_neighbor.isNull())
03059         return edge1_t();
03060       neighbor1_found_t found = findInVertex(v, neighbor);
03061       if(!found)
03062         return edge1_t();
03063       ineighbor_iterator2 it_in;
03064       bool inserted;
03065       util::tie(it_in, inserted) = insertInEdge(v, new_neighbor);
03066       if(!inserted)
03067         return edge1_t();
03068       typename edge_list1_t::iterator new_edge_it = found.neighborhood->edges.insert(found.it, neighbor1_t(new_neighbor, Edge1Content(), *found.neighborhood, graph_id));
03069       updateEdgeCache(v, new_edge_it, *it_in);
03070       return edge1_t(v.id(), new_neighbor.id(), &*new_edge_it);
03071     }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::swap ( VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact > &  other  )  [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex1_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::target ( const edge2_t edge  )  const [inline]

Return the target vertex of the edge.

Definition at line 1199 of file vvbigraph.h.

01200                {
01201                  typename neighborhood1_t::const_iterator found = this->findVertex(vertex1_t(edge.target()));
01202                  if(found != neighborhood1.end())
01203                    return found->first;
01204                  return vertex1_t::null;//vertex_t(0);
01205                }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const vertex2_t& graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::target ( const edge1_t edge  )  const [inline]

Return the target vertex of the edge.

Definition at line 1188 of file vvbigraph.h.

01189                {
01190                  typename neighborhood2_t::const_iterator found = this->findVertex(vertex2_t(edge.target()));
01191                  if(found != neighborhood2.end())
01192                    return found->first;
01193                  return vertex2_t::null;//vertex_t(0);
01194                }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::undoInEdge ( const vertex2_t new_neighbor,
ineighbor_iterator2 it 
) [inline, protected]

Undo the insertion of an in edge as a roll-back mechanism if the whole edge insertion fails.

Definition at line 2739 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2.

02741     {
02742       typename lookup2_t::iterator found = lookup2.find(new_neighbor);
02743       if(found == lookup2.end())
02744         return;
02745       found->second->second.in_edges.erase(it);
02746     }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::undoInEdge ( const vertex1_t new_neighbor,
ineighbor_iterator1 it 
) [inline, protected]

Undo the insertion of an in edge as a roll-back mechanism if the whole edge insertion fails.

Definition at line 2749 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1.

02751     {
02752       typename lookup1_t::iterator found = lookup1.find(new_neighbor);
02753       if(found == lookup1.end())
02754         return;
02755       found->second->second.in_edges.erase(it);
02756     }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
void graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::updateEdgeCache ( const vertex2_t v,
typename edge_list2_t::iterator  new_edge_it,
const vertex2_t in_edge 
) [protected]

Update the edge cache information of vertex v in its neighborhood and the in_edge too.

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::updateEdgeCache ( const vertex1_t v,
typename edge_list1_t::iterator  new_edge_it,
const vertex1_t in_edge 
) [inline, protected]

Update the edge cache information of vertex v in its neighborhood and the in_edge too.

Definition at line 2759 of file vvbigraph.h.

References graph::Vertex< VertexContent >::cache, graph::Vertex< VertexContent >::cache_source, and graph::Vertex< VertexContent >::id().

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::operator=(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::replace(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceAfter(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::spliceBefore().

02762     {
02763 #ifndef VVBIGRAPH_NO_EDGE_CACHE
02764       // Caching in the neighbor
02765       neighbor1_t& neighbor = *new_edge_it;
02766       neighbor.setIt(new_edge_it);
02767       neighbor.target.cache_source = v.id();
02768       neighbor.target.cache = reinterpret_cast<void*>(&neighbor);
02769 
02770       // Caching in the incoming edge source
02771       in_edge.cache_source = v.id();
02772       in_edge.cache = reinterpret_cast<void*>(&neighbor);
02773 #endif // VVBIGRAPH_NO_EDGE_CACHE
02774     }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::updateVertexCache ( const vertex2_t v,
typename neighborhood2_t::iterator  it 
) [inline, protected]

Update the vertex cache for vertex v.

Definition at line 2140 of file vvbigraph.h.

References graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id.

02142     {
02143 #ifndef VVBIGRAPH_NO_VERTEX_CACHE
02144       it->second.update(graph_id, v, it);
02145 #endif
02146     }

template<BIGRAPH_TEMPLATE >
void graph::VVBiGraph< BIGRAPH_TEMPLATE >::updateVertexCache ( const vertex1_t v,
typename neighborhood1_t::iterator  it 
) [inline, protected]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
size_type graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::valence ( const vertex2_t v  )  const

Returns the number of neighbors of v.

If v is not in the graph, the behavior is undefined.

template<BIGRAPH_TEMPLATE >
VVBiGraph< BIGRAPH_ARGS >::size_type graph::VVBiGraph< BIGRAPH_TEMPLATE >::valence ( const vertex1_t v  )  const [inline]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
range_vertex1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertices1 (  )  [inline]

Returns a range of vertices.

Definition at line 1488 of file vvbigraph.h.

01488 { return util::make_range(begin_vertex1(), end_vertex1()); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_range_vertex1 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertices1 (  )  const [inline]

Returns a range of vertices.

Definition at line 1479 of file vvbigraph.h.

01479 { return util::make_range(begin_vertex1(), end_vertex1()); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
range_vertex2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertices2 (  )  [inline]

Returns a range of vertices.

Definition at line 1492 of file vvbigraph.h.

01492 { return util::make_range(begin_vertex2(), end_vertex2()); }

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
const_range_vertex2 graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::vertices2 (  )  const [inline]

Returns a range of vertices.

Definition at line 1483 of file vvbigraph.h.

01483 { return util::make_range(begin_vertex2(), end_vertex2()); }


Member Data Documentation

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
intptr_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::graph_id [protected]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
lookup1_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup1 [protected]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
lookup2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::lookup2 [protected]
template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighborhood1_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood1 [protected]

Main data structure containing the neighborhood of the vertex1's.

Definition at line 1829 of file vvbigraph.h.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::any_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::anyIn(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::begin_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::clear(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::clear(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::contains(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::empty(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::end_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::erase(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findInVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::findVertex(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::flagged(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::get_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iAnyIn(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iEmpty(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iNeighbors(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insert(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::insertEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::iValence(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::nb_vertices1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighbors(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::no_vertex1(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::operator=(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::operator==(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::reference(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::source(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::swap(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::target(), and graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::valence().

template<typename Vertex1Content, typename Vertex2Content, typename Edge1Content = _EmptyBiEdgeContent, typename Edge2Content_ = Edge1Content, bool compact = false>
neighborhood2_t graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::neighborhood2 [protected]

Main data structure containing the neighborhood of the vertex2's.

Definition at line 1833 of file vvbigraph.h.

Referenced by graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::any_vertex2(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::begin_vertex2(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::clear(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::end_vertex2(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseAllEdges(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::eraseEdge(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::get_vertex2(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::nb_vertices2(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::no_vertex2(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::operator=(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::operator==(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::reference(), graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::source(), graph::VVBiGraph< Vertex1Content, Vertex2Content, Edge1Content, Edge2Content_, compact >::swap(), and graph::VVBiGraph< typename cell::content_t, typename junction::content_t >::target().


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Generated on Fri May 31 15:38:10 2013 for VVE by  doxygen 1.6.3