|
template<typename... Args> |
GraphNode | createNode (Args &&...args) |
| Creates a new node holding the indicated data. More...
|
|
void | addNode (const GraphNode &n, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Adds a node to the graph. More...
|
|
node_data_reference | getData (const GraphNode &n, galois::MethodFlag mflag=MethodFlag::WRITE) const |
| Gets the node data for a node. More...
|
|
bool | containsNode (const GraphNode &n, galois::MethodFlag mflag=MethodFlag::WRITE) const |
| Checks if a node is in the graph. More...
|
|
void | removeNode (GraphNode n, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Removes a node from the graph along with all its outgoing/incoming edges for undirected graphs or outgoing edges for directed graphs. More...
|
|
void | resizeEdges (GraphNode src, size_t size, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Resize the edges of the node. More...
|
|
edge_iterator | addEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Adds an edge to graph, replacing existing value if edge already exists. More...
|
|
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. More...
|
|
void | removeEdge (GraphNode src, edge_iterator dst, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Removes an edge from the graph. More...
|
|
template<bool _DirectedInOut = (Directional && InOut)> |
void | removeInEdge (GraphNode dst, in_edge_iterator src, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _DirectedInOut >::type *=0) |
|
edge_iterator | findEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Finds if an edge between src and dst exists. More...
|
|
edge_iterator | findEdgeSortedByDst (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE) |
|
template<bool _Undirected = !Directional> |
edge_iterator | findInEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _Undirected >::type *=0) |
|
template<bool _DirectedInOut = (Directional && InOut)> |
in_edge_iterator | findInEdge (GraphNode src, GraphNode dst, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _DirectedInOut >::type *=0) |
|
edge_data_reference | getEdgeData (edge_iterator ii, galois::MethodFlag mflag=MethodFlag::UNPROTECTED) const |
| Returns the edge data associated with the edge. More...
|
|
edge_data_reference | getEdgeData (in_edge_iterator ii, galois::MethodFlag mflag=MethodFlag::UNPROTECTED) const |
|
GraphNode | getEdgeDst (edge_iterator ii) |
| Returns the destination of an edge. More...
|
|
GraphNode | getEdgeDst (in_edge_iterator ii) |
|
void | sortEdgesByDst (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE) |
|
void | sortAllEdgesByDst (MethodFlag mflag=MethodFlag::WRITE) |
|
edge_iterator | edge_begin (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE) |
| Returns an iterator to the neighbors of a node. More...
|
|
template<bool _Undirected = !Directional> |
in_edge_iterator | in_edge_begin (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if<!_Undirected >::type *=0) |
|
template<bool _Undirected = !Directional> |
edge_iterator | in_edge_begin (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _Undirected >::type *=0) |
|
edge_iterator | edge_end (GraphNode N, galois::MethodFlag GALOIS_UNUSED(mflag)=MethodFlag::WRITE) |
| Returns the end of the neighbor iterator. More...
|
|
template<bool _Undirected = !Directional> |
in_edge_iterator | in_edge_end (GraphNode N, galois::MethodFlag GALOIS_UNUSED(mflag)=MethodFlag::WRITE, typename std::enable_if<!_Undirected >::type *=0) |
|
template<bool _Undirected = !Directional> |
edge_iterator | in_edge_end (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _Undirected >::type *=0) |
|
runtime::iterable
< NoDerefIterator
< edge_iterator > > | edges (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE) |
|
template<bool _Undirected = !Directional> |
runtime::iterable
< NoDerefIterator
< in_edge_iterator > > | in_edges (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if<!_Undirected >::type *=0) |
|
template<bool _Undirected = !Directional> |
runtime::iterable
< NoDerefIterator
< edge_iterator > > | in_edges (GraphNode N, galois::MethodFlag mflag=MethodFlag::WRITE, typename std::enable_if< _Undirected >::type *=0) |
|
internal::EdgesIterator
< Morph_SepInOut_Graph > | out_edges (GraphNode N, MethodFlag mflag=MethodFlag::WRITE) |
| An object with begin() and end() methods to iterate over the outgoing edges of N. 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 () |
|
local_iterator | local_end () |
|
unsigned int | size () |
| Returns the number of nodes in the graph. More...
|
|
size_t | sizeOfEdgeData () const |
| Returns the size of edge data. More...
|
|
void | allocateFrom (FileGraph &graph, ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t<!V > | constructNodesFrom (FileGraph &graph, unsigned tid, unsigned total, ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t< V > | constructNodesFrom (FileGraph &graph, unsigned tid, unsigned total, ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t<!V > | constructOutEdgesFrom (FileGraph &graph, unsigned tid, unsigned total, ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t< V > | constructOutEdgesFrom (FileGraph &graph, unsigned tid, unsigned total, const ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t<!V > | constructInEdgesFrom (FileGraph &graph, unsigned tid, unsigned total, ReadGraphAuxData &aux) |
|
template<bool V = DirectedNotInOut> |
std::enable_if_t< V > | constructInEdgesFrom (FileGraph &, unsigned, unsigned, ReadGraphAuxData &) |
|
template<typename NodeTy, typename EdgeTy, bool Directional, bool InOut = false, bool HasNoLockable = false, bool SortedNeighbors = false, typename FileEdgeTy = EdgeTy>
class galois::graphs::Morph_SepInOut_Graph< NodeTy, EdgeTy, Directional, InOut, HasNoLockable, SortedNeighbors, FileEdgeTy >
A Graph.
An example of use:
struct Node {
...
};
Graph g;
Node n1, n2;
Graph::GraphNode a, b;
g.addNode(a);
b = g.createNode(n2);
g.addNode(b);
g.getEdgeData(g.addEdge(a, b)) = 5;
for (Graph::iterator ii = g.begin(), ei = g.end(); ii != ei; ++ii) {
Graph::GraphNode src = *ii;
for (Graph::edge_iterator jj = g.edge_begin(src), ej = g.edge_end(src);
++jj) { Graph::GraphNode dst = graph.getEdgeDst(jj); int edgeData =
g.getEdgeData(jj); assert(edgeData == 5);
}
}
And in C++11:
for (Graph::GraphNode src : g) {
for (Graph::edge_iterator edge : g.out_edges(src)) {
Graph::GraphNode dst = g.getEdgeDst(edge);
int edgeData = g.getEdgeData(edge);
assert(edgeData == 5);
}
}
- Template Parameters
-
NodeTy | Type of node data |
EdgeTy | Type of edge data |
Directional | true if graph is directed |
InOut | true if directed graph tracks in-edges |
SortedNeighbors | Keep neighbors sorted (for faster findEdge) |