Simplified implementation of Graph_CSR. More...
Simplified implementation of Graph_CSR.
Used when Graph_CSR is used as a default template argument to avoid 7 arguments
[Example]
template<template<typename,typename> class T=Graph_CSR_s> class cool_structure { T<Vertex,Edge> graph }
only 2 parameter are needed, if you use Graph_CSR you have to define 7 regardless that Graph_CSR has some default template
template<template<typename,typename> class T=Graph_CSR> class cool_structure { T<Vertex,Edge> graph }
THIS DO NOT COMPILE
Definition at line 1087 of file map_graph.hpp.
#include <map_graph.hpp>
Additional Inherited Members | |
Public Types inherited from Graph_CSR< V, E > | |
typedef V | V_type |
Vertex typedef. | |
typedef E | E_type |
Edge typedef. | |
typedef openfpm::vector< V, HeapMemory, memory_traits_lin, openfpm::grow_policy_double, 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, HeapMemory, memory_traits_lin, openfpm::grow_policy_double, 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 inherited from Graph_CSR< V, E > | |
bool | operator== (const Graph_CSR< V, E, HeapMemory, memory_traits_lin, memory_traits_lin, openfpm::grow_policy_double > &g) const |
Check if two graph exactly match. | |
Graph_CSR< V, E, HeapMemory, memory_traits_lin, memory_traits_lin, openfpm::grow_policy_double > | duplicate () const |
It duplicate the graph. | |
Graph_CSR () | |
Constructor. | |
Graph_CSR (size_t n_vertex) | |
Constructor. | |
Graph_CSR (size_t n_vertex, size_t n_slot) | |
Constructor. | |
Graph_CSR (Graph_CSR< V, E, HeapMemory > &&g) | |
Copy constructor. | |
Graph_CSR< V, E, HeapMemory > & | operator= (Graph_CSR< V, E, HeapMemory > &&g) |
Graph_CSR< V, E, HeapMemory > & | operator= (const Graph_CSR< V, E, HeapMemory > &g) |
auto | vertex_p (size_t id) -> decltype(v.template get< i >(id)) |
operator to access the vertex | |
auto | vertex_p (grid_key_dx< 1 > id) -> decltype(v.template get< i >(id)) |
Access the vertex. | |
auto | vertex (size_t id) -> decltype(v.get(id)) |
Function to access the vertex. | |
auto | vertex (grid_key_dx< 1 > id) -> decltype(v.get(id.get(0))) |
Function to access the vertex. | |
auto | vertex (openfpm::vector_key_iterator id) -> decltype(v.get(0)) |
Fuction to access the vertex. | |
auto | vertex (size_t id) const -> const decltype(v.get(id)) |
Function to access the vertex. | |
auto | vertex (grid_key_dx< 1 > id) const -> const decltype(v.get(id.get(0))) |
Fuction to access the vertex. | |
auto | vertex (openfpm::vector_key_iterator id) const -> const decltype(v.get(0)) |
operator to access the vertex | |
void | clear () |
operator to clear the whole graph | |
void | destroy () |
operator to clear the whole graph | |
auto | edge_p (grid_key_dx< 1 > id) -> decltype(e.template get< i >(id)) |
Access the edge. | |
auto | edge_p (size_t id) -> decltype(e.template get< i >(id)) |
Access the edge. | |
auto | edge (edge_key ek) const -> const decltype(e.get(0)) |
operator to access the edge | |
auto | edge (size_t id) const -> const decltype(e.get(id)) |
operator to access the edge | |
auto | edge (grid_key_dx< 1 > id) const -> const decltype(e.get(id.get(0))) |
Access the edge. | |
size_t | getNChilds (size_t c) const |
Return the number of childs of a vertex. | |
size_t | getNChilds (typename openfpm::vector< V, HeapMemory, memory_traits_lin, openfpm::grow_policy_double, openfpm::vect_isel< V >::value >::iterator_key &c) |
Return the number of childs of a vertex. | |
auto | getChildEdge (size_t v, size_t v_e) -> decltype(e.get(0)) |
Get the vertex edge. | |
size_t | getChild (size_t v, size_t i) const |
Get the child vertex id. | |
size_t | getChild (typename openfpm::vector< V, HeapMemory, memory_traits_lin, openfpm::grow_policy_double >::iterator_key &v, size_t i) |
Get the child edge. | |
void | addVertex (const V &vrt) |
add vertex | |
void | addVertex () |
add an empty vertex | |
auto | addEdge (size_t v1, size_t v2, const E &ed) -> decltype(e.get(0)) |
add edge on the graph | |
auto | addEdge (size_t v1, size_t v2) -> decltype(e.get(0)) |
add edge on the graph | |
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 | |
void | swap (Graph_CSR< V, E > &g) |
swap the memory of g with this graph | |
void | swap (Graph_CSR< V, E > &&g) |
swap the memory of g with this graph | |
auto | getVertexIterator () const -> decltype(v.getIterator()) |
Get the vertex iterator. | |
edge_iterator< Graph_CSR< V, E, HeapMemory > > | getEdgeIterator () const |
Get the vertex iterator. | |
size_t | getNVertex () const |
Return the number of the vertex. | |
size_t | getNEdge () const |
Return the number of edges. | |