Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## ifs.model
Class BinaryConstraint

    java.lang.Object
      ifs.model.Constraint
          ifs.model.BinaryConstraint

Direct Known Subclasses:
  CSPBinaryConstraint, Dependence, JenrlConstraint

    public abstract class BinaryConstraint

extends Constraint

Binary constraint.
Extension of `Constraint` that links exactly two variables.

Version:
  1.0
Author:
  Tomáš Müller
See Also:
  `Variable`, `Constraint`, `Model`

Constructor Summary
`BinaryConstraint()`

Method Summary
`void` | `addVariable(Variable var)` Add a variable to this constraint
`Variable` | `another(Variable variable)` Returns the variable out of the constraints variables which is different from the given variable.
`Variable` | `first()` First variable
`boolean` | `isFirst(Variable variable)` True, id the given variable is the first one
`Variable` | `second()` Second variable

Methods inherited from class ifs.model.Constraint
`addConstraintListener, assigned, assignedVariables, computeConflicts, countAssignedVariables, countVariables, getDescription, getId, getInfo, getModel, getName, hashCode, inConflict, isConsistent, isHard, removeConstraintListener, removeVariable, setModel, unassigned, variables`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BinaryConstraint

    public BinaryConstraint()

Method Detail

### addVariable

    public void addVariable(Variable var)

  Description copied from class: `Constraint`
  Add a variable to this constraint

  Overrides:
    `addVariable` in class `Constraint`

### first

    public Variable first()

  First variable

### second

    public Variable second()

  Second variable

### isFirst

    public boolean isFirst(Variable variable)

  True, id the given variable is the first one

### another

    public Variable another(Variable variable)

  Returns the variable out of the constraints variables which is different from the given variable.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 Tomáš Müller