|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.umd.cloud9.example.clustering.PVector
public final class PVector
Parameter vector.
| Field Summary | |
|---|---|
double[] |
array
|
| Constructor Summary | |
|---|---|
PVector(int dim)
Class constructor. |
|
| Method Summary | |
|---|---|
PVector |
clone()
Creates and returns a copy of the instance. |
double |
dot(PVector v2)
|
static boolean |
equals(PVector v1,
PVector v2)
Verifies if two vectors are similar. |
int |
getDimension()
Returns vector's dimension. |
PVector |
minus(PVector v2)
|
double |
norm2()
Computes the Euclidean norm of the current vector \f$ v \f$. |
PVector |
plus(PVector v2)
|
static PVector |
sampleRandomDistribution(int dim)
Generates of a random vector \f$ v = (x_1, x_2, \cdots )\f$ where each component is drawn uniformly in \f$ \mathcal{U}(0,1)\f$. |
static PVector |
sampleRandomVector(int dim)
Generates of a random vector \f$ v = (x_1, x_2, \cdots )\f$ where each component is drawn uniformly in \f$ \mathcal{U}(0,1)\f$. |
PVector |
times(double lambda)
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public double[] array
| Constructor Detail |
|---|
public PVector(int dim)
dim - dimension of the vector| Method Detail |
|---|
public PVector plus(PVector v2)
public PVector minus(PVector v2)
public PVector times(double lambda)
public double dot(PVector v2)
public static PVector sampleRandomVector(int dim)
dim - dimension of the vector
public static PVector sampleRandomDistribution(int dim)
dim - dimension of the vector
public static boolean equals(PVector v1,
PVector v2)
v1 - vector \f$ v_1 \f$v2 - vector \f$ v_2 \f$
public double norm2()
public String toString()
toString in class Objectpublic PVector clone()
clone in class Objectpublic int getDimension()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||