Interface IBinaryNaturalRelation

All Superinterfaces:
Iterable<IntPair>, VerboseAction
All Known Implementing Classes:
BasicNaturalRelation

public interface IBinaryNaturalRelation extends VerboseAction, Iterable<IntPair>
a relation R(x,y) where x >= 0
  • Method Details

    • add

      boolean add(int x, int y)
      Add (x,y) to the relation
      Returns:
      true iff the relation changes as a result of this call.
    • getRelated

      IntSet getRelated(int x)
      Returns:
      IntSet of y s.t. R(x,y) or null if none.
    • getRelatedCount

      int getRelatedCount(int x)
      Returns:
      number of y s.t. R(x,y)
    • anyRelated

      boolean anyRelated(int x)
      Returns:
      true iff there exists pair (x,y) for some y
    • remove

      void remove(int x, int y)
    • removeAll

      void removeAll(int x)
    • contains

      boolean contains(int x, int y)
      Returns:
      true iff (x,y) \in R
    • maxKeyValue

      int maxKeyValue()