avnmp.java.dp
Class TimeSeries
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractSet
|
+--java.util.TreeSet
|
+--avnmp.java.dp.TimeSeries
- All Implemented Interfaces:
- java.lang.Cloneable, java.util.Collection, java.util.Comparator, java.io.Serializable, java.util.Set, java.util.SortedSet
- public class TimeSeries
- extends java.util.TreeSet
- implements java.io.Serializable, java.util.Comparator
This table will hold a list of timeSeries objects used to predict
load via simple curve fit/extrapolation algorithms.
This research is funded by DARPA/ITO Contract Number:
F30602-98-C-0230 supported by the Air Force Research
Laboratory/IF.
- Version:
- $Revision: 1.1.1.1 $ $State: Exp $
- Author:
- Steve Bush
- See Also:
- Serialized Form
Constructor Summary |
TimeSeries()
Construct empty TreeSet. |
TimeSeries(java.util.Collection al)
Construct TreeSet from Collection. |
TimeSeries(java.util.SortedSet ss)
Construct TreeSet from SortedSet. |
Method Summary |
boolean |
add(java.lang.Object sa)
Add to the sorted table. |
int |
compare(java.lang.Object o1,
java.lang.Object o2)
This is required to keep the time samples sorted by time. |
void |
dropSample()
Drop the oldest sample. |
double |
nextValue(long t)
Compute the value at a given time based on the current samples. |
Methods inherited from class java.util.TreeSet |
addAll, clear, clone, comparator, contains, first, headSet, isEmpty, iterator, last, remove, size, subSet, tailSet |
Methods inherited from class java.util.AbstractSet |
equals, hashCode, removeAll |
Methods inherited from class java.util.AbstractCollection |
containsAll, retainAll, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Comparator |
equals |
Methods inherited from interface java.util.Set |
containsAll, equals, hashCode, removeAll, retainAll, toArray, toArray |
TimeSeries
public TimeSeries()
- Construct empty TreeSet.
TimeSeries
public TimeSeries(java.util.Collection al)
- Construct TreeSet from Collection.
TimeSeries
public TimeSeries(java.util.SortedSet ss)
- Construct TreeSet from SortedSet.
add
public boolean add(java.lang.Object sa)
- Add to the sorted table.
- Overrides:
add
in class java.util.TreeSet
compare
public int compare(java.lang.Object o1,
java.lang.Object o2)
- This is required to keep the time samples sorted by time.
- Specified by:
compare
in interface java.util.Comparator
nextValue
public double nextValue(long t)
- Compute the value at a given time based on the current samples.
- Parameters:
t
- The time for which we want to compute the value.- Returns:
- The next predicted value at the give time.
dropSample
public void dropSample()
- Drop the oldest sample.