|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.mathematics.algebraic.AbstractHypermatrix
org.jscience.mathematics.algebraic.AbstractMatrix
org.jscience.mathematics.algebraic.AbstractVector
org.jscience.mathematics.algebraic.matrices.AbstractComplexVector
public abstract class AbstractComplexVector
The AbstractComplexVector class encapsulates vectors containing complex numbers.
| Constructor Summary | |
|---|---|
protected |
AbstractComplexVector(int dim)
Creates a new AbstractComplexVector object. |
| Method Summary | |
|---|---|
AbstractDoubleVector |
abs()
Applies the abs function on all the vector components. |
AbstractComplexVector |
add(AbstractComplexVector v)
Returns the addition of this vector and another. |
AbstractComplexVector |
conjugate()
Returns the complex conjugate of this vector. |
boolean |
equals(java.lang.Object obj)
Compares two Complex vectors for equality. |
boolean |
equals(java.lang.Object obj,
double tol)
|
AbstractComplexVector |
getColumn(int j)
Returns the ith column. |
Complex |
getElement(int n)
Returns an element of this vector. |
double |
getImagElement(int i)
Returns the imag part of an element of the matrix. |
abstract Complex |
getPrimitiveElement(int n)
Returns an element of this vector. |
double |
getRealElement(int i)
Returns the real part of an element of the matrix. |
AbstractComplexVector |
getRow(int i)
Returns the ith row. |
AbstractComplexVector |
getSubVector(int k1,
int k2)
Computes a sub vector from the parameters index. |
int |
hashCode()
Returns a hashcode for this NON EMPTY vector. |
AbstractDoubleVector |
imag()
Returns the imaginary part of this complex vector. |
double |
infNorm()
Returns the l -norm. |
AbstractComplexVector |
mapElements(ComplexMapping f)
Applies a function on all the vector components. |
Complex |
mass()
Returns the mass. |
Ring.Member |
multiply(Ring.Member r)
DOCUMENT ME! |
double |
norm()
Returns the l2-norm (magnitude). |
void |
normalize()
Makes the norm of this vector equal to one. |
static AbstractComplexVector |
read(java.io.BufferedReader input)
Read a vector from a stream. |
AbstractDoubleVector |
real()
Returns the real part of this complex vector. |
AbstractComplexVector |
reverse()
Invert vector elements order from the last to the first. |
AbstractComplexVector |
scalarDivide(Complex z)
Returns the division of this vector by a scalar. |
AbstractComplexVector |
scalarDivide(double x)
Returns the division of this vector by a scalar. |
AbstractComplexVector |
scalarMultiply(Complex z)
Returns the multiplication of this vector by a scalar. |
AbstractComplexVector |
scalarMultiply(double x)
Returns the multiplication of this vector by a scalar. |
Complex |
scalarProduct(AbstractComplexVector v)
Returns the scalar product of this vector and another. |
void |
setAllElements(Complex r)
Sets the value of all elements of the vector. |
void |
setColumn(int j,
AbstractComplexVector v)
Returns the ith column. |
abstract void |
setElement(int n,
Complex z)
Sets the value of an element of this vector. |
void |
setElement(int n,
double x,
double y)
Sets the value of an element of this vector. |
void |
setRow(int i,
AbstractComplexVector v)
Returns the ith row. |
AbstractComplexVector |
setSubVector(int k,
AbstractComplexVector v)
Set a sub vector. |
AbstractComplexVector |
subtract(AbstractComplexVector v)
Returns the subtraction of this vector by another. |
ComplexMatrix |
tensorProduct(AbstractComplexVector v)
Returns the tensor product of this vector and another. |
Matrix |
toMatrix()
Projects the vector to the corresponding (n, 1) matrix class. |
Complex[] |
toPrimitiveArray()
Projects the vector to an array. |
java.lang.String |
toString()
Returns a comma delimited string representing the value of this vector. |
Matrix |
transpose()
DOCUMENT ME! |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractVector |
|---|
getDimension, getElement, getInvalidElementMsg, toArray, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractMatrix |
|---|
getElement, getInvalidElementMsg, numColumns, numRows, print, print, print, print, toArray |
| Methods inherited from class org.jscience.mathematics.algebraic.AbstractHypermatrix |
|---|
getDimensions, numDimensions, numElements, numElements, toArray |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.jscience.mathematics.algebraic.algebras.HilbertSpace.Member |
|---|
scalarProduct |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.VectorSpace.Member |
|---|
scalarDivide |
| Methods inherited from interface org.jscience.mathematics.algebraic.modules.Module.Member |
|---|
scalarMultiply |
| Methods inherited from interface org.jscience.mathematics.algebraic.groups.AbelianGroup.Member |
|---|
add, negate, subtract |
| Methods inherited from interface org.jscience.mathematics.algebraic.Matrix |
|---|
numColumns, numRows, toArray |
| Methods inherited from interface org.jscience.mathematics.algebraic.Hypermatrix |
|---|
getDimensions, getElement, numDimensions, numElements, numElements, toArray |
| Constructor Detail |
|---|
protected AbstractComplexVector(int dim)
dim - DOCUMENT ME!| Method Detail |
|---|
public java.lang.String toString()
toString in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic AbstractDoubleVector real()
public AbstractDoubleVector imag()
public Complex getElement(int n)
getElement in interface VectorgetElement in class AbstractVectorn - index of the vector element
public double getRealElement(int i)
i - row index of the element
IllegalDimensionException - If attempting to access an invalid element.public double getImagElement(int i)
i - row index of the element
IllegalDimensionException - If attempting to access an invalid element.public abstract Complex getPrimitiveElement(int n)
n - index of the vector element
public AbstractComplexVector getRow(int i)
getRow in interface Matrixi - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!public AbstractComplexVector getColumn(int j)
getColumn in interface Matrixj - DOCUMENT ME!
IllegalDimensionException - DOCUMENT ME!
public void setRow(int i,
AbstractComplexVector v)
public void setColumn(int j,
AbstractComplexVector v)
public abstract void setElement(int n,
Complex z)
n - index of the vector elementz - a complex number
public void setElement(int n,
double x,
double y)
n - index of the vector elementx - the real part of a complex numbery - the imaginary part of a complex numberpublic void setAllElements(Complex r)
r - a ring elementpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectobj - a Complex vector
public boolean equals(java.lang.Object obj,
double tol)
public Complex mass()
public double norm()
norm in interface BanachSpace.Memberpublic void normalize()
public double infNorm()
-norm.
public AbstractDoubleVector abs()
public Matrix transpose()
transpose in interface Matrixpublic Ring.Member multiply(Ring.Member r)
multiply in interface Ring.Memberr - DOCUMENT ME!
public AbstractComplexVector conjugate()
public AbstractComplexVector add(AbstractComplexVector v)
v - a complex vector
public AbstractComplexVector subtract(AbstractComplexVector v)
v - a complex vector
public AbstractComplexVector scalarMultiply(Complex z)
z - a complex number
public AbstractComplexVector scalarMultiply(double x)
x - a double
public AbstractComplexVector scalarDivide(Complex z)
z - a complex number
public AbstractComplexVector scalarDivide(double x)
x - a double
public Complex scalarProduct(AbstractComplexVector v)
v - a complex vector
public ComplexMatrix tensorProduct(AbstractComplexVector v)
v - DOCUMENT ME!
public AbstractComplexVector reverse()
public AbstractComplexVector getSubVector(int k1,
int k2)
k1 - the beginning indexk2 - the finishing index
public AbstractComplexVector setSubVector(int k,
AbstractComplexVector v)
k - Initial row index to offset the patching vectorv - the patching vectorpublic AbstractComplexVector mapElements(ComplexMapping f)
f - a user-defined function
public Complex[] toPrimitiveArray()
public Matrix toMatrix()
public static AbstractComplexVector read(java.io.BufferedReader input)
throws java.io.IOException
input - the input stream.
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||