|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsugr.linalg.VectorImplColt
Field Summary | |
protected cern.colt.matrix.DoubleMatrix1D |
impl
|
private static long |
serialVersionUID
Class version number for serialization |
Constructor Summary | |
protected |
VectorImplColt()
|
|
VectorImplColt(double[] values)
|
|
VectorImplColt(int size)
|
|
VectorImplColt(Vector v)
|
Method Summary | |
java.lang.Object |
clone()
Clone a vector. |
Vector |
copy()
Copies s into a new vector r |
Vector |
crossProduct(Vector v)
calulates the cross product: r = s x v. |
double |
get(int pos)
Gets an element from s |
Vector |
get(int i0,
int i1)
Get a part of the vector. |
int |
getDim()
Returns the dimension of s |
double |
getLength()
Calculates the length of s. |
Matrix |
getMatrix()
Creates a matrix from s This is a "kind" of typecast. |
Vector |
minus(Vector v)
Substracts to vectors: r = s-v |
Vector |
mult(double f)
Multiplication with scalar: r = a*s |
double |
normF()
Calculates the Frobenius norm of a vector, which is the same as the getLength(). |
double |
normM()
Calculates the maximum norm of a vector |
Vector |
plus(Vector v)
Add two vectors: r = s+v |
void |
print()
Prints this matrix to stdout |
void |
print(int w,
int d)
Prints this matrix to stdout Note:It may be useful to select w > d. |
void |
printMatlab()
Prints this matrix in Matlab format to stdout |
double |
scalarmult(Vector v)
scalarmultiplication (or dot product)of two vectors: a = s*v, where a is a scalar value |
void |
set(int pos,
double value)
Set an element of s |
void |
set(int pos,
Vector v)
Set a part of a vector |
Matrix |
SkewSym()
Creates a skew-symmetrix matrix from s. s must have dimension 3 to do that. |
java.lang.String |
toString()
Delivers a string with the elements of the matrix. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface sugr.linalg.Vector |
equals |
Field Detail |
private static final long serialVersionUID
protected cern.colt.matrix.DoubleMatrix1D impl
Constructor Detail |
public VectorImplColt(int size)
public VectorImplColt(double[] values)
public VectorImplColt(Vector v)
protected VectorImplColt()
Method Detail |
public Vector plus(Vector v)
Vector
plus
in interface Vector
v
- vector to add
public Vector minus(Vector v)
Vector
minus
in interface Vector
v
- vector to substract
public double scalarmult(Vector v)
Vector
scalarmult
in interface Vector
v
- vector to scalarmultiplicate
public Vector crossProduct(Vector v)
Vector
crossProduct
in interface Vector
v
- vector to create cross product with
public Vector mult(double f)
Vector
mult
in interface Vector
f
- scalar value
public Vector copy()
Vector
copy
in interface Vector
public void set(int pos, double value)
Vector
set
in interface Vector
pos
- Position to set a new value. First position is 0value
- new value to setpublic void set(int pos, Vector v)
Vector
set
in interface Vector
pos
- begining position (inclusive)v
- vector which hold the values to be set. All the values from the
vector are copied to the target.public double get(int pos)
Vector
get
in interface Vector
pos
- Position to get element from. Starts with 0
public Vector get(int i0, int i1)
Vector
get
in interface Vector
i0
- index of first vector elementi1
- index of the last vector element
public int getDim()
Vector
getDim
in interface Vector
public double getLength()
Vector
getLength
in interface Vector
public double normF()
Vector
normF
in interface Vector
public double normM()
Vector
normM
in interface Vector
public void print(int w, int d)
Vector
print
in interface Vector
w
- describes the width of a single elementd
- number of decimals after commapublic void print()
Vector
print
in interface Vector
public void printMatlab()
Vector
printMatlab
in interface Vector
public java.lang.String toString()
toString
in interface Vector
public Matrix getMatrix()
Vector
getMatrix
in interface Vector
public Matrix SkewSym()
Vector
e.g.: | a | | 0 -c b | if s = | b | , then s.Skewsym() returns | c 0 -a | | c | | -b a 0 |This matrix can be read as a cross product.
SkewSym
in interface Vector
public java.lang.Object clone()
Vector
clone
in interface Vector
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |