Package ai.libs.jaicore.ml.pdm.dataset
Class SensorTimeSeries
- java.lang.Object
-
- ai.libs.jaicore.ml.pdm.dataset.SensorTimeSeries
-
public class SensorTimeSeries extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description SensorTimeSeries()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addValue(int timestep, double value)
Adds a timestep-value pair to the this time series.boolean
equals(java.lang.Object obj)
int
getLength()
java.lang.Double
getValueOrNull(int timestep)
Returns the value of the given timestep if one exists, null otherwise.SensorTimeSeries
getWindowedTimeSeries(int fromTimestep, int toTimestep)
Returns a part of this time series starting at the givenfromTimestep
and ending at the giventoTimestep
excluding.int
hashCode()
java.lang.String
toString()
-
-
-
Method Detail
-
addValue
public void addValue(int timestep, double value)
Adds a timestep-value pair to the this time series. It is assumed that the given timestep is larger than any other before, so that at the end it holds: t_i < t_j for i < j.- Parameters:
timestep
- The timestep for which a value will be addedvalue
- The value of the timestep
-
getValueOrNull
public java.lang.Double getValueOrNull(int timestep)
Returns the value of the given timestep if one exists, null otherwise.- Parameters:
timestep
- The timestep to get the value for- Returns:
- The value of the given timestep if one exists, otherwise null.
-
getWindowedTimeSeries
public SensorTimeSeries getWindowedTimeSeries(int fromTimestep, int toTimestep)
Returns a part of this time series starting at the givenfromTimestep
and ending at the giventoTimestep
excluding.- Parameters:
fromTimestep
- The starting point of the windowtoTimestep
- The ending point of the window (exclusive)- Returns:
- A window of this
SensorTimeSeries
-
getLength
public int getLength()
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-