Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Public Member Functions | Data Fields
sgm::MC_Node Class Referenceabstract

Interface node match constraints. More...

#include <MC_Node.hh>

Inheritance diagram for sgm::MC_Node:
Inheritance graph
[legend]

Public Member Functions

virtual MC_Nodeclone (void) const =0
 
virtual bool isConstrainedLabel (const std::string &label) const =0
 
virtual bool isConstraining (const size_t nodeID) const
 
virtual bool isValidMatch (const Pattern_Interface &pattern, const Graph_Interface &target, const size_t matchedTargetID) const =0
 
virtual bool isValidMatch (const Pattern_Interface &pattern, const Graph_Interface &target, const Match &match) const
 
 MC_Node (const size_t constrainedNodeID)
 
 MC_Node (const MC_Node &toCopy)
 
virtual bool operator== (const sgm::Pattern_Interface::Match_Constraint &toCompare) const
 
virtual MC_Noderemap (const Match &old2newIndexMapping, const size_t unmatchedIndex=UINT_MAX)=0
 
virtual ~MC_Node ()
 destruction More...
 

Data Fields

size_t constrainedNodeID
 the node ID to be constrained More...
 

Detailed Description

   A match node constraint describes additional properties that have to be
   fulfilled by a given matched node on a given target.
Author
Martin Mann - http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 40 of file MC_Node.hh.

Constructor & Destructor Documentation

sgm::MC_Node::MC_Node ( const size_t  constrainedNodeID)
inline

construction

Parameters
constrainedNodeIDthe node ID to be constrained

Definition at line 49 of file MC_Node.hh.

sgm::MC_Node::MC_Node ( const MC_Node toCopy)
inline

copy construction

Parameters
toCopythe MC_Node object to copy

Definition at line 55 of file MC_Node.hh.

virtual sgm::MC_Node::~MC_Node ( )
inlinevirtual

Definition at line 61 of file MC_Node.hh.

Member Function Documentation

virtual MC_Node* sgm::MC_Node::clone ( void  ) const
pure virtual

Creates a new MC_Node heap object that equals the current object. NOTE: YOU have to delete it later on! There is no garbage collection!

Returns
a new allocated MC_Node object that equals this

Implements sgm::Pattern_Interface::Match_Constraint.

Implemented in sgm::MC_NodeLabel, ggl::chem::MC_MC_NodeLabel, sgm::MC_NodeAdjacency, ggl::chem::MoleculeDecomposition::MC_MC_RingNode, and ggl::chem::MC_MC_NodeAdjacency.

virtual bool sgm::Pattern_Interface::Match_Constraint::isConstrainedLabel ( const std::string &  label) const
pure virtualinherited

Checks whether or not a given label is part of the constraint information. This check is needed by some parsers to verify the wildcard definition.

Parameters
labelthe label of interest
Returns
true if the label is part of the constraint; false otherwise

Implemented in sgm::MC_NodeLabel, sgm::MC_EdgeLabel, sgm::MC_NodeAdjacency, ggl::chem::MoleculeDecomposition::MC_MC_RingNode, and sgm::MC_NoEdge.

virtual bool sgm::MC_Node::isConstraining ( const size_t  nodeID) const
inlinevirtual

Checks whether or not this constraint covers the node with the given ID.

Parameters
nodeIDthe ID of the node of interest
Returns
true if the node is covered by the constraint; false otherwise

Implements sgm::Pattern_Interface::Match_Constraint.

Definition at line 74 of file MC_Node.hh.

virtual bool sgm::MC_Node::isValidMatch ( const Pattern_Interface pattern,
const Graph_Interface target,
const size_t  matchedTargetID 
) const
pure virtual

Checks whether or not a match on a given target fulfills the additional node constraint for the pattern matching.

Parameters
patternthe pattern graph that was matched
targetthe target graph the pattern was matched on
matchedTargetIDthe matched node index within the target graph
Returns
true if the match is valid; false if the constraint is violated

Implemented in sgm::MC_NodeLabel, ggl::chem::MC_MC_NodeLabel, ggl::chem::MoleculeDecomposition::MC_MC_RingNode, sgm::MC_NodeAdjacency, and ggl::chem::MC_MC_NodeAdjacency.

virtual bool sgm::MC_Node::isValidMatch ( const Pattern_Interface pattern,
const Graph_Interface target,
const Match match 
) const
inlinevirtual

Checks whether or not a match on a given target fulfills the additional node constraint for the pattern matching.

Parameters
patternthe pattern graph that was matched
targetthe target graph the pattern was matched on
matchthe match information for the left side pattern of the pattern on the target graph
Returns
true if the match is valid; false if the constraint is violated

Implements sgm::Pattern_Interface::Match_Constraint.

Definition at line 140 of file MC_Node.hh.

virtual bool sgm::MC_Node::operator== ( const sgm::Pattern_Interface::Match_Constraint toCompare) const
inlinevirtual

Equality comparison to another match constraint.

Parameters
toComparethe constraint to compare to
Returns
true if the constraints are equal; false otherwise

Implements sgm::Pattern_Interface::Match_Constraint.

Definition at line 154 of file MC_Node.hh.

virtual MC_Node* sgm::MC_Node::remap ( const Match old2newIndexMapping,
const size_t  unmatchedIndex = UINT_MAX 
)
pure virtual

Creates a new MC_Node heap object that equals the current object but uses the new indices given by old2newIndexMapping. NOTE: YOU have to delete it later on! There is no garbage collection!

Parameters
old2newIndexMappingthe index mapping to be used for the remapping
unmatchedIndexan optional specific index that marks unmatched nodes within old2newIndexMapping. if this constrains one of these nodes, no remapping is done and NULL is returned
Returns
a new allocated MC_Node object

Implements sgm::Pattern_Interface::Match_Constraint.

Implemented in sgm::MC_NodeLabel, ggl::chem::MC_MC_NodeLabel, sgm::MC_NodeAdjacency, ggl::chem::MoleculeDecomposition::MC_MC_RingNode, and ggl::chem::MC_MC_NodeAdjacency.

Field Documentation

size_t sgm::MC_Node::constrainedNodeID

Definition at line 45 of file MC_Node.hh.


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