Module gpuFlux

Class Experiment

java.lang.Object
de.grogra.gpuflux.scene.experiment.Experiment

public class Experiment extends Object
Since:
2011.0824 The Experiment class gives a mapping from objects to measurements. An experiment represents a set of measurements for a collection of object groups. The measurement dimensions and units are undefined and depend on the context. All measurements are assumed to have the same dimensions and units.
Version:
1.0
Author:
Dietger van Antwerpen <dietger@xs4all.nl>
  • Constructor Details

    • Experiment

      public Experiment(LongToIntHashMap nodeToGroup, Vector<? extends Measurement> measurements, Measurement zero)
      Constructor
      Parameters:
      nodeToGroup - node to group mapping
      measurements - vector of measurements for each group
      zero - default zero measurement
  • Method Details

    • getMeasurement

      public Measurement getMeasurement(Node node)
      Maps an input node to a measurement
      Parameters:
      node - input node
      Returns:
      returns the measurement corresponding to the input node
    • getZero

      public Measurement getZero()
      Returns a zero measurement corresponding to this experiment
      Returns:
      returns the zero measurement
    • checkGroupId

      public int checkGroupId(Node node)
      Maps an input node to a group index in the measurement vector
      Parameters:
      node -
      Returns:
      returns the corresponding group index, or -1 if not found
    • mul

      public void mul(float scale)
      Scales all measurements in the experiment by a single scale factor
      Parameters:
      scale - scale factor
    • aggregate

      public void aggregate(Experiment map, float scale)
      Aggregate two experiments by scaling the input experiment and adding it to this experiment. All corresponding measurements in both experiments are aggregated pairwise. The experiments are assumed to apply to the same node to group mapping.
      Parameters:
      map -
      scale -