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 Type
    Method
    Description
    boolean
    Tells if this constraint is a generative constraint.
    generate(Match match, int... ind)
    Generates candidate values for the variable to be generated.
    int
    Number of variables to check consistency.
    boolean
    satisfies(Match match, int... ind)
    Checks if the variables in the Match satisfies this constraint.
  • Method Details

    • satisfies

      boolean satisfies(Match match, int... ind)
      Checks if the variables in the Match satisfies this constraint.
      Parameters:
      match - current pattern match
      ind - 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

      Collection<BioPAXElement> generate(Match match, int... ind)
      Generates candidate values for the variable to be generated.
      Parameters:
      match - current pattern match
      ind - mapped indices
      Returns:
      generated values that satisfy this constraint