Graphitti
A toolkit/software architecture to ease creating high-performance neural network simulators
|
Public Types | |
using | Graph |
Using directive for graphml graph type (adjacency list) | |
using | EdgeIterator = typename boost::graph_traits<Graph>::edge_iterator |
using | VertexIterator = typename boost::graph_traits<Graph>::vertex_iterator |
using | EdgeDescriptor = typename boost::graph_traits<Graph>::edge_descriptor |
Public Member Functions | |
void | setFilePath (string filePath) |
Set the path for the graphML File to be read. | |
template<class Property > | |
void | registerProperty (const string &propName, Property property) |
Registers a graph property with its attribute name in the graphml file. | |
bool | readGraph () |
Loads a graph from a graphml file into a BGL graph. | |
pair< VertexIterator, VertexIterator > | vertices () |
Exposes the BGL Vertex Iterators of the stored Graph. | |
pair< EdgeIterator, EdgeIterator > | edges () const |
Exposes the BGL Edge Iterators of the stored Graph. | |
size_t | source (const EdgeDescriptor &edge) const |
Retrieves the source vertex index for the given Edge. | |
size_t | target (const EdgeDescriptor &edge) const |
Retrieves the target vertex index for the given Edge. | |
VertexProperty & | operator[] (size_t vertex) |
Direct access to the VertexProperty of a vertex descriptor. | |
const VertexProperty & | operator[] (size_t vertex) const |
Direct access to the VertexProperty of a vertex descriptor. | |
const list< EdgeDescriptor > | edgesSortByTarget () const |
Returns a list of EdgeDescriptors in ascending order by target vertexID. | |
size_t | numVertices () const |
Retrieves the number of vertices in the current graph. | |
size_t | numEdges () const |
Retrieves the number of edges in the current graph. | |
GraphManager (const GraphManager &graphManager)=delete | |
Delete copy and move methods to avoid copy instances of the singleton. | |
GraphManager & | operator= (const GraphManager &graphManager)=delete |
GraphManager (GraphManager &&graphManager)=delete | |
GraphManager & | operator= (GraphManager &&graphManager)=delete |
Static Public Member Functions | |
static GraphManager & | getInstance () |
Returns a single instance of the GraphManager. | |
Definition at line 44 of file GraphManager.h.
using GraphManager::EdgeDescriptor = typename boost::graph_traits<Graph>::edge_descriptor |
Definition at line 52 of file GraphManager.h.
using GraphManager::EdgeIterator = typename boost::graph_traits<Graph>::edge_iterator |
Definition at line 50 of file GraphManager.h.
using GraphManager::Graph |
Using directive for graphml graph type (adjacency list)
Definition at line 47 of file GraphManager.h.
using GraphManager::VertexIterator = typename boost::graph_traits<Graph>::vertex_iterator |
Definition at line 51 of file GraphManager.h.
pair< GraphManager::EdgeIterator, GraphManager::EdgeIterator > GraphManager::edges | ( | ) | const |
Exposes the BGL Edge Iterators of the stored Graph.
Definition at line 51 of file GraphManager.cpp.
const list< GraphManager::EdgeDescriptor > GraphManager::edgesSortByTarget | ( | ) | const |
Returns a list of EdgeDescriptors in ascending order by target vertexID.
Definition at line 76 of file GraphManager.cpp.
|
inlinestatic |
Returns a single instance of the GraphManager.
Definition at line 56 of file GraphManager.h.
size_t GraphManager::numEdges | ( | ) | const |
Retrieves the number of edges in the current graph.
Definition at line 97 of file GraphManager.cpp.
size_t GraphManager::numVertices | ( | ) | const |
Retrieves the number of vertices in the current graph.
Definition at line 92 of file GraphManager.cpp.
VertexProperty & GraphManager::operator[] | ( | size_t | vertex | ) |
Direct access to the VertexProperty of a vertex descriptor.
vertex | the vertex descriptor (index) |
Definition at line 66 of file GraphManager.cpp.
const VertexProperty & GraphManager::operator[] | ( | size_t | vertex | ) | const |
Direct access to the VertexProperty of a vertex descriptor.
vertex | the vertex descriptor (index) |
Definition at line 71 of file GraphManager.cpp.
bool GraphManager::readGraph | ( | ) |
Loads a graph from a graphml file into a BGL graph.
Definition at line 21 of file GraphManager.cpp.
|
inline |
Registers a graph property with its attribute name in the graphml file.
Note: We are passing a pointer to a data member of the Struct that will hold the property. The BGL will use this when loading the graphML file. Reference: https://www.studytonight.com/cpp/pointer-to-members.php
Property | Pointer to a Struct data member that will hold the property |
propName | The attribute name inthe graphml file |
property | Pointer to the property to be registered |
Definition at line 75 of file GraphManager.h.
void GraphManager::setFilePath | ( | string | filePath | ) |
Set the path for the graphML File to be read.
filePath | The absolute path to the graphML file |
Definition at line 16 of file GraphManager.cpp.
size_t GraphManager::source | ( | const EdgeDescriptor & | edge | ) | const |
Retrieves the source vertex index for the given Edge.
edge | the EdgeDescriptor |
Definition at line 56 of file GraphManager.cpp.
size_t GraphManager::target | ( | const EdgeDescriptor & | edge | ) | const |
Retrieves the target vertex index for the given Edge.
edge | the EdgeDescriptor |
Definition at line 61 of file GraphManager.cpp.
pair< GraphManager::VertexIterator, GraphManager::VertexIterator > GraphManager::vertices | ( | ) |
Exposes the BGL Vertex Iterators of the stored Graph.
Definition at line 46 of file GraphManager.cpp.