javaslam.prob
Class Variable

java.lang.Object
  |
  +--javaslam.prob.Variable

public class Variable
extends Object

A Gaussian vector variable.


Field Summary
 int dim
          The dimension of this variable.
 Object label
          The label for this variable.
 
Constructor Summary
Variable(int dim)
          Constructor.
Variable(Object label, int dim)
          Default constructor.
 
Method Summary
static int dimension(Set vars)
          Computes the sum dimension of a set of Variables.
 boolean equals(Object o)
          Finalizes the definition of equals so that two variable references are equal iff they refer to the same object.
 int hashCode()
          Finalizes the definition of hashCode.
 String toString()
          Returns the string representation of this variable's label.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

label

public final Object label
The label for this variable.


dim

public final int dim
The dimension of this variable.

Constructor Detail

Variable

public Variable(Object label,
                int dim)
Default constructor.

Parameters:
label - an object that labels this variable. Labels are not used to determine the identity of variables; see equals.
dim - the dimension of this vector variable

Variable

public Variable(int dim)
Constructor. The variable has no label.

Parameters:
dim - the dimension of this vector variable
Method Detail

equals

public final boolean equals(Object o)
Finalizes the definition of equals so that two variable references are equal iff they refer to the same object. This notion of equality is consistent with two variables having identical labels, but being distinct. This notion of equality prevents two variable objects from referring to the same variable but having differing dimensions.

Overrides:
equals in class Object

hashCode

public final int hashCode()
Finalizes the definition of hashCode.

Overrides:
hashCode in class Object

toString

public String toString()
Returns the string representation of this variable's label.

Overrides:
toString in class Object

dimension

public static int dimension(Set vars)
Computes the sum dimension of a set of Variables.