Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional > Class Template Reference

#include <memScalGraph.h>

List of all members.

Classes

struct  first_eq_and_valid
struct  first_not_valid
struct  gNode
struct  is_edge
struct  is_node
struct  makeGraphNode

Public Types

typedef gNodeGraphNode
 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< gNodeNodeListTy

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

template<typename NodeTy, typename EdgeTy, bool Directional>
class Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >


Member Typedef Documentation

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef gNode::EITy::reference Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_data_reference

Reference to edge data.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef gNode::iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_iterator

Edge iterator.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef EdgeTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edge_type

Edge data type.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef gNode* Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::GraphNode

Graph node handle.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef boost::transform_iterator<makeGraphNode, boost::filter_iterator<is_node, typename NodeListTy::iterator> > Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::iterator

Node iterator.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_iterator
template<typename NodeTy , typename EdgeTy , bool Directional>
typedef NodeTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::node_type

Node data type.

template<typename NodeTy , typename EdgeTy , bool Directional>
typedef Galois::InsertBag<gNode> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::NodeListTy [private]

Constructor & Destructor Documentation

template<typename NodeTy , typename EdgeTy , bool Directional>
Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::MemScalGraph (  )  [inline]

Member Function Documentation

template<typename NodeTy , typename EdgeTy , bool Directional>
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

template<typename NodeTy , typename EdgeTy , bool Directional>
template<typename... Args>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
void Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::addNode ( const GraphNode n,
Galois::MethodFlag  mflag = MethodFlag::ALL 
) [inline]

Adds a node to the graph.

template<typename NodeTy , typename EdgeTy , bool Directional>
iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::begin (  )  [inline]

Returns an iterator to all the nodes in the graph.

Not thread-safe.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
template<typename... Args>
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::createEdge ( GraphNode  src,
GraphNode  dst,
Galois::MethodFlag  mflag,
Args &&...  args 
) [inline, private]
template<typename NodeTy , typename EdgeTy , bool Directional>
template<typename... Args>
edge_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::createEdgeWithReuse ( GraphNode  src,
GraphNode  dst,
Galois::MethodFlag  mflag,
Args &&...  args 
) [inline, private]
template<typename NodeTy , typename EdgeTy , bool Directional>
template<typename... Args>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::end (  )  [inline]

Returns the end of the node iterator. Not thread-safe.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
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.

template<typename NodeTy , typename EdgeTy , bool Directional>
GraphNode Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::getEdgeDst ( edge_iterator  ii  )  [inline]

Returns the destination of an edge.

template<typename NodeTy , typename EdgeTy , bool Directional>
local_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_begin (  )  [inline]
template<typename NodeTy , typename EdgeTy , bool Directional>
local_iterator Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::local_end (  )  [inline]
template<typename NodeTy , typename EdgeTy , bool Directional>
detail::EdgesIterator<MemScalGraph> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::out_edges ( GraphNode  N,
MethodFlag  mflag = MethodFlag::ALL 
) [inline]

An object with begin() and end() methods to iterate over the outgoing edges of N.

template<typename NodeTy , typename EdgeTy , bool Directional>
unsigned int Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::size (  )  [inline]

Returns the number of nodes in the graph.

Not thread-safe.

template<typename NodeTy , typename EdgeTy , bool Directional>
size_t Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::sizeOfEdgeData (  )  const [inline]

Returns the size of edge data.


Member Data Documentation

template<typename NodeTy , typename EdgeTy , bool Directional>
GraphImpl::EdgeFactory<EdgeTy> Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::edges [private]
template<typename NodeTy , typename EdgeTy , bool Directional>
NodeListTy Galois::Graph::MemScalGraph< NodeTy, EdgeTy, Directional >::nodes [private]

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

Generated on 2 Nov 2013 for Galois by  doxygen 1.6.1