|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectmathcomp.la.Vector
public abstract class Vector
A vector based on an index.
To access the elements use the methods get(Object i)
and set(Object i, double value).
| Constructor Summary | |
|---|---|
Vector()
|
|
| Method Summary | |
|---|---|
void |
add(java.lang.Object i,
double x)
Performs this(i) = this(i) + x. |
Vector |
add(Vector v,
Vector res)
Performs res := this + v
and returns res. |
Vector |
addScaled(Vector v,
double alpha,
Vector res)
Performs res := this + alpha*v
and returns res. |
abstract Vector |
copy()
Creates a copy of this vector. |
void |
copyFrom(Vector v)
Puts v into this, this := v. |
abstract double |
get(java.lang.Object i)
Returns the value in the row i. |
abstract Index |
getIndex()
|
double |
normL2()
Returns the $L^2$-Norm of this vector. |
double |
normMax()
Returns the max-Norm of this vector. |
Vector |
scale(double alpha,
Vector res)
Performs res := alpha*this
and returns res. |
double |
scalProd(Vector v)
Returns the scalar product of this and v. |
abstract void |
set(java.lang.Object i,
double x)
Sets the value at i to x. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Vector()
| Method Detail |
|---|
public abstract Index getIndex()
public abstract double get(java.lang.Object i)
i.
i - index of the row
i
public abstract void set(java.lang.Object i,
double x)
i to x.
i - index of the rowx - value to setpublic abstract Vector copy()
public void copyFrom(Vector v)
v into this, this := v.
v - the vector with the data. Is not changed.public double scalProd(Vector v)
v.
v - the
v
public Vector add(Vector v,
Vector res)
res := this + v
and returns res.
As long as none of the vectors are null,
there is no problem if two or three of the vectors are the same.
v - the vector to add, may be this or resres - the vector that will contain the result, may be this
or v
res := this + v
public Vector addScaled(Vector v,
double alpha,
Vector res)
res := this + alpha*v
and returns res.
As long as none of the vectors are null,
there is no problem if two or three of the vectors are the same.
v - the vector to add, may be this or resalpha - coefficient for vres - the vector that will contain the result, may be this
or v
res := this + alpha*v
public Vector scale(double alpha,
Vector res)
res := alpha*this
and returns res.
res may be this.
alpha - coefficientres - the vector that will contain the result, may be this
res := alpha * thispublic double normL2()
public double normMax()
public void add(java.lang.Object i,
double x)
this(i) = this(i) + x.
i - index of the rowx - the value to add
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||