Commit a65f806d authored by Sören Henning's avatar Sören Henning

added some documentation

parent 1f1c89a1
package teead.measurement;
import java.time.Instant;
public class AnomalyScoredMeasurement extends ForecastedMeassurement {
private double anomalyScore;
public AnomalyScoredMeasurement(final ForecastedMeassurement measurement, final double anomalyScore) {
this(measurement.getTime(), measurement.getValue(), measurement.getPrediction(), anomalyScore);
}
public AnomalyScoredMeasurement(final Instant time, final double value, final double prediction, final double anomalyScore) {
super(time, value, prediction);
this.anomalyScore = anomalyScore;
}
public double getAnomalyScore() {
return anomalyScore;
}
public void setAnomalyScore(final double anomalyScore) {
this.anomalyScore = anomalyScore;
}
}
package teead.measurement;
import java.time.Instant;
/**
* A {@link AnomalyScoredMeasurement} is a {@link ForecastedMeassurement} with
* an additional anomaly score.
*
* @author Sören Henning
*
*/
public class AnomalyScoredMeasurement extends ForecastedMeassurement {
private double anomalyScore;
public AnomalyScoredMeasurement(final ForecastedMeassurement measurement, final double anomalyScore) {
this(measurement.getTime(), measurement.getValue(), measurement.getPrediction(), anomalyScore);
}
public AnomalyScoredMeasurement(final Instant time, final double value, final double prediction, final double anomalyScore) {
super(time, value, prediction);
this.anomalyScore = anomalyScore;
}
public double getAnomalyScore() {
return anomalyScore;
}
public void setAnomalyScore(final double anomalyScore) {
this.anomalyScore = anomalyScore;
}
}
package teead.measurement;
import java.time.Instant;
public class ForecastedMeassurement extends Measurement {
private double prediction;
public ForecastedMeassurement(final Measurement measurement, final double prediction) {
this(measurement.getTime(), measurement.getValue(), prediction);
}
public ForecastedMeassurement(final Instant time, final double value, final double prediction) {
super(time, value);
this.prediction = prediction;
}
public double getPrediction() {
return prediction;
}
public void setPrediction(final double prediction) {
this.prediction = prediction;
}
}
package teead.measurement;
import java.time.Instant;
/**
* A {@link ForecastedMeassurement} is a {@link Measurement} with an additional
* predicted value.
*
* @author Sören Henning
*
*/
public class ForecastedMeassurement extends Measurement {
private double prediction;
public ForecastedMeassurement(final Measurement measurement, final double prediction) {
this(measurement.getTime(), measurement.getValue(), prediction);
}
public ForecastedMeassurement(final Instant time, final double value, final double prediction) {
super(time, value);
this.prediction = prediction;
}
public double getPrediction() {
return prediction;
}
public void setPrediction(final double prediction) {
this.prediction = prediction;
}
}
package teead.measurement;
import java.time.Instant;
public class Measurement {
private Instant time;
private double value;
public Measurement(final Instant time, final double value) {
this.time = time;
this.value = value;
}
public Instant getTime() {
return time;
}
public void setTime(final Instant time) {
this.time = time;
}
public double getValue() {
return value;
}
public void setValue(final double value) {
this.value = value;
}
}
package teead.measurement;
import java.time.Instant;
/**
* A {@link Measurement} consists of an instantaneous point on the time-line
* {@code Instant} and the measured value.
*
* @author Sören Henning
*
*/
public class Measurement {
private Instant time;
private double value;
public Measurement(final Instant time, final double value) {
this.time = time;
this.value = value;
}
public Instant getTime() {
return time;
}
public void setTime(final Instant time) {
this.time = time;
}
public double getValue() {
return value;
}
public void setValue(final double value) {
this.value = value;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment