Package org.biopax.paxtools.pattern
Interface Constraint
- All Known Implementing Classes:
ActivityConstraint,ActivityModificationChangeConstraint,AND,ConstraintAdapter,ConstraintChain,ControlsNotParticipant,ControlToControllerER,ConversionSide,Empty,Equality,Field,FieldOfMultiple,HasAnID,IDConstraint,InterToPartER,LinkedPE,MappedConst,ModificationChangeConstraint,MultiPathConstraint,NonUbique,NOT,OR,Participant,ParticipatesInConv,PathConstraint,PEChainsIntersect,RelatedControl,SelfOrThis,Size,Type,XOR
public interface Constraint
A constraint to check if a set of variables satisfy the requirements. If a constraint
canGenerate, then it can generate possible values for the last variable, using the other
variables.
- Author:
- Ozgun Babur
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTells if this constraint is a generative constraint.Generates candidate values for the variable to be generated.intNumber of variables to check consistency.booleanChecks if the variables in the Match satisfies this constraint.
-
Method Details
-
satisfies
Checks if the variables in the Match satisfies this constraint.- Parameters:
match- current pattern matchind- mapped indices of the match- Returns:
- true if this constraint is satisfied
-
getVariableSize
int getVariableSize()Number of variables to check consistency. If this is a generative constraint, then the last variable is to be generated, and other are prerequisite.- Returns:
- number of indexes this constraint uses
-
canGenerate
boolean canGenerate()Tells if this constraint is a generative constraint.- Returns:
- true if constraint is generative
-
generate
Generates candidate values for the variable to be generated.- Parameters:
match- current pattern matchind- mapped indices- Returns:
- generated values that satisfy this constraint
-