Simplified implementation of DistGraph_CSR. More...
Simplified implementation of DistGraph_CSR.
Used when DistGraph_CSR is used as a default template argument to avoid 7 arguments
[Example]
template<template<typename,typename> class T=DistGraph_CSR_s> class cool_structure { T<Vertex,Edge> graph }
only 2 parameter are needed, if you use DistGraph_CSR you have to define 7 regardless that DistGraph_CSR has some default template
template<template<typename,typename> class T=DistGraph_CSR> class cool_structure { T<Vertex,Edge> graph }
THIS DO NOT COMPILE
Definition at line 2387 of file dist_map_graph.hpp.
#include <dist_map_graph.hpp>
Additional Inherited Members | |
Public Types inherited from DistGraph_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 DistGraph_CSR< V, E > | |
DistGraph_CSR< V, E, HeapMemory, typename memory_traits_lin< V >::type, typename memory_traits_lin< E >::type, memory_traits_lin, memory_traits_lin, openfpm::grow_policy_double > | duplicate () const |
It duplicate the graph. | |
DistGraph_CSR (const DistGraph_CSR &dg) | |
Constructor. | |
DistGraph_CSR (DistGraph_CSR &&dg) | |
Constructor. | |
DistGraph_CSR () | |
Constructor. | |
DistGraph_CSR (size_t n_vertex) | |
Constructor. | |
DistGraph_CSR (size_t n_vertex, size_t n_slot) | |
Constructor. | |
DistGraph_CSR (Vcluster<> &vcl, DistGraph_CSR< V, E, HeapMemory > &&g) | |
Copy constructor. | |
void | getDecompositionVector (openfpm::vector< idx_t > &v) |
Operator to access the decomposition vector. | |
openfpm::vector< idx_t > * | getVtxdist () |
Operator to access the decomposition vector. | |
void | initDistributionVector (openfpm::vector< idx_t > &v) |
Operator to access the decomposition vector. | |
void | initDistributionVector () |
Initialize the vtxdist and the fvtxdist. | |
DistGraph_CSR< V, E, HeapMemory > & | operator= (DistGraph_CSR< V, E, HeapMemory > &&g) |
Copy the graph. | |
DistGraph_CSR< V, E, HeapMemory > & | operator= (const DistGraph_CSR< V, E, HeapMemory > &g) |
Copy the graph. | |
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 vertexes. | |
auto | vertex (grid_key_dx< 1 > id) -> decltype(v.get(id.get(0))) |
operator to access the vertex | |
auto | vertex (openfpm::vector_key_iterator id) -> decltype(v.get(0)) |
operator to access the vertex | |
auto | vertex (size_t id) const -> const decltype(v.get(id)) |
Function to access the vertexes. | |
auto | vertex (grid_key_dx< 1 > id) const -> const decltype(v.get(id.get(0))) |
operator to access the vertex | |
auto | vertex (openfpm::vector_key_iterator id) const -> const decltype(v.get(0)) |
operator to access the vertex | |
auto | vertex_info (openfpm::vector_key_iterator id) const -> const decltype(v_m.get(0)) |
operator to access the vertex info | |
auto | getVertex (size_t id) -> decltype(v.get(id)) |
Function to access the vertexes. | |
auto | getVertex (size_t id) const -> const decltype(v.get(0)) |
Function to access the vertexes. | |
size_t | nodeById (size_t id) const |
operator to access the vertex position index by id property | |
size_t | firstId () const |
size_t | lastId () const |
size_t | getVertexId (size_t i) const |
Get the id of a vertex given its index position. | |
size_t | getVertexGlobalId (size_t i) const |
Get the id of a vertex given its index position. | |
bool | vertexIsInThisGraph (size_t id) |
Check if the vertex with GLOBAL id is in this graph. | |
void | map_v (size_t n, size_t g, size_t l) |
operator to update all the hashmap | |
void | clear () |
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 (grid_key_dx< 1 > id) const -> const decltype(e.get(id.get(0))) |
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 | getEdge (edge_key ek) const -> const decltype(e.get(0)) |
operator to access the edge | |
auto | getEdge (size_t v, size_t v_e) -> decltype(e.get(0)) |
Get the vertex edge given the vertex global id as source. | |
size_t | getNChilds (size_t c) const |
Return the number of children 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. | |
size_t | getNEdge (size_t v) const |
Return the number of children of a vertex given its global id. | |
size_t | getNEdge () const |
Return the number of edges. | |
auto | getChildEdge (size_t v, size_t v_e) -> decltype(e.get(0)) |
Get the vertex edge. | |
auto | getChildInfo (size_t v, size_t v_e) -> decltype(e_m.get(0)) |
Get the vertex edge info. | |
size_t | getChild (size_t v, size_t i) const |
Get the child edge. | |
size_t | getChild (size_t i) const |
Get the child edge. | |
size_t | getChild (typename openfpm::vector< V, HeapMemory, memory_traits_lin, openfpm::grow_policy_double, openfpm::vect_isel< V >::value >::iterator_key &v, size_t i) |
Get the child edge. | |
void | add_vertex (const V &vrt, size_t id, size_t gid) |
Add vertex vrt with global id and id properties. | |
void | add_vertex (const encapc< dim, V, Mem > &vrt, size_t id, size_t gid) |
Add vertex vrt with global id and id properties. | |
void | add_vertex (const V &vrt, size_t gid) |
Add vertex vrt with global id and id properties. | |
void | setGlobalMap (size_t g, size_t l, size_t i) |
map global id to local id | |
auto | addEdge (size_t v1, size_t v2, size_t srcgid, size_t dstgid) -> decltype(e.get(0)) |
auto | addEdge (size_t v1, size_t v2, size_t srcgid, size_t dstgid, const E &ed) -> decltype(e.get(0)) |
auto | addEdge (size_t v1, size_t v2, const encapc< dim, E, Mem > &ed, const encapc< dim, e_info, Mem1 > &ei) -> decltype(e.get(0)) |
auto | addEdge (size_t v1, size_t v2, const E &ed, const e_info &ei) -> decltype(e.get(0)) |
size_t | getChildSrcGid (size_t v1, size_t s) |
Get the global id of edge's source vertex. | |
size_t | getChildDstGid (size_t v1, size_t s) |
Get the global id of edge's destination vertex. | |
void | add_edge (size_t v1, size_t v2) |
Add an edge between vertices v1 end v2, needs syncEdge() to complete the action. | |
void | syncEdge () |
Execute a synchronization through processor to finalize the add of the edges requested in the e_queue. | |
void | swap (DistGraph_CSR< V, E > &g) |
Swap the memory of g with this graph. | |
void | swap (DistGraph_CSR< V, E > &&g) |
Swap the memory of g with this graph. | |
auto | getVertexIterator () const -> decltype(v.getIterator()) |
Get the vertex iterator. | |
edge_iterator< DistGraph_CSR< V, E, HeapMemory > > | getEdgeIterator () const |
Get the vertex iterator. | |
size_t | getNVertex () const |
Return the number of the vertices in this subgraph. | |
size_t | getTotNVertex () const |
Return the total number of the vertices. | |
void | init () |
Once added all the vertices this function must be called to initialize all the properties, useless if a graph factory is used. | |
bool | isGhost (size_t id) |
Check if a vertex is a ghost vertex (not belonging to this processor) | |
void | deleteGhosts () |
Remove all the ghosts from this graph. | |
void | q_move (size_t i, size_t t) |
Prepare to send vertex i from the local processor to the target processor. | |
bool | moveQueueIsEmpty () |
Check if the move queue is empty. | |
void | redistribute () |
Redistribute function that wraps different stages of the redistribution. | |
void | reqVertex (size_t gid) |
Put a vertex request in queue. | |
void | sync () |
Execute all vertex requests and add them as ghosts inside this graph, they will be available until a redistribution is executed. | |