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 | Private Types
ggl::chem::MC_MC_NodeAdjacency Class Reference

Match constraints of MoleculeComponents. More...

#include <MC_MC_Node.hh>

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

Public Types

enum  MC_Operator {
  MC_EQ, MC_L, MC_G, MC_LQ,
  MC_GQ
}
 

Public Member Functions

virtual MC_MC_NodeAdjacencyclone (void) const
 
virtual bool isConstrainedLabel (const std::string &label) const
 
virtual bool isConstraining (const size_t nodeID) const
 
virtual bool isValidMatch (const sgm::Pattern_Interface &pattern, const sgm::Graph_Interface &target, const size_t matchedTargetID) const
 
virtual bool isValidMatch (const Pattern_Interface &pattern, const Graph_Interface &target, const Match &match) const
 
 MC_MC_NodeAdjacency ()
 
 MC_MC_NodeAdjacency (const MC_NodeAdjacency &toCopy)
 
 MC_MC_NodeAdjacency (const MC_MC_NodeAdjacency &toCopy)
 
 MC_MC_NodeAdjacency (const size_t constrainedNodeID, const MC_Operator op, const size_t count, const LabelSet &nodeLabels, const LabelSet &edgeLabels)
 
 MC_MC_NodeAdjacency (const size_t constrainedNodeID, const MC_Operator op, const size_t count, const std::string &nodeLabel)
 
virtual bool operator== (const sgm::Pattern_Interface::Match_Constraint &toCompare) const
 
virtual bool operator== (const MC_MC_NodeAdjacency &toCompare) const
 
virtual bool operator== (const MC_NodeAdjacency &toCompare) const
 
virtual MC_MC_NodeAdjacencyremap (const sgm::Match &old2newIndexMapping, const size_t unmatchedIndex=UINT_MAX)
 
virtual ~MC_MC_NodeAdjacency ()
 destruction More...
 

Data Fields

size_t constrainedNodeID
 the node ID to be constrained More...
 
size_t count
 the number of adjacent nodes/edges fulfilling the label condition More...
 
LabelSet edgeLabels
 the labels of adjacent edges that have to be counted More...
 
LabelSet nodeLabels
 the node labels of adjacent nodes that have to be counted More...
 
MC_Operator op
 the relational operator to be applied using 'count' More...
 

Private Types

typedef MC_NodeAdjacency::LabelSet LabelSet
 the type that defines a set of labels More...
 

Detailed Description

    This an sgm::MC_NodeAdjacency 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.
Author
Martin Mann - http://www.bioinf.uni-freiburg.de/~mmann/

Definition at line 28 of file MC_MC_Node.hh.

Member Typedef Documentation

typedef MC_NodeAdjacency::LabelSet ggl::chem::MC_MC_NodeAdjacency::LabelSet
private

Definition at line 32 of file MC_MC_Node.hh.

Member Enumeration Documentation

Possible operators to be applied onto the count of matched adjacent edges and nodes.

Enumerator
MC_EQ 

equality operator

MC_L 

less operator

MC_G 

greater operator

MC_LQ 

less or equal operator

MC_GQ 

greater or equal operator

Definition at line 229 of file MC_Node.hh.

Constructor & Destructor Documentation

ggl::chem::MC_MC_NodeAdjacency::MC_MC_NodeAdjacency ( )
inline

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

Definition at line 55 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeAdjacency::MC_MC_NodeAdjacency ( const MC_NodeAdjacency toCopy)
inline

Copy construction of the match constraint

Definition at line 62 of file MC_MC_Node.hh.

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

Copy construction of the match constraint

Definition at line 69 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeAdjacency::MC_MC_NodeAdjacency ( const size_t  constrainedNodeID,
const MC_Operator  op,
const size_t  count,
const LabelSet nodeLabels,
const LabelSet edgeLabels 
)
inline

Construction of the match constraint

Parameters
constrainedNodeIDthe index of the node this constraint is for
opthe relational operator to be applied using 'count'
countthe number of adjacent nodes/edges fulfilling the label condition
nodeLabelsthe node labels of adjacent nodes that have to be counted
edgeLabelsthe labels of adjacent edges that have to be counted

Definition at line 82 of file MC_MC_Node.hh.

ggl::chem::MC_MC_NodeAdjacency::MC_MC_NodeAdjacency ( const size_t  constrainedNodeID,
const MC_Operator  op,
const size_t  count,
const std::string &  nodeLabel 
)
inline

Construction of the match constraint

Parameters
constrainedNodeIDthe index of the node this constraint is for
opthe relational operator to be applied using 'count'
countthe number of adjacent nodes/edges fulfilling the label condition
nodeLabela single node label of adjacent nodes that has to be counted

Definition at line 99 of file MC_MC_Node.hh.

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

Definition at line 108 of file MC_MC_Node.hh.

Member Function Documentation

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

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

Reimplemented from sgm::MC_NodeAdjacency.

Definition at line 303 of file MC_MC_Node.hh.

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

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

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
matchedTargetIDthe matched node index within the target graph
Returns
true if the match is valid; false if the constraint is violated

Reimplemented from sgm::MC_NodeAdjacency.

Definition at line 128 of file MC_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 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_NodeAdjacency::operator== ( const MC_MC_NodeAdjacency 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 347 of file MC_MC_Node.hh.

virtual bool sgm::MC_NodeAdjacency::operator== ( const MC_NodeAdjacency 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 508 of file MC_Node.hh.

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

Creates a new MC_NodeAdjacency 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_NodeAdjacency object

Reimplemented from sgm::MC_NodeAdjacency.

Definition at line 324 of file MC_MC_Node.hh.

Field Documentation

size_t sgm::MC_Node::constrainedNodeID
inherited

Definition at line 45 of file MC_Node.hh.

size_t sgm::MC_NodeAdjacency::count
inherited

Definition at line 248 of file MC_Node.hh.

LabelSet sgm::MC_NodeAdjacency::edgeLabels
inherited

Definition at line 254 of file MC_Node.hh.

LabelSet sgm::MC_NodeAdjacency::nodeLabels
inherited

Definition at line 251 of file MC_Node.hh.

MC_Operator sgm::MC_NodeAdjacency::op
inherited

Definition at line 245 of file MC_Node.hh.


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