|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--saaps.util.TimeSeries
Field Summary | |
static int |
aveArrDptOffset
|
static int |
aveArrStdvOffset
|
static int |
aveArrTypes
Describes how many different types of data is in the average array. |
Constructor Summary | |
TimeSeries(java.util.Date[] d,
double[] m)
Create a TimeSeries object from a Date vector and a double vector. |
|
TimeSeries(java.util.Date[] d,
double[][] m,
java.lang.String[] fn,
java.lang.String[] fu)
Create the object from date array and the 2-D array. |
|
TimeSeries(java.util.Date[] d,
double[] m,
java.lang.String fn,
java.lang.String fu)
Create a TimeSeries object from a Date vector and a double vector,
and specify the data field names and units. |
|
TimeSeries(java.util.Date[] d,
Jama.Matrix m)
Create a TimeSeries object from an array of Date objects and a Matrix. |
|
TimeSeries(long st,
long et,
long si,
int nodf)
Create an empty time series object. |
|
TimeSeries(java.util.Vector dbov)
Create a TimeSeries object from a Vector of DatabaseObject:s |
|
TimeSeries(java.util.Vector dbov,
int fieldIndex)
Create a TimeSeries object from a Vector of DatabaseObjects Use only the indicated data field. |
|
TimeSeries(java.util.Vector dbov,
java.lang.String[] fn,
java.lang.String[] fu)
Create a TimeSeries object from a Vector of DatabaseObject:s |
Method Summary | |
double[] |
average(boolean ignoreNaN)
Get the average of a time series object. |
double[] |
average(java.util.Calendar date,
boolean ignoreNaN)
Gets the average of a time series object. |
TimeSeries |
averageFields()
Average over the data fields. |
TimeSeries |
dailySum()
Get the daily sum for each parameter for each day. |
TimeSeries |
extract(long st,
long et)
Extract a time period. |
Jama.Matrix |
getData()
Get the data as a Matrix object. |
double[] |
getData(int i)
Get the data for one row. |
double |
getData(int i,
int j)
Get one data element. |
java.util.Date |
getDate(int i)
Get one Date object. |
java.util.Date[] |
getDates()
Get the Date objects. |
java.lang.String[] |
getFieldNames()
Gets the field names array. |
java.lang.String[] |
getFieldUnits()
Gets the field units array. |
java.util.Date |
getLastDate()
Get the last date in the time series. |
int |
getLength()
Get the length of the TimeSeries object. |
java.lang.String |
getLongDescription()
Get the long description of the data. |
int |
getNumOfDataFields()
Get the number of data fields. |
long |
getSampleInterval()
Get the sample interval. |
java.lang.String |
getShortDescription()
Get the short description of the data. |
TimeSeries |
normalize(NormParam np)
Method to normalize the data according to a NormParam object. |
void |
setData(int i,
double[] x)
Set one row of data. |
void |
setData(int i,
int j,
double x)
Set data for observation i and data field j. |
void |
setFieldNames(java.lang.String[] fn)
Sets the field names array. |
void |
setFieldUnits(java.lang.String[] fu)
Sets the field units array. |
void |
setLongDescription(java.lang.String ld)
Set the long description of the data. |
void |
setShortDescription(java.lang.String sd)
Set the short description of the data. |
TimeSeries |
sumFields()
Sum over the data fields. |
Jama.Matrix |
timeDelay(NormParam np)
Method to create a time delay line. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int aveArrDptOffset
public static final int aveArrStdvOffset
public static final int aveArrTypes
Constructor Detail |
public TimeSeries(java.util.Date[] d, double[] m)
TimeSeries
object from a Date vector and a double vector.d
- The dates.m
- The data.public TimeSeries(java.util.Date[] d, double[] m, java.lang.String fn, java.lang.String fu)
TimeSeries
object from a Date vector and a double vector,
and specify the data field names and units.d
- The dates.m
- The data.fn
- The field name.fu
- The field unit.public TimeSeries(java.util.Date[] d, double[][] m, java.lang.String[] fn, java.lang.String[] fu)
Note: All 2-D array rows must have the same length.
d
- date arraym
- 2-D array of double data (all rows same length)fn
- field namesfu
- field unitspublic TimeSeries(java.util.Vector dbov)
dbov
- The DatabaseObject vectorpublic TimeSeries(java.util.Vector dbov, java.lang.String[] fn, java.lang.String[] fu)
dbov
- The DatabaseObject vectorfn
- Field namesfu
- Field unitspublic TimeSeries(java.util.Vector dbov, int fieldIndex) throws TimeSeriesIndexException
dbov
- The DatabaseObject vectorfieldIndex
- field number in DatabaseObject
datapublic TimeSeries(java.util.Date[] d, Jama.Matrix m)
d
- Array of Date objectm
- Matrix of data.public TimeSeries(long st, long et, long si, int nodf)
Method Detail |
public void setFieldNames(java.lang.String[] fn)
field
- namespublic void setFieldUnits(java.lang.String[] fu)
field
- unitspublic TimeSeries dailySum()
Future version should include a check that all days contain the same number of data.
public TimeSeries normalize(NormParam np)
np
- A NormParam object.public Jama.Matrix timeDelay(NormParam np)
np
- A NormParam object.public int getLength()
public java.util.Date[] getDates()
public java.util.Date getDate(int i)
public Jama.Matrix getData()
public double getData(int i, int j)
public double[] getData(int i)
public int getNumOfDataFields()
public java.lang.String getShortDescription()
public java.lang.String getLongDescription()
public java.lang.String[] getFieldNames()
public java.lang.String[] getFieldUnits()
public void setShortDescription(java.lang.String sd)
sd
- The short descriptionpublic void setLongDescription(java.lang.String ld)
ld
- The short descriptionpublic void setData(int i, double[] x)
public void setData(int i, int j, double x)
i
- The index for one observationj
- The index of the data fieldx
- The value to be setpublic double[] average(boolean ignoreNaN)
public double[] average(java.util.Calendar date, boolean ignoreNaN)
date
- centre time of data interval is returned hereignoreNaN
- if true
ignore NaN datapublic TimeSeries extract(long st, long et)
public TimeSeries sumFields()
public TimeSeries averageFields()
public java.util.Date getLastDate()
public long getSampleInterval()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |