Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions | Data Fields
nom::Subgraph< T, U > Class Template Reference

Effectively a constant reference to a graph. More...

#include <Graph.h>

Public Types

using NodeRef = typename Graph< T, U >::NodeRef
 
using EdgeRef = typename Graph< T, U >::EdgeRef
 

Public Member Functions

void addNode (NodeRef n)
 
bool hasNode (NodeRef n) const
 
void removeNode (NodeRef n)
 
void addEdge (EdgeRef e)
 
bool hasEdge (EdgeRef n) const
 
void removeEdge (EdgeRef e)
 
const std::unordered_set< NodeRef > & getNodes () const
 
const std::unordered_set< EdgeRef > & getEdges () const
 
void printEdges ()
 
void printNodes () const
 

Data Fields

std::unordered_set< NodeRef > Nodes
 
std::unordered_set< EdgeRef > Edges
 

Detailed Description

template<typename T, typename U = T>
class nom::Subgraph< T, U >

Effectively a constant reference to a graph.

Note
A Subgraph could actually point to an entire Graph.

Subgraphs can only contain references to nodes/edges in a Graph. They are technically mutable, but this should be viewed as a construction helper rather than a fact to be exploited. There are no deleters, for example.

Definition at line 110 of file Graph.h.


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