net.sf.doodleproject.numerics4j.util
Class DoubleArray

java.lang.Object
  extended by net.sf.doodleproject.numerics4j.util.DoubleArray

public class DoubleArray
extends java.lang.Object

An expandable double array.

Since:
1.1
Version:
$Revision: 1.2 $ $Date: 2007/10/25 04:44:22 $

Constructor Summary
DoubleArray()
           
 
Method Summary
 void add(double value)
          Adds an element to the end of this expandable array.
 void clear()
          Remove all elements from this collection.
 double get(int index)
          Access the element at the given index.
 int getSize()
          Access the size of this array.
 void set(int index, double value)
          Modify the element at the given index.
 void setSize(int n)
          Modify the size of this array.
 double[] toArray()
          Convert this array into a native array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleArray

public DoubleArray()
Method Detail

add

public void add(double value)
Adds an element to the end of this expandable array.

Parameters:
value - to be added to end of array

clear

public void clear()
Remove all elements from this collection.


get

public double get(int index)
Access the element at the given index.

Parameters:
index - the index of the element to retrieve.
Returns:
the index-th element.

getSize

public int getSize()
Access the size of this array.

Returns:
the size.

set

public void set(int index,
                double value)
Modify the element at the given index. The array may be expanded to hold a value at the given index.

Parameters:
index - the index of the element to modify.
value - the new index-th element value.

setSize

public void setSize(int n)
Modify the size of this array.

Parameters:
n - the new array size.

toArray

public double[] toArray()
Convert this array into a native array.

Returns:
the native array.


Copyright 2004-2004-2007 DoodleProject. All Rights Reserved.