java.lang.Object
de.grogra.gpuflux.scene.experiment.Measurement
- All Implemented Interfaces:
Serializable
- Since:
- 2011.08.24 The Measurement class contains a vector of measurements applying to a single object or group of objects. The dimension and units for the measurements are not defined and depend on the context.
- Version:
- 1.0
- Author:
- Dietger van Antwerpen <dietger@xs4all.nl>
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstructorMeasurement
(double[] data) ConstructorMeasurement
(int length) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(Measurement m) Adds a measurement vector to this measurement.clone()
double
Returns the sum of the measurement vector elements.boolean
isEmpty()
void
mad
(Measurement m, double scale) Scaled a measurement vector and adds it to this measurement.void
mul
(double scale) Scales a measurement vector by a single factor.toString()
-
Field Details
-
data
public double[] dataMeasurement vector data
-
-
Constructor Details
-
Measurement
public Measurement(int length) Constructor- Parameters:
length
- the dimension of the measurement vector
-
Measurement
public Measurement()Constructor -
Measurement
public Measurement(double[] data) Constructor- Parameters:
data
- the measurement vector data
-
-
Method Details
-
add
Adds a measurement vector to this measurement. The measurements are assumed to have the same dimensions and units.- Parameters:
m
- measurement to add
-
mul
public void mul(double scale) Scales a measurement vector by a single factor.- Parameters:
scale
- the scaling factor
-
mad
Scaled a measurement vector and adds it to this measurement. The measurements are assumed to have the same dimensions and units.- Parameters:
m
- measurement to scall and addscale
- scale factor
-
integrate
public double integrate()Returns the sum of the measurement vector elements. All dimensions are assumed to be of the same unit.- Returns:
- sum of all vector elements
-
toString
-
isEmpty
public boolean isEmpty()- Returns:
- true if this measurement contains no data
-
clone
-