#include <memScalGraph.h>
Classes | |
struct | first_eq_and_valid |
struct | first_not_valid |
struct | gNode |
struct | is_edge |
struct | is_node |
struct | makeGraphNode |
Public Types | |
typedef gNode * | GraphNode |
Graph node handle. | |
typedef EdgeTy | edge_type |
Edge data type. | |
typedef NodeTy | node_type |
Node data type. | |
typedef gNode::iterator | edge_iterator |
Edge iterator. | |
typedef gNode::EITy::reference | edge_data_reference |
Reference to edge data. | |
typedef boost::transform_iterator < makeGraphNode, boost::filter_iterator < is_node, typename NodeListTy::iterator > > | iterator |
Node iterator. | |
typedef iterator | local_iterator |
Public Member Functions | |
template<typename... Args> | |
GraphNode | createNode (Args &&...args) |
Creates a new node holding the indicated data. | |
void | addNode (const GraphNode &n, Galois::MethodFlag mflag=MethodFlag::ALL) |
Adds a node to the graph. | |
NodeTy & | getData (const GraphNode &n, Galois::MethodFlag mflag=MethodFlag::ALL) const |
Gets the node data for a node. | |
bool | containsNode (const GraphNode &n, Galois::MethodFlag mflag=MethodFlag::ALL) const |
Checks if a node is in the graph. | |
edge_iterator | addEdge (GraphNode src, GraphNode dst, Galois::MethodFlag mflag=MethodFlag::ALL) |
Adds an edge to graph, replacing existing value if edge already exists. | |
template<typename... Args> | |
edge_iterator | addMultiEdge (GraphNode src, GraphNode dst, Galois::MethodFlag mflag, Args &&...args) |
Adds and initializes an edge to graph but does not check for duplicate edges. | |
edge_iterator | findEdge (GraphNode src, GraphNode dst, Galois::MethodFlag mflag=MethodFlag::ALL) |
Finds if an edge between src and dst exists. | |
edge_data_reference | getEdgeData (edge_iterator ii, Galois::MethodFlag mflag=MethodFlag::NONE) const |
Returns the edge data associated with the edge. | |
GraphNode | getEdgeDst (edge_iterator ii) |
Returns the destination of an edge. | |
edge_iterator | edge_begin (GraphNode N, Galois::MethodFlag mflag=MethodFlag::ALL) |
Returns an iterator to the neighbors of a node. | |
edge_iterator | edge_end (GraphNode N, Galois::MethodFlag mflag=MethodFlag::ALL) |
Returns the end of the neighbor iterator. | |
detail::EdgesIterator < MemScalGraph > | out_edges (GraphNode N, MethodFlag mflag=MethodFlag::ALL) |
An object with begin() and end() methods to iterate over the outgoing edges of N. | |
iterator | begin () |
Returns an iterator to all the nodes in the graph. | |
iterator | end () |
Returns the end of the node iterator. Not thread-safe. | |
local_iterator | local_begin () |
local_iterator | local_end () |
unsigned int | size () |
Returns the number of nodes in the graph. | |
size_t | sizeOfEdgeData () const |
Returns the size of edge data. | |
MemScalGraph () | |
Private Types | |
typedef Galois::InsertBag< gNode > | NodeListTy |
Private Member Functions | |
template<typename... Args> | |
edge_iterator | createEdgeWithReuse (GraphNode src, GraphNode dst, Galois::MethodFlag mflag, Args &&...args) |
template<typename... Args> | |
edge_iterator | createEdge (GraphNode src, GraphNode dst, Galois::MethodFlag mflag, Args &&...args) |
Private Attributes | |
NodeListTy | nodes |
GraphImpl::EdgeFactory< EdgeTy > | edges |
typedef gNode::EITy::reference Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_data_reference |
Reference to edge data.
typedef gNode::iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_iterator |
Edge iterator.
typedef EdgeTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_type |
Edge data type.
typedef gNode* Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::GraphNode |
Graph node handle.
typedef boost::transform_iterator<makeGraphNode, boost::filter_iterator<is_node, typename NodeListTy::iterator> > Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::iterator |
Node iterator.
typedef iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_iterator |
typedef NodeTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::node_type |
Node data type.
typedef Galois::InsertBag<gNode> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::NodeListTy [private] |
Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::MemScalGraph | ( | ) | [inline] |
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::addEdge | ( | GraphNode | src, | |
GraphNode | dst, | |||
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
Adds an edge to graph, replacing existing value if edge already exists.
Ignore the edge data, let the caller use the returned iterator to set the value if desired. This frees us from dealing with the void edge data problem in this API
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::addMultiEdge | ( | GraphNode | src, | |
GraphNode | dst, | |||
Galois::MethodFlag | mflag, | |||
Args &&... | args | |||
) | [inline] |
Adds and initializes an edge to graph but does not check for duplicate edges.
void Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::addNode | ( | const GraphNode & | n, | |
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
Adds a node to the graph.
iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::begin | ( | ) | [inline] |
Returns an iterator to all the nodes in the graph.
Not thread-safe.
bool Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::containsNode | ( | const GraphNode & | n, | |
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | const [inline] |
Checks if a node is in the graph.
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::createEdge | ( | GraphNode | src, | |
GraphNode | dst, | |||
Galois::MethodFlag | mflag, | |||
Args &&... | args | |||
) | [inline, private] |
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::createEdgeWithReuse | ( | GraphNode | src, | |
GraphNode | dst, | |||
Galois::MethodFlag | mflag, | |||
Args &&... | args | |||
) | [inline, private] |
GraphNode Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::createNode | ( | Args &&... | args | ) | [inline] |
Creates a new node holding the indicated data.
Usually you should call addNode() afterwards.
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_begin | ( | GraphNode | N, | |
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
Returns an iterator to the neighbors of a node.
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_end | ( | GraphNode | N, | |
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
Returns the end of the neighbor iterator.
iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::end | ( | ) | [inline] |
Returns the end of the node iterator. Not thread-safe.
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::findEdge | ( | GraphNode | src, | |
GraphNode | dst, | |||
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
Finds if an edge between src and dst exists.
NodeTy& Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::getData | ( | const GraphNode & | n, | |
Galois::MethodFlag | mflag = MethodFlag::ALL | |||
) | const [inline] |
Gets the node data for a node.
edge_data_reference Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::getEdgeData | ( | edge_iterator | ii, | |
Galois::MethodFlag | mflag = MethodFlag::NONE | |||
) | const [inline] |
Returns the edge data associated with the edge.
It is an error to get the edge data for a non-existent edge. It is an error to get edge data for inactive edges. By default, the mflag is Galois::NONE because edge_begin() dominates this call and should perform the appropriate locking.
GraphNode Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::getEdgeDst | ( | edge_iterator | ii | ) | [inline] |
Returns the destination of an edge.
local_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_begin | ( | ) | [inline] |
local_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_end | ( | ) | [inline] |
detail::EdgesIterator<MemScalGraph> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::out_edges | ( | GraphNode | N, | |
MethodFlag | mflag = MethodFlag::ALL | |||
) | [inline] |
unsigned int Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::size | ( | ) | [inline] |
Returns the number of nodes in the graph.
Not thread-safe.
size_t Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::sizeOfEdgeData | ( | ) | const [inline] |
Returns the size of edge data.
GraphImpl::EdgeFactory<EdgeTy> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edges [private] |
NodeListTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::nodes [private] |