edu.stanford.multiagent.gamer
Class DoubleTensor

java.lang.Object
  |
  +--edu.stanford.multiagent.gamer.DoubleTensor

public class DoubleTensor
extends java.lang.Object

The DoubleTensor class can be used to store matrices of any dimension.


Constructor Summary
DoubleTensor(int[] dimSize)
          Constructor
 
Method Summary
 int getNumDimensions()
           
 int[] getSizeOfDim()
           
 int getSizeOfDim(int dim)
           
 double getValue(int[] indices)
          Get the value stored at the indexed spot in the tensor
 double[] getValues()
          Probably won't use this much, but occasionally may be useful to get all values returned in one array.
 void setValue(double value, int[] indices)
          Set the value stored at the indexed spot in the tensor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleTensor

public DoubleTensor(int[] dimSize)
Constructor

Parameters:
dimSize - an array holding the size of the tensor in each dimension.
Method Detail

setValue

public void setValue(double value,
                     int[] indices)
Set the value stored at the indexed spot in the tensor


getValue

public double getValue(int[] indices)
Get the value stored at the indexed spot in the tensor


getNumDimensions

public int getNumDimensions()

getSizeOfDim

public int getSizeOfDim(int dim)

getSizeOfDim

public int[] getSizeOfDim()

getValues

public double[] getValues()
Probably won't use this much, but occasionally may be useful to get all values returned in one array.