Module gpuFlux

Class Measurement

java.lang.Object
de.grogra.gpuflux.scene.experiment.Measurement
All Implemented Interfaces:
Serializable

public class Measurement extends Object implements 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 Details

    • data

      public double[] data
      Measurement 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

      public void add(Measurement m)
      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

      public void mad(Measurement m, double scale)
      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 add
      scale - 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

      public String toString()
      Overrides:
      toString in class Object
    • isEmpty

      public boolean isEmpty()
      Returns:
      true if this measurement contains no data
    • clone

      public Object clone()
      Overrides:
      clone in class Object