|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.metsci.glimpse.util.primitives.DoublesArray
public class DoublesArray
Field Summary | |
---|---|
double[] |
a
|
int |
n
|
Constructor Summary | |
---|---|
DoublesArray()
|
|
DoublesArray(double[] a)
For efficiency, does not clone the array arg. |
|
DoublesArray(double[] a,
int n)
For efficiency, does not clone the array arg. |
|
DoublesArray(Doubles xs)
Clones the sequence arg. |
|
DoublesArray(int n)
|
Method Summary | |
---|---|
void |
append(double v)
|
void |
append(double[] vs)
|
void |
append(double[] vs,
int from,
int to)
|
void |
append(java.nio.DoubleBuffer vs)
|
void |
append(java.nio.DoubleBuffer vs,
int c)
|
void |
append(Doubles vs)
|
void |
append(Doubles vs,
int from,
int to)
|
void |
compact()
|
double[] |
copyOf()
|
double[] |
copyOf(int i,
int c)
|
void |
copyTo(int i,
double[] dest,
int iDest,
int c)
|
void |
ensureCapacity(int minCapacity)
|
double |
first()
|
void |
insert(int i,
double v)
|
void |
insert(int i,
double[] vs)
|
void |
insert(int i,
double[] vs,
int from,
int to)
|
void |
insert(int i,
java.nio.DoubleBuffer vs)
|
void |
insert(int i,
java.nio.DoubleBuffer vs,
int c)
|
void |
insert(int i,
Doubles vs)
|
void |
insert(int i,
Doubles vs,
int from,
int to)
|
boolean |
isEmpty()
|
double |
last()
|
int |
n()
Length of the sequence |
static double[] |
newArray(int oldCapacity,
int minNewCapacity)
Creates a new array whose capacity is at least minNewCapacity, and at least 1.618 * oldCapacity, up to Integer.MAX_VALUE. |
void |
prepend(double v)
|
void |
prepend(double[] vs)
|
void |
prepend(double[] vs,
int from,
int to)
|
void |
prepend(java.nio.DoubleBuffer vs)
|
void |
prepend(java.nio.DoubleBuffer vs,
int c)
|
void |
prepend(Doubles vs)
|
void |
prepend(Doubles vs,
int from,
int to)
|
void |
prepForAppend(int c)
Makes room in this array for new values to be appended. |
void |
prepForInsert(int i,
int c)
Makes room in this array for new values to be inserted. |
void |
prepForPrepend(int c)
Makes room in this array for new values to be prepended. |
void |
remove(double v)
Removes a single copy of the specified value. |
void |
set(int i,
double v)
|
double |
v(int i)
Value at index i |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public double[] a
public int n
Constructor Detail |
---|
public DoublesArray(double[] a)
public DoublesArray(int n)
public DoublesArray()
public DoublesArray(double[] a, int n)
public DoublesArray(Doubles xs)
Method Detail |
---|
public double v(int i)
Doubles
v
in interface Doubles
public int n()
Doubles
n
in interface Doubles
public void copyTo(int i, double[] dest, int iDest, int c)
copyTo
in interface Doubles
public double[] copyOf(int i, int c)
copyOf
in interface Doubles
public double[] copyOf()
copyOf
in interface Doubles
public boolean isEmpty()
isEmpty
in interface Doubles
public double first()
first
in interface Doubles
public double last()
last
in interface Doubles
public void set(int i, double v)
set
in interface DoublesModifiable
public void insert(int i, double v)
insert
in interface DoublesModifiable
public void insert(int i, Doubles vs)
insert
in interface DoublesModifiable
public void insert(int i, Doubles vs, int from, int to)
insert
in interface DoublesModifiable
public void insert(int i, double[] vs)
insert
in interface DoublesModifiable
public void insert(int i, double[] vs, int from, int to)
insert
in interface DoublesModifiable
public void insert(int i, java.nio.DoubleBuffer vs)
insert
in interface DoublesModifiable
public void insert(int i, java.nio.DoubleBuffer vs, int c)
insert
in interface DoublesModifiable
public void prepForInsert(int i, int c)
this.a
on [i,i+c)
are undefined. Writing meaningful values to these indices is up to the
caller.
i
- The index at which new values will be insertedc
- The count of new values that will be insertedpublic void prepend(double v)
prepend
in interface DoublesModifiable
public void prepend(Doubles vs)
prepend
in interface DoublesModifiable
public void prepend(Doubles vs, int from, int to)
prepend
in interface DoublesModifiable
public void prepend(double[] vs)
prepend
in interface DoublesModifiable
public void prepend(double[] vs, int from, int to)
prepend
in interface DoublesModifiable
public void prepend(java.nio.DoubleBuffer vs)
prepend
in interface DoublesModifiable
public void prepend(java.nio.DoubleBuffer vs, int c)
prepend
in interface DoublesModifiable
public void prepForPrepend(int c)
this.a
on [0,c)
are undefined. Writing meaningful values to these indices is up to the
caller.
c
- The count of new values that will be insertedpublic void append(double v)
append
in interface DoublesModifiable
public void append(Doubles vs)
append
in interface DoublesModifiable
public void append(Doubles vs, int from, int to)
append
in interface DoublesModifiable
public void append(double[] vs)
append
in interface DoublesModifiable
public void append(double[] vs, int from, int to)
append
in interface DoublesModifiable
public void append(java.nio.DoubleBuffer vs)
append
in interface DoublesModifiable
public void append(java.nio.DoubleBuffer vs, int c)
append
in interface DoublesModifiable
public void prepForAppend(int c)
this.a
on [this.n-c,this.n)
are undefined. Writing meaningful values to these indices is up to the
caller.
c
- The count of new values that will be appendedpublic void remove(double v)
DoublesModifiable
remove
in interface DoublesModifiable
public void ensureCapacity(int minCapacity)
ensureCapacity
in interface DoublesModifiable
public void compact()
compact
in interface DoublesModifiable
public static double[] newArray(int oldCapacity, int minNewCapacity)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |