Util
Class DoubleArray
java.lang.Object
|
+--Util.DoubleArray
- public class DoubleArray
- extends java.lang.Object
This class implements an array of doubles in a similar way ArrayLists are implemented.
They serve to decrease memory space (as opposed to ArrayLists) and allow functions directly
operate on doubles.
The working will further not be discussed here.
Copyright (c) 2004 Paul Vogt
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DoubleArray
public DoubleArray()
DoubleArray
public DoubleArray(DoubleArray a)
DoubleArray
public DoubleArray(double[] a)
DoubleArray
public DoubleArray(int l)
DoubleArray
public DoubleArray(int l,
double x)
get
public double get(int i)
get
public double[] get()
add
public void add(double el)
add
public void add(int i,
double el)
addAll
public void addAll(double[] el)
addAll
public void addAll(DoubleArray e)
addAll
public void addAll(int i,
double[] el)
addAll
public void addAll(int i,
DoubleArray e)
set
public void set(int i,
double el)
size
public int size()
clear
public void clear()
remove
public double[] remove(int i)
remove
public double[] remove(int from,
int to)
delete
public void delete(double el)
copy
public double[] copy()
copy
public double[] copy(int from,
int to)
indexOf
public int indexOf(double el)
contains
public boolean contains(double el)
containsElementOf
public boolean containsElementOf(double[] a)
containsElementOf
public boolean containsElementOf(DoubleArray a)
isEmpty
public boolean isEmpty()
equals
public boolean equals(double[] a)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
stringValue
public java.lang.String stringValue(double[] x)
stringValue
public java.lang.String stringValue(double[] x,
int l)
toString
public java.lang.String toString(int l)
maxValue
public double maxValue()
addUp
public void addUp(DoubleArray x)
average
public double average()
variancePop
public double variancePop(double avg)