public final class IntervalDoubleMap extends IntervalMap<Double>
Constructor and Description |
---|
IntervalDoubleMap()
Default constructor.
|
IntervalDoubleMap(double[] keys,
double[] vals)
Constructor with an initial interval map.
|
IntervalDoubleMap(int capacity)
Constructor with capacity.
|
Modifier and Type | Method and Description |
---|---|
double |
getDouble(Interval interval)
Get the value for the given interval.
|
double |
getDouble(Interval interval,
double defaultValue)
Get the value for the given interval.
|
Class<Double> |
getTypeClass()
Returns the value type class.
|
boolean |
isSupported(Estimator estimator)
Returns whether
estimator is supported. |
double[] |
toDoubleArray()
Returns an array of all values in this map.
|
clear, contains, contains, equals, get, get, getIntervals, hashCode, isEmpty, put, remove, size, toKeysArray, toString, toString, toString, toValuesArray
public IntervalDoubleMap()
The map is empty with zero capacity.
public IntervalDoubleMap(int capacity)
Using this constructor can improve performances if the number of timestamps is known in advance as it minimizes array resizes.
capacity
- timestamp capacitypublic IntervalDoubleMap(double[] keys, double[] vals)
The keys
array must be in the same format returned by
IntervalMap.getIntervals()
.
keys
- initial keys contentvals
- initial values contentpublic double getDouble(Interval interval)
interval
- intervalIllegalArgumentException
- if the element doesn't existpublic double getDouble(Interval interval, double defaultValue)
Return defaultValue
if the value is not found.
interval
- intervaldefaultValue
- default valuepublic double[] toDoubleArray()
This method may return a reference to the underlying array so clients should make a copy if the array is written to.
public Class<Double> getTypeClass()
TimeMap
Copyright © 2007–2015 Gephi Consortium. All rights reserved.