|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Array
Interface for dense or sparse arrays which store numbers.
Method Summary | |
---|---|
Array |
add(Array addend)
Returns this + addend does not change receiver. |
int |
cardinality()
Returns number of nonzero entries in array |
Object |
clone()
Returns deep copy of Array |
int |
columnIndex()
Returns column index of column vector |
boolean |
containsKey(int key)
Returns true if the array contains index key |
double |
distance(Array other)
Returns Euclidean distance from this to other |
Array |
divide(Array dividend)
Returns componentwise divide: this/dividend |
Array |
divide(double dividend)
Scalar divide |
double |
dot(Array other)
Returns dot product of this with other |
Set |
entrySet()
Returns a set view of the Entries contained in this array. |
boolean |
equals(Object o)
Returns true if o==this |
double |
get(int index)
Gets double value of element at index i |
Iterator |
iterator()
Returns an iterator over the entries in the matrix |
Array |
multiply(Array multiplicand)
Returns componentwise multiply |
Array |
multiply(double multiplicand)
Scalar multiply |
Array |
newInstance(int size)
Returns an empty Array of the same dynamic type with given size |
double |
norm()
Returns L2 norm of vector |
Array |
normalize()
Returns vector with euclidian distance normalized to 1. |
Array |
scale(double factor)
Returns this * factor does not change receiver. |
void |
set(int i,
double val)
Sets value of element at index i to val |
void |
setAll(double value)
Sets all elements = value
(in sparse matrices, sets all nonzero elements = value) |
void |
setColumnIndex(int ci)
Sets column index of column vector. |
int |
size()
Returns number of elements in Array |
Array |
toLogSpace()
Transforms the array to log space. |
String |
toString()
Returns String representation of Array |
Method Detail |
---|
void setColumnIndex(int ci)
int columnIndex()
void setAll(double value)
value
(in sparse matrices, sets all nonzero elements = value)
double get(int index)
void set(int i, double val)
int size()
Set entrySet()
boolean containsKey(int key)
key
Iterator iterator()
boolean equals(Object o)
o==this
equals
in class Object
String toString()
toString
in class Object
Object clone()
Array newInstance(int size)
Array add(Array addend)
this + addend
does not change receiver.
Array scale(double factor)
this * factor
does not change receiver.
double norm()
double distance(Array other)
this
to other
double dot(Array other)
this
with other
Array multiply(Array multiplicand)
Array divide(Array dividend)
Array multiply(double multiplicand)
Array divide(double dividend)
Array normalize()
int cardinality()
Array toLogSpace()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |