|
||||||||||
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 Array
public int columnIndex()
Array
columnIndex
in interface Array
public void setAll(double value)
setAll
in interface Array
public String toString()
Array
toString
in interface Array
toString
in class Object
public Set entrySet()
Array
entrySet
in interface Array
public abstract Object clone()
Array
clone
in interface Array
clone
in class Object
public Array add(Array addend)
Array
this + addend
does not change receiver.
add
in interface Array
public Array scale(double factor)
Array
this * factor
does not change receiver.
scale
in interface Array
public double norm()
norm
in interface Array
public Array normalize()
Array
normalize
in interface Array
public double dot(Array other)
this
with other
Operates on cells at indexes 0 .. Math.min(size(),other.size())
dot
in interface Array
public double distance(Array other)
Array
this
to other
distance
in interface Array
public int cardinality()
cardinality
in interface Array
public Array multiply(Array multiplicand)
multiply
in interface Array
public Array divide(Array dividend)
divide
in interface Array
public Array multiply(double multiplicand)
multiply
in interface Array
public Array divide(double dividend)
divide
in interface Array
public Array toLogSpace()
Array
toLogSpace
in interface Array
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |