|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object marf.math.Matrix marf.math.ComplexMatrix marf.math.ComplexVector
public class ComplexVector
Algebraic operations on ComplexVectors.
NOTE: this class has the same considerations as
marf.math.ComplexMatrix
.
$Id: ComplexVector.java,v 1.3 2007/12/18 03:45:42 mokhov Exp $
ComplexMatrix
,
Serialized FormNested Class Summary |
---|
Nested classes/interfaces inherited from class marf.math.Matrix |
---|
Matrix.Direction |
Field Summary | |
---|---|
static int |
DEFAULT_VECTOR_LENGTH
Default ComplexVector's length is 3 elements. |
Fields inherited from class marf.math.ComplexMatrix |
---|
adImaginaryMatrix |
Fields inherited from class marf.math.Matrix |
---|
adMatrix, DEFAULT_COLS, DEFAULT_ERROR_DELTA, DEFAULT_ROWS, iCols, iRows |
Constructor Summary | |
---|---|
ComplexVector()
Constructs a ComplexVector of default length of 3. |
|
ComplexVector(ComplexVector poComplexVector)
Constructs a ComplexVector from another ComplexVector; a-la copy conctructor. |
|
ComplexVector(double[] padComplexVectorData)
Constructs a ComplexVector out of a raw array of doubles. |
|
ComplexVector(double[] pad1DMatrix,
boolean pbTransposed)
Allows having a transposed ComplexVector upon construction. |
|
ComplexVector(int piComplexVectorLength)
Constructs a ComplexVector with the specified length. |
|
ComplexVector(Matrix poMatrix)
Constructs a ComplexVector out of a matrix and forces the rows dimension to 1 and "flattens" the matrix to have the number of columns as the same number of elements in the original matrix. |
Method Summary | |
---|---|
ComplexVector |
add(ComplexVector poComplexVector)
V1 = this + V. |
static ComplexVector |
add(ComplexVector poLHSComplexVector,
ComplexVector poRHSComplexVector)
V3 = V1 + V2. |
java.lang.Object |
clone()
Implements Clonable interface. |
ComplexNumber |
getComplexElement(int piPosition)
|
static ComplexVector |
getCrossProduct(ComplexVector poLHSComplexVector,
ComplexVector poRHSComplexVector)
Calculates the cross product of two ComplexVectors, V3 = V1 x V2. |
static double |
getDotProduct(ComplexVector poLHSComplexVector,
ComplexVector poRHSComplexVector)
Calculates the dot product of two ComplexVectors, d = V1 * V2. |
double |
getElement(int piPosition)
Allows getting the value of ComplexVector's element at specified position. |
static ComplexVector |
getInnerProduct(ComplexVector poLHSComplexVector,
ComplexVector poRHSComplexVector)
Calculates an inner product of two ComplexVectors, V3 = V1 * V2. |
double |
getLength()
Retrieves the mathematical length of the ComplexVector. |
static java.lang.String |
getMARFSourceCodeRevision()
Retrieves class' revision. |
ComplexVector |
getUnitComplexVector()
Returns a unit-ComplexVector representation of this ComplexVector. |
static ComplexVector |
i()
Creates a unit-ComplexVector "i". |
boolean |
isOrthogonal(ComplexVector poComplexVector)
Tells whether this and the parameter ComplexVectors are orthogonal or not. |
static ComplexVector |
j()
Creates a unit-ComplexVector "j". |
static ComplexVector |
k()
Creates a unit-ComplexVector "k". |
void |
normalize()
Normalizes the ComplexVector's components by its length. |
void |
setElement(int piPosition,
double pdValue)
Allows setting the value of ComplexVector's element at specified position. |
Methods inherited from class marf.math.ComplexMatrix |
---|
add, add, add, add, add, add, applyAdd, applyMinus, applyMultiply, applyMultiply, crop, divide, divide, divide, divide, divide, equals, exhaustMatrix, extend, getComplexColumn, getComplexDeterminant, getComplexElement, getComplexMatrix, getComplexNumber, getComplexRow, getImaginaryMatrixArray, getMatrix2D, getNewMatrix, getNewMatrix, getRealMatrixArray, inverse, isReduced, loadColumn, loadRow, makeIdentity, minus, minus, minus, minus, minus, minus, multiply, multiply, multiply, multiply, multiply, multiply, multiply, multiply, pow, powComplex, rotate, rotate, rotate, rowOperation, rowReduce, scale, scale, scale, setAll, setAll, setAllRandom, setComplexElement, setComplexNumber, setImaginaryMatrixArray, setMatrix2D, setRealMatrixArray, shear, shear, shear, toString, translate, translate, translate, transpose |
Methods inherited from class marf.math.Matrix |
---|
add, add, add, crop, cutColumn, cutFirstColumn, cutFirstRow, cutLastColumn, cutLastRow, cutRow, display, divide, divide, equals, equals, extend, extend, getCols, getColumn, getDeterminant, getElement, getElements, getMatrixArray, getRow, getRows, isIdentity, isNearlyIdentity, isNearlyIdentity, loadColumn, loadRow, minus, minus, minusUnary, multiply, multiply, multiply, multiply, multiply, multiply, pow, pow, rowOperation, rowOperation, setAll, setCols, setElement, setMatrix2D, setMatrixArray, setRows, size |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_VECTOR_LENGTH
Constructor Detail |
---|
public ComplexVector()
public ComplexVector(int piComplexVectorLength)
piComplexVectorLength
- require ComplexVector lengthpublic ComplexVector(ComplexVector poComplexVector)
poComplexVector
- a ComplexVector to make a copy ofpublic ComplexVector(Matrix poMatrix)
poMatrix
- base matrix to construct the ComplexVector frompublic ComplexVector(double[] padComplexVectorData)
padComplexVectorData
- source data for the ComplexVectorpublic ComplexVector(double[] pad1DMatrix, boolean pbTransposed)
pad1DMatrix
- ComplexVector datapbTransposed
- true
if the transposed ComplexVector is desiredMethod Detail |
---|
public final double getElement(int piPosition)
piPosition
- index to get the element from
public final ComplexNumber getComplexElement(int piPosition)
piPosition
-
public void setElement(int piPosition, double pdValue)
piPosition
- index to det the element atpdValue
- the element's valuepublic double getLength()
public ComplexVector add(ComplexVector poComplexVector)
poComplexVector
- V
public static ComplexVector add(ComplexVector poLHSComplexVector, ComplexVector poRHSComplexVector)
poLHSComplexVector
- V1poRHSComplexVector
- V2
public final ComplexVector getUnitComplexVector()
public static ComplexVector getInnerProduct(ComplexVector poLHSComplexVector, ComplexVector poRHSComplexVector)
poLHSComplexVector
- first ComplexVector, V1poRHSComplexVector
- second ComplexVector, V2
public static ComplexVector getCrossProduct(ComplexVector poLHSComplexVector, ComplexVector poRHSComplexVector)
poLHSComplexVector
- first ComplexVector, V1poRHSComplexVector
- second ComplexVector, V2
public static double getDotProduct(ComplexVector poLHSComplexVector, ComplexVector poRHSComplexVector)
poLHSComplexVector
- first ComplexVector, V1poRHSComplexVector
- second ComplexVector, V2
public boolean isOrthogonal(ComplexVector poComplexVector)
poComplexVector
- another ComplexVector to compare to
true
if the ComplexVectors are orthogonalpublic void normalize()
public static final ComplexVector i()
public static final ComplexVector j()
public static final ComplexVector k()
public java.lang.Object clone()
clone
in class ComplexMatrix
Object.clone()
public static java.lang.String getMARFSourceCodeRevision()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |