|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--edu.stanford.nlp.linalg.AbstractArray
Abstract Array class
| Field Summary | |
protected int |
ci
|
| Constructor Summary | |
AbstractArray()
|
|
| Method Summary | |
Array |
add(Array addend)
Returns this + addend does not change receiver. |
int |
cardinality()
Returns the number of cells having non-zero values; ignores tolerance. |
abstract Object |
clone()
Returns deep copy of Array |
int |
columnIndex()
Returns column index of column vector |
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)
return dot product of this with other
Operates on cells at indexes 0 .. |
Set |
entrySet()
Returns a set view of the Entries contained in this array. |
Array |
multiply(Array multiplicand)
returns componentwise multiply |
Array |
multiply(double multiplicand)
scalar multiply |
double |
norm()
returns 2 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 |
setAll(double value)
sets all elements = value (in sparse matrices, sets all nonzero elements = value) |
void |
setColumnIndex(int column)
setColumnIndex(ci). |
Array |
toLogSpace()
Transforms the array to log space. |
String |
toString()
Returns String representation of Array |
| 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 |
containsKey, equals, get, iterator, newInstance, set, size |
| Field Detail |
protected int ci
| Constructor Detail |
public AbstractArray()
| Method Detail |
public void setColumnIndex(int column)
setColumnIndex in interface Arraypublic int columnIndex()
Array
columnIndex in interface Arraypublic void setAll(double value)
setAll in interface Arraypublic String toString()
Array
toString in interface ArraytoString in class Objectpublic Set entrySet()
Array
entrySet in interface Arraypublic abstract Object clone()
Array
clone in interface Arrayclone in class Objectpublic Array add(Array addend)
Arraythis + addend does not change receiver.
add in interface Arraypublic Array scale(double factor)
Arraythis * factor does not change receiver.
scale in interface Arraypublic double norm()
norm in interface Arraypublic Array normalize()
Array
normalize in interface Arraypublic double dot(Array other)
this with other
Operates on cells at indexes 0 .. Math.min(size(),other.size())
dot in interface Arraypublic double distance(Array other)
Arraythis to other
distance in interface Arraypublic int cardinality()
cardinality in interface Arraypublic Array multiply(Array multiplicand)
multiply in interface Arraypublic Array divide(Array dividend)
divide in interface Arraypublic Array multiply(double multiplicand)
multiply in interface Arraypublic Array divide(double dividend)
divide in interface Arraypublic Array toLogSpace()
Array
toLogSpace in interface Array
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||