|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.gephi.data.attributes.type.DynamicType<T>
T - type of datapublic abstract class DynamicType<T>
A special type which provides methods of getting/setting values of any time interval. It is internally implemented using Interval Tree for efficiency.
| Field Summary | |
|---|---|
protected IntervalTree<T> |
intervalTree
|
| Constructor Summary | |
|---|---|
DynamicType()
Constructs a new DynamicType instance with no intervals. |
|
DynamicType(DynamicType<T> source)
Constructs a deep copy of source. |
|
DynamicType(DynamicType<T> source,
Interval<T> in)
Constructs a deep copy of source that contains a given
Interval<T> in. |
|
DynamicType(DynamicType<T> source,
Interval<T> in,
Interval<T> out)
Constructs a deep copy of source that contains a given
Interval<T> in. |
|
DynamicType(DynamicType<T> source,
java.util.List<Interval<T>> in)
Constructs a deep copy of source with additional intervals
given by List<Interval<T>> in. |
|
DynamicType(DynamicType<T> source,
java.util.List<Interval<T>> in,
java.util.List<Interval<T>> out)
Constructs a deep copy of source with additional intervals
given by List<Interval<T>> in. |
|
DynamicType(Interval<T> in)
Constructs a new DynamicType instance that contains a given
Interval<T> in. |
|
DynamicType(java.util.List<Interval<T>> in)
Constructs a new DynamicType instance with intervals given by
List<Interval<T>> in. |
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Compares this instance with the specified object for equality. |
double |
getHigh()
Returns the rightmost point or Double.POSITIVE_INFINITY in case
of no intervals. |
java.util.List<Interval<T>> |
getIntervals()
Returns a list of all intervals. |
java.util.List<Interval<T>> |
getIntervals(double low,
double high)
Returns a list of intervals which overlap with a [ low, high] time interval. |
java.util.List<Interval<T>> |
getIntervals(Interval interval)
Returns a list of intervals which overlap with a given time interval. |
double |
getLow()
Returns the leftmost point or Double.NEGATIVE_INFINITY in case
of no intervals. |
abstract java.lang.Class |
getUnderlyingType()
Returns the underlying type T. |
T |
getValue()
Returns the estimated value of a set of values whose time intervals overlap with a [ -inf, inf] time interval. |
T |
getValue(double low,
double high)
Returns the estimated value of a set of values whose time intervals overlap with a [ low, high] time interval. |
T |
getValue(double low,
double high,
Estimator estimator)
Returns the estimated value of a set of values whose time intervals overlap with a [ low, high] time interval. |
T |
getValue(Estimator estimator)
Returns the estimated value of a set of values whose time intervals overlap with a [ -inf, inf] time interval. |
T |
getValue(Interval interval)
Returns the estimated value of a set of values whose time intervals overlap with a given time interval. |
abstract T |
getValue(Interval interval,
Estimator estimator)
Returns the estimated value of a set of values whose time intervals overlap with a given time interval. |
java.util.List<T> |
getValues()
Returns a list of all values stored in this instance. |
java.util.List<T> |
getValues(double low,
double high)
Returns a list of values whose time intervals overlap with a [ low, high] time interval. |
java.util.List<T> |
getValues(Interval interval)
Returns a list of values whose time intervals overlap with a given time interval. |
int |
hashCode()
Returns a hashcode of this instance. |
boolean |
isHighExcluded()
Indicates if the rightmost point is excluded. |
boolean |
isInRange(double low,
double high)
Indicates if [ low, high] interval overlaps with any interval of this instance. |
boolean |
isInRange(Interval interval)
Indicates if a given time interval overlaps with any interval of this instance. |
boolean |
isLowExcluded()
Indicates if the leftmost point is excluded. |
java.lang.String |
toString()
Returns a string representation of this instance in a format <[low, high, value], ..., [low, high, value]>. |
java.lang.String |
toString(boolean timesAsDoubles)
Creates a string representation of all the intervals with their values. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected IntervalTree<T> intervalTree
| Constructor Detail |
|---|
public DynamicType()
DynamicType instance with no intervals.
public DynamicType(Interval<T> in)
DynamicType instance that contains a given
Interval<T> in.
in - interval to add (could be null)public DynamicType(java.util.List<Interval<T>> in)
DynamicType instance with intervals given by
List<Interval<T>> in.
in - intervals to add (could be null)public DynamicType(DynamicType<T> source)
source.
source - an object to copy from (could be null, then completely new
instance is created)
public DynamicType(DynamicType<T> source,
Interval<T> in)
source that contains a given
Interval<T> in.
source - an object to copy from (could be null, then completely new
instance is created)in - interval to add (could be null)
public DynamicType(DynamicType<T> source,
Interval<T> in,
Interval<T> out)
source that contains a given
Interval<T> in. Before add it removes from the newly created
object all intervals that overlap with a given Interval<T> out.
source - an object to copy from (could be null, then completely new
instance is created)in - interval to add (could be null)out - interval to remove (could be null)
public DynamicType(DynamicType<T> source,
java.util.List<Interval<T>> in)
source with additional intervals
given by List<Interval<T>> in.
source - an object to copy from (could be null, then completely new
instance is created)in - intervals to add (could be null)
public DynamicType(DynamicType<T> source,
java.util.List<Interval<T>> in,
java.util.List<Interval<T>> out)
source with additional intervals
given by List<Interval<T>> in. Before add it removes from the
newly created object all intervals that overlap with intervals given by
List<Interval<T>> out.
source - an object to copy from (could be null, then completely new
instance is created)in - intervals to add (could be null)out - intervals to remove (could be null)| Method Detail |
|---|
public double getLow()
Double.NEGATIVE_INFINITY in case
of no intervals.
public double getHigh()
Double.POSITIVE_INFINITY in case
of no intervals.
public boolean isLowExcluded()
true if the leftmost point is excluded,
false otherwise.public boolean isHighExcluded()
true if the rightmost point is excluded,
false otherwise.public boolean isInRange(Interval interval)
interval - a given time interval
true a given time interval overlaps with any interval of this
instance, otherwise false.
public boolean isInRange(double low,
double high)
low, high] interval overlaps with any interval of this instance.
low - the left endpointhigh - the right endpoint
true a given time interval overlaps with any interval of this
instance, otherwise false.
java.lang.IllegalArgumentException - if low > high.public T getValue()
-inf, inf] time interval.
Estimator.FIRST is used.
-inf, inf] time interval or
null if there are no intervals.Estimatorpublic T getValue(Interval interval)
Estimator.FIRST is used.
interval - a given time interval
null if there are no intervals.Estimator
public T getValue(double low,
double high)
low, high] time interval.
Estimator.FIRST is used.
low - the left endpointhigh - the right endpoint
low, high] time interval or
null if there are no intervals.
java.lang.IllegalArgumentException - if low > high.Estimatorpublic T getValue(Estimator estimator)
-inf, inf] time interval.
estimator - used to estimate the result
-inf, inf] time interval or
null if there are no intervals.
java.lang.UnsupportedOperationException - if type T doesn't support
the given estimator.Estimator
public abstract T getValue(Interval interval,
Estimator estimator)
interval - a given time intervalestimator - used to estimate the result
null if there are no intervals.
java.lang.UnsupportedOperationException - if type T doesn't support
the given estimator.Estimator
public T getValue(double low,
double high,
Estimator estimator)
low, high] time interval.
low - the left endpointhigh - the right endpointestimator - used to estimate the result
low, high] time interval or
null if there are no intervals.
java.lang.IllegalArgumentException - if low > high.
java.lang.UnsupportedOperationException - if type T doesn't support
the given estimator.Estimatorpublic java.util.List<T> getValues()
public java.util.List<T> getValues(double low,
double high)
low, high] time interval.
low - the left endpointhigh - the right endpoint
low, high] time interval.
java.lang.IllegalArgumentException - if low > high.public java.util.List<T> getValues(Interval interval)
interval - a given time interval
public java.util.List<Interval<T>> getIntervals()
public java.util.List<Interval<T>> getIntervals(Interval interval)
interval - a given time interval
public java.util.List<Interval<T>> getIntervals(double low,
double high)
low, high] time interval.
low - the left endpointhigh - the right endpoint
low, high] time interval.
java.lang.IllegalArgumentException - if low > high.public abstract java.lang.Class getUnderlyingType()
T.
T.public boolean equals(java.lang.Object obj)
Note that two DynamicType instances are equal if they have got
the same type T and their interval trees are equal.
equals in class java.lang.Objectobj - object to which this instance is to be compared
true if and only if the specified Object is a
DynamicType which has the same type T and an
equal interval tree.hashCode()public int hashCode()
hashCode in class java.lang.Objectpublic java.lang.String toString(boolean timesAsDoubles)
timesAsDoubles - indicates if times should be shown as doubles or dates
public java.lang.String toString()
<[low, high, value], ..., [low, high, value]>. Intervals are
ordered by its left endpoint.
toString in class java.lang.Object
|
Gephi Toolkit Javadoc | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||