edu.stanford.nlp.linalg
Class DenseIntArray

java.lang.Object
  |
  +--edu.stanford.nlp.linalg.AbstractArray
        |
        +--edu.stanford.nlp.linalg.DenseIntArray
All Implemented Interfaces:
Array, Cloneable

public class DenseIntArray
extends AbstractArray

Array wrapper for integer array


Field Summary
 
Fields inherited from class edu.stanford.nlp.linalg.AbstractArray
ci
 
Constructor Summary
DenseIntArray(int num_elements)
           
DenseIntArray(int[] array)
           
 
Method Summary
 Object clone()
          Returns deep copy of Array
 boolean containsKey(int key)
          Returns true if the array contains index key
 double get(int i)
          Gets double value of element at index i
 Iterator iterator()
          Returns a set view of the Entries contained in this Array.
 Array newInstance(int size)
          Returns an empty Array of the same dynamic type with given size
 void set(int i, double val)
          Sets value of element at index i to val
 void set(int i, int val)
           
 int size()
          Returns number of elements in Array
 
Methods inherited from class edu.stanford.nlp.linalg.AbstractArray
add, cardinality, columnIndex, distance, divide, divide, dot, entrySet, multiply, multiply, norm, normalize, scale, setAll, setColumnIndex, toLogSpace, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface edu.stanford.nlp.linalg.Array
equals
 

Constructor Detail

DenseIntArray

public DenseIntArray(int num_elements)

DenseIntArray

public DenseIntArray(int[] array)
Method Detail

newInstance

public Array newInstance(int size)
Description copied from interface: Array
Returns an empty Array of the same dynamic type with given size


get

public double get(int i)
Description copied from interface: Array
Gets double value of element at index i


set

public void set(int i,
                int val)

set

public void set(int i,
                double val)
Description copied from interface: Array
Sets value of element at index i to val


size

public int size()
Description copied from interface: Array
Returns number of elements in Array


containsKey

public boolean containsKey(int key)
Description copied from interface: Array
Returns true if the array contains index key


clone

public Object clone()
Description copied from interface: Array
Returns deep copy of Array

Specified by:
clone in interface Array
Specified by:
clone in class AbstractArray

iterator

public Iterator iterator()
Returns a set view of the Entries contained in this Array.



Stanford NLP Group