org.omegahat.Simulation.MCMC
Class MultiState

java.lang.Object
  |
  +--org.omegahat.Simulation.MCMC.MultiState
All Implemented Interfaces:
MCMCState
Direct Known Subclasses:
DetailedMultiState, MultiDoubleState

public class MultiState
extends java.lang.Object
implements MCMCState

MCMCState that can hold several individual states. Its purpose is to allow a multi-chain sampler to easily store and retrieve the states of individual chains.


Field Summary
protected  java.util.Hashtable attributes
           
protected  java.util.Vector contents
           
 
Constructor Summary
MultiState()
           
MultiState(int size)
           
MultiState(int size, java.lang.Object oneValue)
           
 
Method Summary
 void add(java.lang.Object value)
           
 java.lang.Object attr(java.lang.String name)
           
 java.lang.Object attr(java.lang.String name, java.lang.Object value)
           
 java.lang.String[] attributeNames()
           
 MultiState copy()
          creat a new MultiState object by copying the contents of this one.
 void copyTo(MultiState target)
           
 java.lang.Object get(int index)
           
 void remove(int which)
           
 void set(int index, java.lang.Object value)
           
 int size()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

contents

protected java.util.Vector contents

attributes

protected java.util.Hashtable attributes
Constructor Detail

MultiState

public MultiState(int size)

MultiState

public MultiState(int size,
                  java.lang.Object oneValue)

MultiState

public MultiState()
Method Detail

size

public int size()

get

public java.lang.Object get(int index)

set

public void set(int index,
                java.lang.Object value)

add

public void add(java.lang.Object value)

remove

public void remove(int which)

attr

public java.lang.Object attr(java.lang.String name)

attr

public java.lang.Object attr(java.lang.String name,
                             java.lang.Object value)

attributeNames

public java.lang.String[] attributeNames()

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

copy

public MultiState copy()
creat a new MultiState object by copying the contents of this one.

copyTo

public void copyTo(MultiState target)