edu.stanford.math.plex4.homology.barcodes
T
- the underlying type - e.g. most likely Integer, Double, or Floatpublic class Interval<T extends java.lang.Comparable<T>> extends java.lang.Object implements java.lang.Comparable<Interval<T>>, java.io.Serializable
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Interval<T> arg0) |
int |
compareTo2(Interval<T> arg0) |
boolean |
containsPoint(T point)
This function determines whether the given point is a member of
the interval.
|
boolean |
equals(java.lang.Object obj) |
T |
getEnd()
This function returns the end of the interval.
|
T |
getStart()
This function returns the start of the interval.
|
int |
hashCode() |
boolean |
isInfinite()
This function indicates whether the interval is infinite (either left or
right infinite, or both).
|
boolean |
isLeftClosed()
This function indicates whether the interval is closed on the left.
|
boolean |
isLeftInfinite()
This function indicates whether the interval is left-infinite.
|
boolean |
isRightClosed()
This function indicates whether the interval is closed on the right.
|
boolean |
isRightInfinite()
This function indicates whether the interval is right-infinite.
|
static <T extends java.lang.Comparable<T>> |
makeFiniteClosedInterval(T start,
T end)
This function returns a finite closed interval.
|
static <T extends java.lang.Comparable<T>> |
makeFiniteLeftOpenInterval(T start,
T end)
This function returns a finite left-open interval.
|
static <T extends java.lang.Comparable<T>> |
makeFiniteOpenInterval(T start,
T end)
This function returns a finite open interval.
|
static <T extends java.lang.Comparable<T>> |
makeFiniteRightOpenInterval(T start,
T end)
This function returns a finite right-open interval.
|
static <T extends java.lang.Comparable<T>> |
makeInterval(T start,
T end,
boolean isLeftClosed,
boolean isRightClosed,
boolean isLeftInfinite,
boolean isRightInfinite)
This function returns an interval with the desired parameters.
|
static <T extends java.lang.Comparable<T>> |
makeLeftInfiniteClosedInterval(T end)
This function returns a left-infinite closed interval.
|
static <T extends java.lang.Comparable<T>> |
makeLeftInfiniteLeftOpenInterval(T end)
This function returns a left-infinite left-open interval.
|
static <T extends java.lang.Comparable<T>> |
makeLeftInfiniteOpenInterval(T end)
This function returns a left-infinite open interval.
|
static <T extends java.lang.Comparable<T>> |
makeLeftInfiniteRightOpenInterval(T end)
This function returns a left-infinite right-open interval.
|
static <T extends java.lang.Comparable<T>> |
makeRightInfiniteClosedInterval(T start)
This function returns a right-infinite closed interval.
|
static <T extends java.lang.Comparable<T>> |
makeRightInfiniteLeftOpenInterval(T start)
This function returns a right-infinite left-open interval.
|
static <T extends java.lang.Comparable<T>> |
makeRightInfiniteOpenInterval(T start)
This function returns a right-infinite open interval.
|
static <T extends java.lang.Comparable<T>> |
makeRightInfiniteRightOpenInterval(T start)
This function returns a right-infinite right-open interval.
|
java.lang.String |
toString() |
public static <T extends java.lang.Comparable<T>> Interval<T> makeFiniteClosedInterval(T start, T end)
T
- start
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeFiniteRightOpenInterval(T start, T end)
T
- start
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeFiniteLeftOpenInterval(T start, T end)
T
- start
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeFiniteOpenInterval(T start, T end)
T
- start
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeRightInfiniteClosedInterval(T start)
T
- start
- public static <T extends java.lang.Comparable<T>> Interval<T> makeRightInfiniteRightOpenInterval(T start)
T
- start
- public static <T extends java.lang.Comparable<T>> Interval<T> makeRightInfiniteLeftOpenInterval(T start)
T
- start
- public static <T extends java.lang.Comparable<T>> Interval<T> makeRightInfiniteOpenInterval(T start)
T
- start
- public static <T extends java.lang.Comparable<T>> Interval<T> makeLeftInfiniteClosedInterval(T end)
T
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeLeftInfiniteRightOpenInterval(T end)
T
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeLeftInfiniteLeftOpenInterval(T end)
T
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeLeftInfiniteOpenInterval(T end)
T
- end
- public static <T extends java.lang.Comparable<T>> Interval<T> makeInterval(T start, T end, boolean isLeftClosed, boolean isRightClosed, boolean isLeftInfinite, boolean isRightInfinite)
T
- start
- end
- isLeftClosed
- isRightClosed
- isLeftInfinite
- isRightInfinite
- public T getStart()
public T getEnd()
public boolean isLeftClosed()
public boolean isRightClosed()
public boolean isLeftInfinite()
public boolean isRightInfinite()
public boolean isInfinite()
public boolean containsPoint(T point)
point
- the point to testpublic java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object