Class AllenRelations

java.lang.Object
org.aksw.commons.algebra.allen.AllenRelations

public class AllenRelations extends Object
Guava adapter for computing allen relations from guava ranges
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static <T extends Comparable<T>>
    int
    compare(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    A comparator that returns 0 when the argument ranges overlap, -1 if the first argument is before the other one, and 1 otherwise.
    static <T extends Comparable<T>>
    AllenRelation
    compute(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isAfter(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isBefore(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    is strictly before (not meeting)
    static <T extends Comparable<T>>
    boolean
    isContaining(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isDuring(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isFinishedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isFinishing(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isLowerEndpointBefore(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
    cmp([5, _) (5, _)) yields true cmp((5, _) [5, _)) yields false
    static <T extends Comparable<T>>
    boolean
    isMeeting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    The intersection must be empty
    static <T extends Comparable<T>>
    boolean
    isMetBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isOverlappedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isOverlapping(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isStartedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isStarting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
     
    static <T extends Comparable<T>>
    boolean
    isUpperEndpointBefore(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
    cmp((_, 5) (_, 5]) yields true cmp(( , 5] (_, 5)) yields false
    static <T extends Comparable<T>>
    boolean
    isUpperEndpointOfXBeforeLowerEndpointOfY(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
    Is upper endpoint of x before lower endpoint of Y v |--x---| |---y--| ^

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AllenRelations

      public AllenRelations()
  • Method Details

    • compute

      public static <T extends Comparable<T>> AllenRelation compute(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • compare

      public static <T extends Comparable<T>> int compare(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
      A comparator that returns 0 when the argument ranges overlap, -1 if the first argument is before the other one, and 1 otherwise.
    • isBefore

      public static <T extends Comparable<T>> boolean isBefore(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
      is strictly before (not meeting)
    • isMeeting

      public static <T extends Comparable<T>> boolean isMeeting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
      The intersection must be empty
    • isOverlapping

      public static <T extends Comparable<T>> boolean isOverlapping(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isStarting

      public static <T extends Comparable<T>> boolean isStarting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isDuring

      public static <T extends Comparable<T>> boolean isDuring(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isFinishing

      public static <T extends Comparable<T>> boolean isFinishing(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isAfter

      public static <T extends Comparable<T>> boolean isAfter(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isMetBy

      public static <T extends Comparable<T>> boolean isMetBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isOverlappedBy

      public static <T extends Comparable<T>> boolean isOverlappedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isStartedBy

      public static <T extends Comparable<T>> boolean isStartedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isContaining

      public static <T extends Comparable<T>> boolean isContaining(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isFinishedBy

      public static <T extends Comparable<T>> boolean isFinishedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y)
    • isUpperEndpointOfXBeforeLowerEndpointOfY

      public static <T extends Comparable<T>> boolean isUpperEndpointOfXBeforeLowerEndpointOfY(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
      Is upper endpoint of x before lower endpoint of Y v |--x---| |---y--| ^
    • isUpperEndpointBefore

      public static <T extends Comparable<T>> boolean isUpperEndpointBefore(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
      cmp((_, 5) (_, 5]) yields true cmp(( , 5] (_, 5)) yields false
    • isLowerEndpointBefore

      public static <T extends Comparable<T>> boolean isLowerEndpointBefore(T x, com.google.common.collect.BoundType xbt, T y, com.google.common.collect.BoundType ybt)
      cmp([5, _) (5, _)) yields true cmp((5, _) [5, _)) yields false