com.threerings.probs
Class FloatFunctionVariable.Fixed

java.lang.Object
  extended by com.threerings.util.DeepObject
      extended by com.threerings.probs.FloatFunctionVariable
          extended by com.threerings.probs.FloatFunctionVariable.Fixed
All Implemented Interfaces:
Exportable, Copyable, Cloneable
Enclosing class:
FloatFunctionVariable

public static class FloatFunctionVariable.Fixed
extends FloatFunctionVariable

Simply returns the same function.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.probs.FloatFunctionVariable
FloatFunctionVariable.Fixed, FloatFunctionVariable.VariableConstant, FloatFunctionVariable.VariableInAndOut, FloatFunctionVariable.VariableLinear, FloatFunctionVariable.VariableMultipoint, FloatFunctionVariable.VariableThreePoint
 
Field Summary
 FloatFunction function
          The function to return.
 
Constructor Summary
FloatFunctionVariable.Fixed()
          No-arg constructor for deserialization, etc.
FloatFunctionVariable.Fixed(FloatFunction function)
          Creates a fixed variable with the specified function.
 
Method Summary
 FloatFunction getValue(FloatFunction result)
          Computes a sample value according to the variable's distribution.
 
Methods inherited from class com.threerings.util.DeepObject
clone, copy, copy, equals, hashCode, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

function

@Editable(min=-1d/0d,
          max=-1d/0d,
          step=-1d/0d,
          scale=-1d/0d)
public FloatFunction function
The function to return.

Constructor Detail

FloatFunctionVariable.Fixed

public FloatFunctionVariable.Fixed(FloatFunction function)
Creates a fixed variable with the specified function.


FloatFunctionVariable.Fixed

public FloatFunctionVariable.Fixed()
No-arg constructor for deserialization, etc.

Method Detail

getValue

public FloatFunction getValue(FloatFunction result)
Description copied from class: FloatFunctionVariable
Computes a sample value according to the variable's distribution.

Specified by:
getValue in class FloatFunctionVariable
Parameters:
result - an object to repopulate, if possible.
Returns:
either the result object, if it could be repopulated, or a new object containing the result.


Copyright © 2011. All Rights Reserved.