Galois
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy > Class Template Reference

Local computation graph that allows addition of nodes (but not removals) if the maximum degree of a node is known at the time it is added. More...

#include <LC_Morph_Graph.h>

Inheritance diagram for galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >:

Classes

struct  dst_equals
 Functor: contains an operator to compare the destination of an edge with a particular node. More...
 
struct  EdgeHolder
 Linked list structure holding together blocks of memory that stores edges. More...
 
struct  makeGraphNode
 Functor that returns pointers to NodeInfo objects given references. More...
 
class  NodeInfo
 Class that stores node info (e.g. More...
 
struct  with_edge_data
 Struct used to define the type of edge data through the template parameter. More...
 
struct  with_file_edge_data
 Struct used to define the type of file edge data through the template parameter. More...
 
struct  with_id
 Struct that allows activation of the HasId template parameter Example: using Graph = LC_Morph_Graph::with_id<true> defines LC_Morph_Graph with HasId = true. More...
 
struct  with_no_lockable
 Struct used to define the HasNoLockable template parameter. More...
 
struct  with_node_data
 Struct used to define the type of node data through the template parameter. More...
 
struct  with_numa_alloc
 Struct used to define the UseNumaAlloc template parameter. More...
 
struct  with_out_of_line_lockable
 Struct used to define the HasOutOfLineLockable template parameter. More...
 

Public Types

using read_tag = read_with_aux_graph_tag
 type that tells graph reader how to read a file for this graph More...
 
using GraphNode = NodeInfo *
 A graph node is a NodeInfo object. More...
 
using file_edge_data_type = FileEdgeTy
 Type of edge data in file. More...
 
using edge_data_type = EdgeTy
 Type of edge data. More...
 
using node_data_type = NodeTy
 Type of node data. More...
 
using node_data_reference = typename NodeInfoTypes::reference
 Reference type to node data. More...
 
using edge_data_reference = typename EdgeInfo::reference
 Reference type to edge data. More...
 
using edge_iterator = EdgeInfo *
 Iterator over EdgeInfo objects (edges) More...
 
using iterator = boost::transform_iterator< makeGraphNode, typename Nodes::iterator >
 Iterator over nodes. More...
 
using const_iterator = boost::transform_iterator< makeGraphNode, typename Nodes::const_iterator >
 Constant iterator over nodes. More...
 
using local_iterator = iterator
 Local iterator is just an iterator. More...
 
using const_local_iterator = const_iterator
 Const local iterator is just an const_iterator. More...
 
using ReadGraphAuxData = LargeArray< GraphNode >
 

Public Member Functions

 ~LC_Morph_Graph ()
 Destructor. More...
 
node_data_reference getData (const GraphNode &N, MethodFlag mflag=MethodFlag::WRITE)
 Get the data of a node N. More...
 
edge_data_reference getEdgeData (edge_iterator ni, MethodFlag mflag=MethodFlag::UNPROTECTED)
 Get edge data of an edge given an iterator to the edge. More...
 
GraphNode getEdgeDst (edge_iterator ni)
 Get the destination of an edge given an iterator to the edge. More...
 
iterator begin ()
 Returns an iterator to all the nodes in the graph. More...
 
iterator end ()
 Returns the end of the node iterator. Not thread-safe. More...
 
local_iterator local_begin ()
 Return an iterator to the beginning of the local nodes of the graph. More...
 
local_iterator local_end ()
 Return an iterator to the end of the local nodes of the graph. More...
 
edge_iterator edge_begin (GraphNode N, MethodFlag mflag=MethodFlag::WRITE)
 Return an iterator to the first edge of a particular node. More...
 
edge_iterator edge_end (GraphNode N, MethodFlag GALOIS_UNUSED(mflag)=MethodFlag::WRITE)
 Return an iterator to the end of edges of a particular node. More...
 
runtime::iterable
< NoDerefIterator
< edge_iterator > > 
edges (GraphNode N, MethodFlag mflag=MethodFlag::WRITE)
 Return a range for edges of a node for use by C++ for_each loops. More...
 
internal::EdgesIterator
< LC_Morph_Graph
out_edges (GraphNode N, MethodFlag mflag=MethodFlag::WRITE)
 Returns an object with begin() and end() methods to iterate over the outgoing edges of N. More...
 
template<typename... Args>
GraphNode createNode (int nedges, Args &&...args)
 Creates a new node with a cap on the number of edges. More...
 
template<typename... Args>
edge_iterator addEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag, Args &&...args)
 Adds an edge if it doesn't already exist. More...
 
template<typename... Args>
edge_iterator addMultiEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag, Args &&...args)
 Construct a new edge for a node. More...
 
void removeEdge (GraphNode src, edge_iterator dst, galois::MethodFlag mflag=MethodFlag::WRITE)
 Remove an edge from the graph. More...
 
edge_iterator findEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE)
 Finds an edge between 2 nodes and returns the iterator to it if it exists. More...
 
void allocateFrom (FileGraph &graph, ReadGraphAuxData &aux)
 Allocate memory for nodes given a file graph with a particular number of nodes. More...
 
void constructNodesFrom (FileGraph &graph, unsigned tid, unsigned total, ReadGraphAuxData &aux)
 Constructs the LCMorphGraph nodes given a FileGraph to construct it from. More...
 
void constructEdgesFrom (FileGraph &graph, unsigned tid, unsigned total, const ReadGraphAuxData &aux)
 Constructs the LCMorphGraph edges given a FileGraph to construct it from and pointers to already created nodes. More...
 

Protected Types

using EdgeInfo = internal::EdgeInfoBase< NodeInfo *, EdgeTy >
 EdgeInfo keeps destination of edges. More...
 
using Nodes = galois::InsertBag< NodeInfo >
 Nodes are stored in an insert bag. More...
 
using NodeInfoTypes = internal::NodeInfoBaseTypes< NodeTy,!HasNoLockable &&!HasOutOfLineLockable >
 Type of nodes. More...
 

Protected Member Functions

template<bool _A1 = HasNoLockable, bool _A2 = HasOutOfLineLockable>
void acquireNode (GraphNode N, MethodFlag mflag, typename std::enable_if<!_A1 &&!_A2 >::type *=0)
 Acquire a node for the scope in which the function is called. More...
 
template<bool _A1 = HasOutOfLineLockable, bool _A2 = HasNoLockable>
void acquireNode (GraphNode N, MethodFlag mflag, typename std::enable_if< _A1 &&!_A2 >::type *=0)
 Acquire a node for the scope in which the function is called. More...
 
template<bool _A1 = EdgeInfo::has_value, bool _A2 = LargeArray<FileEdgeTy>::has_value>
void constructEdgeValue (FileGraph &graph, typename FileGraph::edge_iterator nn, GraphNode src, GraphNode dst, typename std::enable_if<!_A1||_A2 >::type *=0)
 Given a FileGraph and an edge in it, add it to the LCMorphGraph. More...
 
template<bool _A1 = EdgeInfo::has_value, bool _A2 = LargeArray<FileEdgeTy>::has_value>
void constructEdgeValue (FileGraph &, typename FileGraph::edge_iterator, GraphNode src, GraphNode dst, typename std::enable_if< _A1 &&!_A2 >::type *=0)
 Given a FileGraph and an edge in it, add it to the LCMorphGraph. More...
 
template<bool _A1 = HasOutOfLineLockable, bool _A2 = HasNoLockable>
void acquireNode (GraphNode, MethodFlag, typename std::enable_if< _A2 >::type *=0)
 No-op acquire node when HasNoLockable is true. More...
 
template<bool _Enable = HasId>
size_t getId (GraphNode N, typename std::enable_if< _Enable >::type *=0)
 Get the ID of a graph node if they're enabled in the class. More...
 

Protected Attributes

Nodes nodes
 Nodes in this graph. More...
 
galois::substrate::PerThreadStorage
< EdgeHolder * > 
edgesL
 Memory for edges in this graph (memory held in EdgeHolders) More...
 

Friends

template<typename Graph >
class LC_InOut_Graph
 Friend of LC_InOut_Graph (makes a graph have both in and out edges) More...
 

Detailed Description

template<typename NodeTy, typename EdgeTy, bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
class galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >

Local computation graph that allows addition of nodes (but not removals) if the maximum degree of a node is known at the time it is added.

Member Typedef Documentation

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::const_iterator = boost::transform_iterator<makeGraphNode, typename Nodes::const_iterator>

Constant iterator over nodes.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::const_local_iterator = const_iterator

Const local iterator is just an const_iterator.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edge_data_reference = typename EdgeInfo::reference

Reference type to edge data.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edge_data_type = EdgeTy

Type of edge data.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edge_iterator = EdgeInfo*

Iterator over EdgeInfo objects (edges)

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::EdgeInfo = internal::EdgeInfoBase<NodeInfo*, EdgeTy>
protected

EdgeInfo keeps destination of edges.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::file_edge_data_type = FileEdgeTy

Type of edge data in file.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::GraphNode = NodeInfo*

A graph node is a NodeInfo object.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::iterator = boost::transform_iterator<makeGraphNode, typename Nodes::iterator>

Iterator over nodes.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::local_iterator = iterator

Local iterator is just an iterator.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::node_data_reference = typename NodeInfoTypes::reference

Reference type to node data.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::node_data_type = NodeTy

Type of node data.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::NodeInfoTypes = internal::NodeInfoBaseTypes<NodeTy, !HasNoLockable && !HasOutOfLineLockable>
protected

Type of nodes.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::Nodes = galois::InsertBag<NodeInfo>
protected

Nodes are stored in an insert bag.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::read_tag = read_with_aux_graph_tag

type that tells graph reader how to read a file for this graph

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
using galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::ReadGraphAuxData = LargeArray<GraphNode>

Constructor & Destructor Documentation

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::~LC_Morph_Graph ( )
inline

Destructor.

If edges have some value, destory all of it (i.e. free up memory).

Member Function Documentation

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _A1 = HasNoLockable, bool _A2 = HasOutOfLineLockable>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::acquireNode ( GraphNode  N,
MethodFlag  mflag,
typename std::enable_if<!_A1 &&!_A2 >::type *  = 0 
)
inlineprotected

Acquire a node for the scope in which the function is called.

Parameters
Nnode to acquire
mflagMethod flag specifying type of acquire (e.g. read, write, etc.)
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _A1 = HasOutOfLineLockable, bool _A2 = HasNoLockable>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::acquireNode ( GraphNode  N,
MethodFlag  mflag,
typename std::enable_if< _A1 &&!_A2 >::type *  = 0 
)
inlineprotected

Acquire a node for the scope in which the function is called.

The lock is out of line (not local to the node).

Parameters
Nnode to acquire
mflagMethod flag specifying type of acquire (e.g. read, write, etc.)
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _A1 = HasOutOfLineLockable, bool _A2 = HasNoLockable>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::acquireNode ( GraphNode  ,
MethodFlag  ,
typename std::enable_if< _A2 >::type *  = 0 
)
inlineprotected

No-op acquire node when HasNoLockable is true.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<typename... Args>
edge_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::addEdge ( GraphNode  src,
GraphNode  dst,
galois::MethodFlag  mflag,
Args &&...  args 
)
inline

Adds an edge if it doesn't already exist.

Parameters
srcSource to add edge to
dstDestination to add edge to
mflagMethod flag specifying type of acquire (e.g. read, write)
argsArguments needed to construct an edge
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<typename... Args>
edge_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::addMultiEdge ( GraphNode  src,
GraphNode  dst,
galois::MethodFlag  mflag,
Args &&...  args 
)
inline

Construct a new edge for a node.

Can add duplicate edges.

Parameters
srcSource node to add edge to
dstDestination node of new edge
mflagMethod flag specifying type of acquire (e.g. read, write)
argsOther arguments that need to be passed in to construct a new edge
Returns
Iterator to newly added edge
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::allocateFrom ( FileGraph graph,
ReadGraphAuxData aux 
)
inline

Allocate memory for nodes given a file graph with a particular number of nodes.

This graph will allocate out of line space for that number of nodes as well.

Parameters
graphFileGraph with a number of nodes to allocate
auxData structure in which to allocate space for nodes.
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::begin ( )
inline

Returns an iterator to all the nodes in the graph.

Not thread-safe.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::constructEdgesFrom ( FileGraph graph,
unsigned  tid,
unsigned  total,
const ReadGraphAuxData aux 
)
inline

Constructs the LCMorphGraph edges given a FileGraph to construct it from and pointers to already created nodes.

Meant to be called by multiple threads.

Parameters
[in]graphFileGraph to construct a morph graph from
[in]tidThread id of thread calling this function
[in]totalTotal number of threads in current execution
[in]auxContains pointers to already created nodes to create edges for.
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _A1 = EdgeInfo::has_value, bool _A2 = LargeArray<FileEdgeTy>::has_value>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::constructEdgeValue ( FileGraph graph,
typename FileGraph::edge_iterator  nn,
GraphNode  src,
GraphNode  dst,
typename std::enable_if<!_A1||_A2 >::type *  = 0 
)
inlineprotected

Given a FileGraph and an edge in it, add it to the LCMorphGraph.

Can handle edge weights.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _A1 = EdgeInfo::has_value, bool _A2 = LargeArray<FileEdgeTy>::has_value>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::constructEdgeValue ( FileGraph ,
typename FileGraph::edge_iterator  ,
GraphNode  src,
GraphNode  dst,
typename std::enable_if< _A1 &&!_A2 >::type *  = 0 
)
inlineprotected

Given a FileGraph and an edge in it, add it to the LCMorphGraph.

Does not handle edge weights.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::constructNodesFrom ( FileGraph graph,
unsigned  tid,
unsigned  total,
ReadGraphAuxData aux 
)
inline

Constructs the LCMorphGraph nodes given a FileGraph to construct it from.

Meant to be called by multiple threads.

Parameters
[in]graphFileGraph to construct a morph graph from
[in]tidThread id of thread calling this function
[in]totalTotal number of threads in current execution
[in,out]auxAllocated memory to store pointers to the created nodes
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<typename... Args>
GraphNode galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::createNode ( int  nedges,
Args &&...  args 
)
inline

Creates a new node with a cap on the number of edges.

Parameters
nedgesNumber of edges reserved for this node.
argsArguments required to construct a new node
Returns
Newly created node
template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
edge_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edge_begin ( GraphNode  N,
MethodFlag  mflag = MethodFlag::WRITE 
)
inline

Return an iterator to the first edge of a particular node.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
edge_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edge_end ( GraphNode  N,
MethodFlag   GALOIS_UNUSEDmflag = MethodFlag::WRITE 
)
inline

Return an iterator to the end of edges of a particular node.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
runtime::iterable<NoDerefIterator<edge_iterator> > galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edges ( GraphNode  N,
MethodFlag  mflag = MethodFlag::WRITE 
)
inline

Return a range for edges of a node for use by C++ for_each loops.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::end ( )
inline

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

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
edge_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::findEdge ( GraphNode  src,
GraphNode  dst,
galois::MethodFlag  mflag = MethodFlag::WRITE 
)
inline

Finds an edge between 2 nodes and returns the iterator to it if it exists.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
node_data_reference galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::getData ( const GraphNode N,
MethodFlag  mflag = MethodFlag::WRITE 
)
inline

Get the data of a node N.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
edge_data_reference galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::getEdgeData ( edge_iterator  ni,
MethodFlag  mflag = MethodFlag::UNPROTECTED 
)
inline

Get edge data of an edge given an iterator to the edge.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
GraphNode galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::getEdgeDst ( edge_iterator  ni)
inline

Get the destination of an edge given an iterator to the edge.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<bool _Enable = HasId>
size_t galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::getId ( GraphNode  N,
typename std::enable_if< _Enable >::type *  = 0 
)
inlineprotected

Get the ID of a graph node if they're enabled in the class.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
local_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::local_begin ( )
inline

Return an iterator to the beginning of the local nodes of the graph.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
local_iterator galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::local_end ( )
inline

Return an iterator to the end of the local nodes of the graph.

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
internal::EdgesIterator<LC_Morph_Graph> galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::out_edges ( GraphNode  N,
MethodFlag  mflag = MethodFlag::WRITE 
)
inline

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

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
void galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::removeEdge ( GraphNode  src,
edge_iterator  dst,
galois::MethodFlag  mflag = MethodFlag::WRITE 
)
inline

Remove an edge from the graph.

Invalidates edge iterator.

Friends And Related Function Documentation

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
template<typename Graph >
friend class LC_InOut_Graph
friend

Friend of LC_InOut_Graph (makes a graph have both in and out edges)

Member Data Documentation

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
galois::substrate::PerThreadStorage<EdgeHolder*> galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::edgesL
protected

Memory for edges in this graph (memory held in EdgeHolders)

template<typename NodeTy , typename EdgeTy , bool HasNoLockable = false, bool UseNumaAlloc = false, bool HasOutOfLineLockable = false, bool HasId = false, typename FileEdgeTy = EdgeTy>
Nodes galois::graphs::LC_Morph_Graph< NodeTy, EdgeTy, HasNoLockable, UseNumaAlloc, HasOutOfLineLockable, HasId, FileEdgeTy >::nodes
protected

Nodes in this graph.


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