Class AllenRelations
java.lang.Object
org.aksw.commons.algebra.allen.AllenRelations
Guava adapter for computing allen relations from guava ranges
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends Comparable<T>>
intcompare(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>>
AllenRelationcompute(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisAfter(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisBefore(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) is strictly before (not meeting)static <T extends Comparable<T>>
booleanisContaining(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisDuring(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisFinishedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisFinishing(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisLowerEndpointBefore(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 falsestatic <T extends Comparable<T>>
booleanisMeeting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) The intersection must be emptystatic <T extends Comparable<T>>
booleanisMetBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisOverlappedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisOverlapping(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisStartedBy(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisStarting(com.google.common.collect.Range<T> x, com.google.common.collect.Range<T> y) static <T extends Comparable<T>>
booleanisUpperEndpointBefore(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 falsestatic <T extends Comparable<T>>
booleanisUpperEndpointOfXBeforeLowerEndpointOfY(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--| ^
-
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
-