org.omegahat.Environment.DataStructures
Class BasicFactor

java.lang.Object
  |
  +--org.omegahat.Environment.ObjectDataStructures.vector
        |
        +--org.omegahat.Environment.DataStructures.BasicFactor
All Implemented Interfaces:
Addable, AssignableSubset, Divisable, MathOperable, MathOperations, Multiplicable, java.io.Serializable, Subsettable, Subtractable, VariableInt

public class BasicFactor
extends vector

See Also:
Serialized Form

Field Summary
protected  FactorLevelSet levelSet
           
 
Fields inherited from class org.omegahat.Environment.ObjectDataStructures.vector
_data, NA_PATTERN, NullObject
 
Fields inherited from interface org.omegahat.Environment.DataStructures.MathOperable
DIVIDE, MINUS, MULTIPLY, PLUS
 
Constructor Summary
BasicFactor()
           
BasicFactor(BasicFactor factor, boolean copy)
           
BasicFactor(Factor factor)
           
BasicFactor(Factor factor, boolean copy)
           
BasicFactor(int length)
           
BasicFactor(int[] values, FactorLevelSet levels, boolean copy)
           
BasicFactor(int[] values, java.util.Vector levels, boolean copy)
           
BasicFactor(integer values, java.util.Vector levels, boolean copy)
           
BasicFactor(long length)
           
BasicFactor(java.lang.Object[] values)
           
 
Method Summary
 java.lang.Object convertElement(java.lang.Object el)
           
 FactorLevelSet levelSet()
           
 FactorLevelSet levelSet(FactorLevelSet set)
           
 java.lang.Object mathOperation(java.lang.Object rhs, boolean inPlace, int op)
          General work-horse method for doing mathematical operations.
 java.lang.Class targetClass()
          The default class of each element in the list.
 java.lang.Object[] values()
           
 
Methods inherited from class org.omegahat.Environment.ObjectDataStructures.vector
add, add, addElement, addValue, apply, apply, asArray, assignElement, assignSubset, copy, createElement, createElement, createVariable, data, data, data, data, data, divide, divide, divideValue, element, elementMathOp, elementToString, exp, findMethod, getDataFrame, getName, isNA, isNA, length, length, length, mathOperation, mathOperation, metaData, minus, minus, multiply, multiply, multiplyValue, numObservations, plus, plus, read, read, separator, setDataFrame, setName, subset, subtractValue, toString, value, values, values
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

levelSet

protected FactorLevelSet levelSet
Constructor Detail

BasicFactor

public BasicFactor()

BasicFactor

public BasicFactor(int length)

BasicFactor

public BasicFactor(long length)

BasicFactor

public BasicFactor(java.lang.Object[] values)

BasicFactor

public BasicFactor(Factor factor)

BasicFactor

public BasicFactor(Factor factor,
                   boolean copy)

BasicFactor

public BasicFactor(BasicFactor factor,
                   boolean copy)

BasicFactor

public BasicFactor(integer values,
                   java.util.Vector levels,
                   boolean copy)

BasicFactor

public BasicFactor(int[] values,
                   java.util.Vector levels,
                   boolean copy)

BasicFactor

public BasicFactor(int[] values,
                   FactorLevelSet levels,
                   boolean copy)
Method Detail

mathOperation

public java.lang.Object mathOperation(java.lang.Object rhs,
                                      boolean inPlace,
                                      int op)
Description copied from class: vector
General work-horse method for doing mathematical operations. Dispatches to the appropriate method based on the class of rhs.
Overrides:
mathOperation in class vector
Following copied from class: org.omegahat.Environment.ObjectDataStructures.vector
Parameters:
rhs - right hand side of the binary operation that can be a number or another vector. Other types are currently rejected.
inPlace - whether to copy the vector and do the operations on the copy or to change the values in this instance.
op - value indicating which mathematical operation to perform. See MathOperable

targetClass

public java.lang.Class targetClass()
Description copied from class: vector
The default class of each element in the list. Used to ensure type-integrity of the array as well as for creating new elements.
Overrides:
targetClass in class vector

convertElement

public java.lang.Object convertElement(java.lang.Object el)
Overrides:
convertElement in class vector

values

public java.lang.Object[] values()

levelSet

public FactorLevelSet levelSet()

levelSet

public FactorLevelSet levelSet(FactorLevelSet set)