edu.stanford.multiagent.gamer
Class LongTensor

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

public class LongTensor
extends java.lang.Object

The LongTensor class can be used to store matrices of any dimension


Constructor Summary
LongTensor(int[] dimSize)
          The constructor for a LongTensor
 
Method Summary
 int getNumDimensions()
           
 int getSizeOfDim(int dim)
           
 long getValue(int[] indices)
          Get the value stored at the indexed spot in the tensor
 long[] getValues()
          Probably won't use this much, but occasionally may be useful to get all values returned in one array.
 void setValue(long 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

LongTensor

public LongTensor(int[] dimSize)
The constructor for a LongTensor

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

setValue

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


getValue

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


getNumDimensions

public int getNumDimensions()

getSizeOfDim

public int getSizeOfDim(int dim)

getValues

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