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 voidaddValue(int timestep, double value)Adds a timestep-value pair to the this time series.booleanequals(java.lang.Object obj)intgetLength()java.lang.DoublegetValueOrNull(int timestep)Returns the value of the given timestep if one exists, null otherwise.SensorTimeSeriesgetWindowedTimeSeries(int fromTimestep, int toTimestep)Returns a part of this time series starting at the givenfromTimestepand ending at the giventoTimestepexcluding.inthashCode()java.lang.StringtoString()
-
-
-
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 givenfromTimestepand ending at the giventoTimestepexcluding.- 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:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-