OpenFPM_pdata  1.1.0
Project that contain the implementation of distributed structures
 All Data Structures Namespaces Functions Variables Typedefs Enumerations Friends Pages
Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > Class Template Reference

Structure that store a graph in CSR format or basically in compressed adjacency matrix format. More...

Detailed Description

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
class Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >

Structure that store a graph in CSR format or basically in compressed adjacency matrix format.

Parameters
Veach vertex will encapsulate have this type
Eeach edge will encapsulate this type
deviceType of device / basicaly it select the layout for device_cpu is (x_1, p1_1, p2_1, p3_1 ....), ... ( x_n, p1_1, p2_1, p3_1, ...) for device_gpu is (x_1, ... , x_n) ... (p1_n, ... pn_n) where x_1 is the index where it end the list of the neighborhood list and pj_k is the property j for the vertex j. Basically in the first case one array will store index and property of each vertex, in the second case several array will store index and property
VertexListstructure that store the list of Vertex
EdgeListstructure that store the list of edge
Warning
This graph is suitable only when we know the graph structure and we build the graph adding vertexes and edges, removing vertex and edge is EXTREMLY expensive

Define vertex and edge of the graph

typedef Point_test<float> V;
typedef Point_test<float> E;

Create a Cartesian graph

// first create the vertex
for (size_t i = 0 ; i < GS_SIZE ; i++)
{
for (size_t j = 0 ; j < GS_SIZE ; j++)
{
// Add vertex
g.addVertex(p);
}
}
// than create the edge
// Create a grid, // NOTE this does not produce any memory grid, it retain only the information
// and give a set of usefull function
/* std::vector<size_t> gs;
gs.push_back(GS_SIZE);
gs.push_back(GS_SIZE);*/
size_t gs[2] = {GS_SIZE,GS_SIZE};
// Create the edge 4 for each vertex
for (size_t i = 0 ; i < GS_SIZE ; i++)
{
for (size_t j = 0 ; j < GS_SIZE ; j++)
{
// Add 4 edge
g.addEdge<CheckExistence>(g2.Lin(i,j),g2.Lin(i+1,j),p);
g.addEdge<CheckExistence>(g2.Lin(i,j),g2.Lin(i,j+1),p);
g.addEdge<CheckExistence>(g2.Lin(i,j),g2.Lin(i-1,j),p);
g.addEdge<CheckExistence>(g2.Lin(i,j),g2.Lin(i,j-1),p);
}
}

Create a tree graph with no edge properties

Graph_CSR<V> g_no_edge;
// Create a tree
// root
g_no_edge.addVertex(p);
// 2 leaf
g_no_edge.addVertex(p);
g_no_edge.addEdge(0,1);
g_no_edge.addVertex(p);
g_no_edge.addEdge(0,2);
// 4 leaf
g_no_edge.addVertex(p);
g_no_edge.addEdge(1,3);
g_no_edge.addVertex(p);
g_no_edge.addEdge(1,4);
g_no_edge.addVertex(p);
g_no_edge.addEdge(2,5);
g_no_edge.addVertex(p);
g_no_edge.addEdge(2,6);
// 8 leaf
g_no_edge.addVertex(p);
g_no_edge.addEdge(3,7);
g_no_edge.addVertex(p);
g_no_edge.addEdge(3,8);
g_no_edge.addVertex(p);
g_no_edge.addEdge(4,9);
g_no_edge.addVertex(p);
g_no_edge.addEdge(4,10);
g_no_edge.addVertex(p);
g_no_edge.addEdge(5,11);
g_no_edge.addVertex(p);
g_no_edge.addEdge(5,12);
g_no_edge.addVertex(p);
g_no_edge.addEdge(6,13);
g_no_edge.addVertex(p);
g_no_edge.addEdge(6,14);

Definition at line 83 of file map_graph.hpp.

#include <map_graph.hpp>

Public Types

typedef V V_type
 Vertex typedef.
 
typedef E E_type
 Edge typedef.
 
typedef openfpm::vector< V,
Memory, layout_v,
layout_v_base, grow_p,
openfpm::vect_isel< V >::value >
::container 
V_container
 Object container for the vertex, for example can be encap<...> (map_grid or openfpm::vector)
 
typedef openfpm::vector< E,
Memory, layout_e,
layout_e_base, grow_p,
openfpm::vect_isel< E >::value >
::container 
E_container
 Object container for the edge, for example can be encap<...> (map_grid or openfpm::vector)
 

Public Member Functions

bool operator== (const Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > &g) const
 Check if two graph exactly match. More...
 
Graph_CSR< V, E, Memory,
layout_v, layout_e,
layout_v_base, layout_e_base,
grow_p > 
duplicate () const
 It duplicate the graph. More...
 
 Graph_CSR ()
 Constructor. More...
 
 Graph_CSR (size_t n_vertex)
 Constructor. More...
 
 Graph_CSR (size_t n_vertex, size_t n_slot)
 Constructor. More...
 
 Graph_CSR (Graph_CSR< V, E, Memory > &&g)
 Copy constructor. More...
 
Graph_CSR< V, E, Memory > & operator= (Graph_CSR< V, E, Memory > &&g)
 
Graph_CSR< V, E, Memory > & operator= (const Graph_CSR< V, E, Memory > &g)
 
template<unsigned int i>
auto vertex_p (size_t id) -> decltype(v.template get< i >(id))
 operator to access the vertex More...
 
template<unsigned int i>
auto vertex_p (grid_key_dx< 1 > id) -> decltype(v.template get< i >(id))
 Access the vertex. More...
 
auto vertex (size_t id) -> decltype(v.get(id))
 Function to access the vertex. More...
 
auto vertex (grid_key_dx< 1 > id) -> decltype(v.get(id.get(0)))
 Function to access the vertex. More...
 
auto vertex (openfpm::vector_key_iterator id) -> decltype(v.get(0))
 Fuction to access the vertex. More...
 
auto vertex (size_t id) const -> const decltype(v.get(id))
 Function to access the vertex. More...
 
auto vertex (grid_key_dx< 1 > id) const -> const decltype(v.get(id.get(0)))
 Fuction to access the vertex. More...
 
auto vertex (openfpm::vector_key_iterator id) const -> const decltype(v.get(0))
 operator to access the vertex More...
 
void clear ()
 operator to clear the whole graph More...
 
template<unsigned int i>
auto edge_p (grid_key_dx< 1 > id) -> decltype(e.template get< i >(id))
 Access the edge. More...
 
template<unsigned int i>
auto edge_p (size_t id) -> decltype(e.template get< i >(id))
 Access the edge. More...
 
auto edge (edge_key ek) const -> const decltype(e.get(0))
 operator to access the edge More...
 
auto edge (size_t id) const -> const decltype(e.get(id))
 operator to access the edge More...
 
auto edge (grid_key_dx< 1 > id) const -> const decltype(e.get(id.get(0)))
 Access the edge. More...
 
size_t getNChilds (size_t c) const
 Return the number of childs of a vertex. More...
 
size_t getNChilds (typename openfpm::vector< V, Memory, layout_v, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &c)
 Return the number of childs of a vertex. More...
 
auto getChildEdge (size_t v, size_t v_e) -> decltype(e.get(0))
 Get the vertex edge. More...
 
size_t getChild (size_t v, size_t i) const
 Get the child vertex id. More...
 
size_t getChild (typename openfpm::vector< V, Memory, layout_v, layout_v_base, grow_p >::iterator_key &v, size_t i)
 Get the child edge. More...
 
void addVertex (const V &vrt)
 add vertex More...
 
void addVertex ()
 add an empty vertex More...
 
template<typename CheckPolicy = NoCheck>
auto addEdge (size_t v1, size_t v2, const E &ed) -> decltype(e.get(0))
 add edge on the graph More...
 
template<typename CheckPolicy = NoCheck>
auto addEdge (size_t v1, size_t v2) -> decltype(e.get(0))
 add edge on the graph More...
 
template<typename CheckPolicy = NoCheck, int sgid, int dgid>
auto addEdge (size_t v1, size_t v2, size_t srcgid, size_t dstgid) -> decltype(e.get(0))
 add edge on the graph and fill source and destination informations More...
 
void swap (Graph_CSR< V, E > &g)
 swap the memory of g with this graph More...
 
void swap (Graph_CSR< V, E > &&g)
 swap the memory of g with this graph More...
 
auto getVertexIterator () const -> decltype(v.getIterator())
 Get the vertex iterator. More...
 
edge_iterator< Graph_CSR< V, E,
Memory > > 
getEdgeIterator () const
 Get the vertex iterator. More...
 
size_t getNVertex () const
 Return the number of the vertex. More...
 
size_t getNEdge () const
 Return the number of edges. More...
 

Private Member Functions

template<typename CheckPolicy = NoCheck>
size_t addEdge_ (size_t v1, size_t v2)
 add edge on the graph More...
 

Private Attributes

size_t v_slot
 number of slot per vertex
 
openfpm::vector< V, Memory,
layout_v, layout_v_base,
grow_p, openfpm::vect_isel< V >
::value > 
v
 Structure that store the vertex properties.
 
openfpm::vector< size_t,
Memory, typename layout_v_base
< size_t >::type,
layout_v_base, grow_p,
openfpm::vect_isel< size_t >
::value > 
v_l
 Structure that store the number of adjacent vertex in e_l for each vertex.
 
openfpm::vector< E, Memory,
layout_e, layout_e_base,
grow_p, openfpm::vect_isel< E >
::value > 
e
 Structure that store the edge properties.
 
openfpm::vector< e_map, Memory,
typename layout_e_base< e_map >
::type, layout_e_base, grow_p,
openfpm::vect_isel< e_map >
::value > 
e_l
 Structure that store for each vertex the adjacent the vertex id and edge id (for property into e)
 
openfpm::vector< E, Memory,
layout_e, layout_e_base,
grow_p, openfpm::vect_isel< E >
::value > 
e_invalid
 invalid edge element, when a function try to create an in valid edge this object is returned
 

Constructor & Destructor Documentation

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::Graph_CSR ( )
inline

Constructor.

Constructor

Definition at line 485 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::Graph_CSR ( size_t  n_vertex)
inline

Constructor.

Constructor

Parameters
n_vertexnumber of vertex has a graph

Definition at line 497 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::Graph_CSR ( size_t  n_vertex,
size_t  n_slot 
)
inline

Constructor.

Parameters
n_vertexnumber of vertices
n_slotnumber of slots (around how many edge has a vertex, it is not fundamental parameter is just an indication)

Creating n_vertex into the graph

Creating n_vertex adjacency list counters

no edge set the counter to zero

create one invalid edge

Definition at line 510 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::Graph_CSR ( Graph_CSR< V, E, Memory > &&  g)
inline

Copy constructor.

Parameters
gGraph to copy

Definition at line 528 of file map_graph.hpp.

Member Function Documentation

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<typename CheckPolicy = NoCheck>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
const E &  ed 
) -> decltype(e.get(0))
inline

add edge on the graph

Parameters
v1source edge
v2destination edge
ededge object to add
Returns
edge object

Definition at line 884 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<typename CheckPolicy = NoCheck>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2 
) -> decltype(e.get(0))
inline

add edge on the graph

add edge on the graph

Parameters
v1start vertex
v2end vertex
Returns
the edge object

add an edge

return the edge to change the properties

Definition at line 908 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<typename CheckPolicy = NoCheck, int sgid, int dgid>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge ( size_t  v1,
size_t  v2,
size_t  srcgid,
size_t  dstgid 
) -> decltype(e.get(0))
inline

add edge on the graph and fill source and destination informations

add edge on the graph

Parameters
v1start vertex
v2end vertex
srcgidsource global id
dstgiddestination global id
Template Parameters
sgidproperty id filled with the source vertex global id
dgidproperty id filled with the destination vertex global id
Returns
the edge object

add an edge

If there is not edge return an invalid edge, is a kind of stub object

set source and destination ids of the edge

return the edge to change the properties

Definition at line 936 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<typename CheckPolicy = NoCheck>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addEdge_ ( size_t  v1,
size_t  v2 
)
inlineprivate

add edge on the graph

add edge on the graph

Parameters
v1start vertex
v2end vertex
Returns
the edge id

Definition at line 339 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
void Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addVertex ( const V &  vrt)
inline

add vertex

Parameters
vrtVertex properties

Definition at line 844 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
void Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::addVertex ( )
inline

add an empty vertex

Definition at line 861 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
void Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::clear ( )
inline

operator to clear the whole graph

operator to clear all

Definition at line 672 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR<V, E, Memory, layout_v, layout_e,layout_v_base,layout_e_base, grow_p> Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::duplicate ( ) const
inline

It duplicate the graph.

Returns
a graph duplicate of the first

duplicate all the structures

Definition at line 463 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( edge_key  ek) const -> const decltype ( e.get(0) )
inline

operator to access the edge

Parameters
ekkey of the edge
Returns
the edge object

Definition at line 715 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( size_t  id) const -> const decltype ( e.get(id) )
inline

operator to access the edge

Parameters
idof the edge to access
Returns
the edge object

Definition at line 727 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge ( grid_key_dx< 1 >  id) const -> const decltype ( e.get(id.get(0)) )
inline

Access the edge.

Parameters
idof the edge to access
Returns
the edge object

Definition at line 739 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<unsigned int i>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge_p ( grid_key_dx< 1 >  id) -> decltype ( e.template get<i>(id) )
inline

Access the edge.

Template Parameters
iproperty to access
Parameters
idof the edge to access
Returns
a reference to the edge property

Definition at line 689 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<unsigned int i>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::edge_p ( size_t  id) -> decltype ( e.template get<i>(id) )
inline

Access the edge.

Template Parameters
iproperty to access
Parameters
idof the edge to access
Returns
a reference to the edge property

Definition at line 702 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChild ( size_t  v,
size_t  i 
) const
inline

Get the child vertex id.

Parameters
vnode
ichild at position i
Returns
the target vertex id that connect v with the target vertex at position i

Definition at line 796 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChild ( typename openfpm::vector< V, Memory, layout_v, layout_v_base, grow_p >::iterator_key &  v,
size_t  i 
)
inline

Get the child edge.

Parameters
vnode
ichild at position i
Returns
the target i connected by an edge node, for the node v

Definition at line 821 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getChildEdge ( size_t  v,
size_t  v_e 
) -> decltype(e.get(0))
inline

Get the vertex edge.

Parameters
vvertex
v_eedge id
Returns
the edge object

Definition at line 781 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
edge_iterator<Graph_CSR<V, E, Memory> > Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getEdgeIterator ( ) const
inline

Get the vertex iterator.

Get the vertex iterator

Returns
an iterator to iterate through all the edges

Definition at line 1018 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNChilds ( size_t  c) const
inline

Return the number of childs of a vertex.

Parameters
cChild id
Returns
the number of childs

Definition at line 752 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNChilds ( typename openfpm::vector< V, Memory, layout_v, layout_v_base, grow_p, openfpm::vect_isel< V >::value >::iterator_key &  c)
inline

Return the number of childs of a vertex.

Parameters
cchild id
Returns
the number of childs

Definition at line 766 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNEdge ( ) const
inline

Return the number of edges.

Returns
the number of edges

Definition at line 1040 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
size_t Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getNVertex ( ) const
inline

Return the number of the vertex.

Returns
the number of vertex

Definition at line 1029 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::getVertexIterator ( ) const -> decltype(v.getIterator())
inline

Get the vertex iterator.

Get the vertex iterator

Returns
an iterator to iterate through all the vertex

Definition at line 1005 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR<V, E, Memory>& Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::operator= ( Graph_CSR< V, E, Memory > &&  g)
inline

Copy the graph

Parameters
ggraph to copy
Returns
itself

Definition at line 540 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
Graph_CSR<V, E, Memory>& Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::operator= ( const Graph_CSR< V, E, Memory > &  g)
inline

Copy the graph

Parameters
ggraph to copy

Definition at line 555 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
bool Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::operator== ( const Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p > &  g) const
inline

Check if two graph exactly match.

Warning
The requirement to match is more restrictive than simply content matching
Parameters
gGraph to compare
Returns
true if they match

Definition at line 442 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
void Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::swap ( Graph_CSR< V, E > &  g)
inline

swap the memory of g with this graph

it is basically used for move semantic

Parameters
ggraph to swap

Definition at line 960 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
void Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::swap ( Graph_CSR< V, E > &&  g)
inline

swap the memory of g with this graph

it is basically used for move semantic

Parameters
ggraph to swap

Definition at line 982 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( size_t  id) -> decltype( v.get(id) )
inline

Function to access the vertex.

Parameters
idof the vertex to access
Returns
vertex object

Definition at line 600 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( grid_key_dx< 1 >  id) -> decltype( v.get(id.get(0)) )
inline

Function to access the vertex.

Parameters
idof the vertex to access
Returns
the vertex object

Definition at line 612 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( openfpm::vector_key_iterator  id) -> decltype( v.get(0) )
inline

Fuction to access the vertex.

Parameters
idof the vertex to access
Returns
the vertex object

Definition at line 624 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( size_t  id) const -> const decltype( v.get(id) )
inline

Function to access the vertex.

Parameters
idof the vertex to access
Returns
the vertex object

Definition at line 636 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( grid_key_dx< 1 >  id) const -> const decltype( v.get(id.get(0)) )
inline

Fuction to access the vertex.

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex object

Definition at line 650 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex ( openfpm::vector_key_iterator  id) const -> const decltype( v.get(0) )
inline

operator to access the vertex

Parameters
idof the vertex to access
Returns
the vertex object

Definition at line 662 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<unsigned int i>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex_p ( size_t  id) -> decltype( v.template get<i>(id) )
inline

operator to access the vertex

operator to access the vertex

Template Parameters
iproperty to access
Parameters
idof the vertex to access
Returns
the reference of the property vertex

Definition at line 574 of file map_graph.hpp.

template<typename V, typename E, typename Memory, typename layout_v, typename layout_e, template< typename > class layout_v_base, template< typename > class layout_e_base, typename grow_p>
template<unsigned int i>
auto Graph_CSR< V, E, Memory, layout_v, layout_e, layout_v_base, layout_e_base, grow_p >::vertex_p ( grid_key_dx< 1 >  id) -> decltype( v.template get<i>(id) )
inline

Access the vertex.

Template Parameters
iproperty to access
Parameters
idof the vertex to access
Returns
the reference of the property vertex

Definition at line 588 of file map_graph.hpp.


The documentation for this class was generated from the following file: