java.lang.Object
de.grogra.gpuflux.scene.experiment.Experiment
- 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 Summary
ConstructorDescriptionExperiment
(LongToIntHashMap nodeToGroup, Vector<? extends Measurement> measurements, Measurement zero) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoid
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 vectorgetMeasurement
(Node node) Maps an input node to a measurementgetZero()
Returns a zero measurement corresponding to this experimentvoid
mul
(float scale) Scales all measurements in the experiment by a single scale factor
-
Constructor Details
-
Experiment
public Experiment(LongToIntHashMap nodeToGroup, Vector<? extends Measurement> measurements, Measurement zero) Constructor- Parameters:
nodeToGroup
- node to group mappingmeasurements
- vector of measurements for each groupzero
- default zero measurement
-
-
Method Details
-
getMeasurement
Maps an input node to a measurement- Parameters:
node
- input node- Returns:
- returns the measurement corresponding to the input node
-
getZero
Returns a zero measurement corresponding to this experiment- Returns:
- returns the zero measurement
-
checkGroupId
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
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
-
-