com.threerings.probs
Class VectorVariable.Constant

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

public static class VectorVariable.Constant
extends VectorVariable

Always returns the same value.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.threerings.probs.VectorVariable
VectorVariable.Constant, VectorVariable.Uniform
 
Field Summary
 Vector3f value
          The value to return.
 
Constructor Summary
VectorVariable.Constant()
          No-arg constructor for deserialization, etc.
VectorVariable.Constant(VectorVariable variable)
          Creates a constant variable from the parameters of the other variable.
 
Method Summary
 Vector3f getMean(Vector3f result)
          Computes the mean value.
 Vector3f getValue(Vector3f 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

value

@Editable(step=-1d/0d,
          scale=-1d/0d)
public Vector3f value
The value to return.

Constructor Detail

VectorVariable.Constant

public VectorVariable.Constant(VectorVariable variable)
Creates a constant variable from the parameters of the other variable.


VectorVariable.Constant

public VectorVariable.Constant()
No-arg constructor for deserialization, etc.

Method Detail

getValue

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

Specified by:
getValue in class VectorVariable
Returns:
a reference to the result value, for chaining.

getMean

public Vector3f getMean(Vector3f result)
Description copied from class: VectorVariable
Computes the mean value.

Specified by:
getMean in class VectorVariable
Returns:
a reference to the result value, for chaining.


Copyright © 2011. All Rights Reserved.