Generated on Wed Apr 29 2015 11:51:41 for GGL-4.1.2 by doxygen 1.8.3.1
Public Types | Public Member Functions | Data Fields
ggl::chem::MC_MC_NodeLabel Class Reference

#include <MC_MC_Node.hh>

Inheritance diagram for ggl::chem::MC_MC_NodeLabel:
Inheritance graph
[legend]

Public Types

enum  CompareType { ALLOWED, FORBIDDEN }
 
typedef MC_NodeLabel::LabelSet LabelSet
 the type that defines a set of labels More...
 

Public Member Functions

virtual MC_MC_NodeLabelclone (void) const
 
virtual bool isConstrainedLabel (const std::string &label) const
 
virtual bool isConstraining (const size_t nodeID) const
 
virtual bool isValidMatch (const Pattern_Interface &pattern, const Graph_Interface &target, const Match &match) const
 
virtual bool isValidMatch (const sgm::Pattern_Interface &pattern, const sgm::Graph_Interface &target, const size_t matchedTargetID) const
 
 MC_MC_NodeLabel ()
 
 MC_MC_NodeLabel (const size_t constrainedNodeID)
 
 MC_MC_NodeLabel (const size_t constrainedNodeID, const LabelSet &nodeLabels)
 
 MC_MC_NodeLabel (const size_t constrainedNodeID, const LabelSet &nodeLabels, const CompareType &compareType)
 
 MC_MC_NodeLabel (const MC_NodeLabel &toCopy)
 
 MC_MC_NodeLabel (const MC_MC_NodeLabel &toCopy)
 
virtual bool operator== (const sgm::Pattern_Interface::Match_Constraint &toCompare) const
 
virtual bool operator== (const MC_MC_NodeLabel &toCompare) const
 
virtual bool operator== (const MC_NodeLabel &toCompare) const
 
virtual MC_MC_NodeLabelremap (const sgm::Match &old2newIndexMapping, const size_t unmatchedIndex=UINT_MAX)
 
virtual ~MC_MC_NodeLabel ()
 destruction More...
 

Data Fields

CompareType compareType
 
size_t constrainedNodeID
 the node ID to be constrained More...
 
LabelSet nodeLabels
 

Detailed Description

A an sgm::MC_NodeLabel constraint for MoleculeComponent descriptions. Therefore, it assumes valid (complex) atom labels for all nodes.

NOTE: Only the atom identifier is used for comparisons. All charge, class, or proton information is ignored.

NOTE: This constraint is only useful if the according pattern node shows a wildcard label such that it can be matched on any target node.

Author
Martin Mann - http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 372 of file MC_MC_Node.hh.

Member Typedef Documentation

typedef MC_NodeLabel::LabelSet ggl::chem::MC_MC_NodeLabel::LabelSet

Definition at line 377 of file MC_MC_Node.hh.

Member Enumeration Documentation

Enumerator
ALLOWED 
FORBIDDEN 

Definition at line 597 of file MC_Node.hh.

Constructor & Destructor Documentation

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( )
inline

Default construction of the match constraint : undefined values are initialized with INT_MAX or empty sets

Definition at line 398 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( const size_t  constrainedNodeID)
inline

construction where the allowed node labels are empty

Parameters
constrainedNodeIDthe node ID to be constrained

Definition at line 404 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( const size_t  constrainedNodeID,
const LabelSet nodeLabels 
)
inline

construction where the allowed node labels are empty

Parameters
constrainedNodeIDthe node ID to be constrained
nodeLabelsthe allowed node labels to be matched on

Definition at line 411 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( const size_t  constrainedNodeID,
const LabelSet nodeLabels,
const CompareType compareType 
)
inline

construction where the allowed node labels are empty

Parameters
constrainedNodeIDthe node ID to be constrained
nodeLabelsthe allowed node labels to be matched on
compareTypethe type of comparison to be applied

Definition at line 421 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( const MC_NodeLabel toCopy)
inline

copy construction

Parameters
toCopythe MC_NodeLabel object to copy

Definition at line 429 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeLabel::MC_MC_NodeLabel ( const MC_MC_NodeLabel toCopy)
inline

copy construction

Parameters
toCopythe MC_MC_NodeLabel object to copy

Definition at line 435 of file MC_MC_Node.hh.

virtual ggl::chem::MC_MC_NodeLabel::~MC_MC_NodeLabel ( )
inlinevirtual

Definition at line 441 of file MC_MC_Node.hh.

Member Function Documentation

virtual MC_MC_NodeLabel* ggl::chem::MC_MC_NodeLabel::clone ( void  ) const
inlinevirtual

Creates a new MC_NodeLabel 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_NodeLabel object that equals *this

Reimplemented from sgm::MC_NodeLabel.

Definition at line 515 of file MC_MC_Node.hh.

virtual bool sgm::MC_NodeLabel::isConstrainedLabel ( const std::string &  label) const
inlinevirtualinherited

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

Implements sgm::Pattern_Interface::Match_Constraint.

Definition at line 727 of file MC_Node.hh.

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

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 Match match 
) const
inlinevirtualinherited

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 ggl::chem::MC_MC_NodeLabel::isValidMatch ( const sgm::Pattern_Interface pattern,
const sgm::Graph_Interface target,
const size_t  matchedTargetID 
) const
inlinevirtual

Checks whether or not the matched node holds one of the allowed labels.

NOTE: If node labels are given, only checking the atom identifier, not the whole node label is checked against the label set.

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

Reimplemented from sgm::MC_NodeLabel.

Definition at line 459 of file MC_MC_Node.hh.

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

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 bool ggl::chem::MC_MC_NodeLabel::operator== ( const MC_MC_NodeLabel toCompare) const
inlinevirtual

Equality comparison to another match constraint.

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

Definition at line 559 of file MC_MC_Node.hh.

virtual bool sgm::MC_NodeLabel::operator== ( const MC_NodeLabel toCompare) const
inlinevirtualinherited

Equality comparison to another match constraint.

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

Definition at line 794 of file MC_Node.hh.

virtual MC_MC_NodeLabel* ggl::chem::MC_MC_NodeLabel::remap ( const sgm::Match old2newIndexMapping,
const size_t  unmatchedIndex = UINT_MAX 
)
inlinevirtual

Creates a new MC_NodeLabel 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_NodeLabel object

Reimplemented from sgm::MC_NodeLabel.

Definition at line 536 of file MC_MC_Node.hh.

Field Documentation

CompareType sgm::MC_NodeLabel::compareType
inherited

the type of comparison to be applied, i.e. if to ensure that the edge label is among the edgeLabels (ALLOWED) or that it is not present (FORBIDDEN)

Definition at line 612 of file MC_Node.hh.

size_t sgm::MC_Node::constrainedNodeID
inherited

Definition at line 45 of file MC_Node.hh.

LabelSet sgm::MC_NodeLabel::nodeLabels
inherited

the set of labels this node can be mapped on NOTE: if empty, no matching will be allowed !!!

Definition at line 607 of file MC_Node.hh.


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