Caffe2 - C++ API
A deep learning, cross platform ML framework
Public Types | Public Member Functions
nom::matcher::MatchGraph< GraphType > Class Template Reference
Inheritance diagram for nom::matcher::MatchGraph< GraphType >:
nom::Graph< MatchPredicate< GraphType > >

Public Types

using SubgraphMatchResultType = SubgraphMatchResult< GraphType >
using ReplaceGraphOperation = std::function< bool(GraphType &, typename GraphType::NodeRef, const SubgraphMatchResultType &)>
- Public Types inherited from nom::Graph< MatchPredicate< GraphType > >
using SubgraphType = Subgraph< MatchPredicate< GraphType >, U... >
using NodeRef = Node< MatchPredicate< GraphType >, U... > *
using EdgeRef = Edge< MatchPredicate< GraphType >, U... > *

Public Member Functions

bool isNodeMatch (typename GraphType::NodeRef node, const MatchPredicate< GraphType > &matchPredicate) const
SubgraphMatchResultType isSubgraphMatch (typename GraphType::NodeRef root, const typename MatchGraph::NodeRef &rootCriteriaRef, bool invertGraphTraversal=true, bool debug=false) const
void replaceSubgraph (GraphType &graph, const typename MatchGraph::NodeRef &criteria, const ReplaceGraphOperation &replaceFunction, bool invertGraphTraversal=true) const
- Public Member Functions inherited from nom::Graph< MatchPredicate< GraphType > >
 Graph (const Graph &)=delete
 Graph (Graph &&)=default
Graphoperator= (Graph &&)=default
NodeRef createNode (MatchPredicate< GraphType > &&data)
 Creates a node and retains ownership of it. More...
NodeRef createNode (Arg &&arg)
NodeRef createNode ()
void moveNode (NodeRef node, Graph< MatchPredicate< GraphType >, U... > *destGraph)
void moveEdge (EdgeRef edge, Graph< MatchPredicate< GraphType >, U... > *destGraph)
void moveSubgraph (const Subgraph< MatchPredicate< GraphType >, U... > &subgraph, Graph< MatchPredicate< GraphType >, U... > *destGraph)
bool isValid ()
void swapNodes (NodeRef n1, NodeRef n2)
void replaceNode (const NodeRef &oldNode, const NodeRef &newNode)
 Replace a node in the graph with another node. More...
void replaceOutEdges (const NodeRef &oldNode, const NodeRef &newNode)
void replaceInEdges (const NodeRef &oldNode, const NodeRef &newNode)
EdgeRef createEdge (NodeRef tail, NodeRef head,
 Creates a directed edge and retains ownership of it. More...
EdgeRef getEdgeIfExists (NodeRef tail, NodeRef head) const
 Get a reference to the edge between two nodes if it exists. More...
bool hasEdge (NodeRef tail, NodeRef head) const
 Returns true if there is an edge between the given two nodes.
bool hasEdge (EdgeRef e) const
EdgeRef getEdge (NodeRef tail, NodeRef head) const
 Get a reference to the edge between two nodes if it exists. More...
void deleteNode (NodeRef n)
 Deletes a node from the graph. More...
void deleteNodes (const std::unordered_set< NodeRef > &nodes)
bool hasNode (NodeRef node) const
void deleteEdge (EdgeRef e)
 Deletes a edge from the graph. More...
const std::vector< NodeRefgetMutableNodes ()
size_t getNodesCount () const
const std::vector< EdgeRefgetMutableEdges ()
size_t getEdgesCount () const

Detailed Description

template<typename GraphType>
class nom::matcher::MatchGraph< GraphType >

Definition at line 105 of file SubgraphMatcher.h.

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