|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugr.test.RandomVector
Generate normally distributed random vectors from a given covariance matrix. This is done in the following way to support a covariance matrix with covariances Given: covariance matrix of vector v 1) Cholesky decomposition: sigma=A*At 2) Singular value decomposition from A : A=U*S*Vt ==> sigma=U*S^2*Ut 3) Error propagation: Use random generator to get a random vector y with y1sigma, y2sigma, ... (of course without covariances !) Then v=U*y has covariance matrix sigma. This class uses Jama for Cholesky decomposition directly.
Constructor Summary | |
RandomVector(Matrix sigma)
Initialize random generation with a given covariance. |
|
RandomVector(Vector v,
Matrix sigma)
Initialize random generation with a given covariance and vector. |
Method Summary | |
Vector |
getNextRandom()
Get next random vector. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RandomVector(Matrix sigma)
sigma
- covariance matrix of the random vectorpublic RandomVector(Vector v, Matrix sigma)
v
- the mean value.sigma
- covariance matrix of the random vectorMethod Detail |
public Vector getNextRandom()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |