Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.grogra.gpuflux.scene.experiment
Class Experiment

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

    public class Experiment

extends java.lang.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.
Author:
  Dietger van Antwerpen

Constructor Summary
`Experiment(LongToIntHashMap nodeToGroup, java.util.Vector<? extends Measurement> measurements, Measurement zero)` Constructor

Method Summary
`void` | `aggregate(Experiment map, float scale)` Aggregate two experiments by scaling the input experiment and adding it to this experiment.
`int` | `checkGroupId(Node node)` Maps an input node to a group index in the measurement vector
`Measurement` | `getMeasurement(Node node)` Maps an input node to a measurement
`Measurement` | `getZero()` Returns a zero measurement corresponding to this experiment
`void` | `mul(float scale)` Scales all measurements in the experiment by a single scale factor

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### Experiment

    public Experiment(LongToIntHashMap nodeToGroup,
                      java.util.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 Detail

### 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` -

### 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

### 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

### mul

    public void mul(float scale)

  Scales all measurements in the experiment by a single scale factor

  Parameters:
    `scale` - scale factor

Overview | Package | Class | Tree | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD