|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcommon.ImplicitVector
public abstract class ImplicitVector
A sequence of floating-point numbers that is in principle infinite, but in which only a finite set of entries are represented explicitly. All entries that are not represented explicitly are assumed to be zero (some of the explicit entries may be zero as well).
| Constructor Summary | |
|---|---|
ImplicitVector()
|
|
| Method Summary | |
|---|---|
double |
dotProduct(double[] arr)
Returns the dot product of this vector with the given array of double values. |
double |
dotProduct(ImplicitVector other)
Returns the dot product of this vector with the given vector. |
abstract double |
get(int i)
Returns the value at the given index. |
abstract int |
ithExplicitIndex(int i)
Returns the ith explicitly represented index in this vector. |
abstract double |
ithExplicitValue(int i)
Returns the value at the ith explicitly represented index. |
int |
maxExplicitIndex()
Returns the largest index at which a value is explicitly stored. |
abstract int |
numExplicit()
Returns the number of explicitly represented entries in this vector. |
int |
sampleIndex()
Returns an index sampled according to the probability distribution represented this by this vector. |
abstract void |
set(int i,
double value)
|
double |
sum()
Returns the sum of the entries in this vector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ImplicitVector()
| Method Detail |
|---|
public abstract double get(int i)
public abstract void set(int i,
double value)
public abstract int numExplicit()
public int maxExplicitIndex()
public abstract int ithExplicitIndex(int i)
java.lang.IndexOutOfBoundsException - if i is less than zero
or greater than or equal to the
number of explicitly represented
entries in this vectorpublic abstract double ithExplicitValue(int i)
java.lang.IndexOutOfBoundsException - if i is less than zero
or greater than or equal to the
number of explicitly represented
entries in this vectorpublic double sum()
public double dotProduct(ImplicitVector other)
public double dotProduct(double[] arr)
public int sampleIndex()
java.lang.IllegalStateException - if the sum of the probabilities is
less than 1 - Util.TOLERANCE.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||