Class : ComplexVector
ComplexVector :
prototype: ComplexVector ()
description:default constructor
ComplexVector :
prototype: ComplexVector (int , bool zeroFlag = false )
description:constructor for an empty real vector
input parameters:
size = Vector Dimension
zeroFlag = true if all coordinates have to be set to zero
ComplexVector :
prototype: ComplexVector (double* , double* , int size )
description:constructor from arrays of doubles
input parameters:
real = array of doubles corresponding to real part
imaginary = array of doubles corresponding to imaginary part
size = Vector Dimension
ComplexVector :
prototype: ComplexVector (const ComplexVector& , bool duplicateFlag = false )
description:copy constructor
input parameters:
vector = vector to copy
duplicateFlag = true if datas have to be duplicated
ComplexVector :
prototype: ComplexVector (const RealVector& , bool duplicateFlag = false )
description:copy constructor from a real vector
input parameters:
vector = vector to copy
duplicateFlag = true if datas have to be duplicated
~ComplexVector :
prototype: ~ComplexVector ()
description:destructor
operator = :
prototype: ComplexVector& operator = (const ComplexVector& vector )
description:assignement
input parameters:
vector = vector to assign
return value: reference on current vector
operator = :
prototype: ComplexVector& operator = (const RealVector& vector )
description:assignement from a real vector
input parameters:
vector = vector to assign
return value: reference on current vector
Resize :
prototype: void Resize (int dimension )
description:Resize vector
input parameters:
dimension = new dimension
ResizeAndClean :
prototype: void ResizeAndClean (int dimension )
description:Resize vector and set to zero all components that have been added
input parameters:
dimension = new dimension
Copy :
prototype: ComplexVector& Copy (ComplexVector& , double coefficient = 1.0 )
description:copy a vector into another
input parameters:
vector = vector to copy
coefficient = optional coefficient which multiply source to copy
return value: reference on current vector
Copy :
prototype: ComplexVector& Copy (ComplexVector& , const Complex& coefficient )
description:copy a vector into another
input parameters:
vector = vector to copy
coefficient = optional coefficient which multiply source to copy
return value: reference on current vector
EmptyClone :
prototype: Vector* EmptyClone (bool zeroFlag = false )
description:create a new vector with same size and same type but non-initialized components
input parameters:
zeroFlag = true if all coordinates have to be set to zero
return value: pointer to new vector
ClearVector :
prototype: Vector& ClearVector ()
description:put all vector components to zero
input parameters:
return value: reference on current vector
operator - :
prototype: ComplexVector& operator - ()
description:change sign of a vector
input parameters:
return value: reference on current vector
operator - :
prototype: friend ComplexVector operator - (const ComplexVector& V1 )
description:return a new vector with opposite sign form a given source vector
input parameters:
V1 = source vector
return value: new vector
operator * :
prototype: friend Complex operator * (const ComplexVector& , const ComplexVector& V2 )
description:scalar product between two vectors
input parameters:
V1 = first vector
V2 = second vector
return value: result of scalar product
operator * :
prototype: friend Complex operator * (const ComplexVector& , const RealVector& V2 )
description:scalar product between two vectors
input parameters:
V1 = first vector
V2 = second vector (real vector)
return value: result of scalar product
operator * :
prototype: friend Complex operator * (const RealVector& , const ComplexVector& V2 )
description:scalar product between two vectors
input parameters:
V1 = first vector (real vector)
V2 = second vector
return value: result of scalar product
operator += :
prototype: ComplexVector& operator += (const ComplexVector& V1 )
description:sum two vectors
input parameters:
V1 = vector to add
return value: reference on current vector
operator += :
prototype: ComplexVector& operator += (const RealVector& V1 )
description:sum two vectors
input parameters:
V1 = real vector to add
return value: reference on current vector
operator += :
prototype: Vector& operator += (const Vector& vector )
description:sum two vectors
input parameters:
vector = vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (double , const ComplexVector& V )
description:add a linear combination to a given vector
input parameters:
x = multiplicative coefficient
V = vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (double , const ComplexVector& , int , int nbrComponent )
description:add a linear combination to a given vector, for a given range of indices
input parameters:
x = multiplicative coefficient
V = vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (const Complex& , const ComplexVector& V )
description:add a linear combination to a given vector
input parameters:
x = multiplicative coefficient
V = vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (const Complex& , const ComplexVector& , int , int nbrComponent )
description:add a linear combination to a given vector, for a given range of indices
input parameters:
x = multiplicative coefficient
V = vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (double , const ComplexVector& , double ,
const ComplexVector& v2 )
description:add a linear combination of two vectors to a given vector
input parameters:
x1 = multiplicative coefficient of first vector
v1 = first vector to add
x2 = multiplicative coefficient of first vector
v2 = first vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (double , const ComplexVector& , double ,
const ComplexVector& , int , int nbrComponent )
description:add a linear combination of two vectors to a given vector, for a given range of indices
input parameters:
x1 = multiplicative coefficient of first vector
v1 = first vector to add
x2 = multiplicative coefficient of first vector
v2 = first vector to add
firstComponent = index of the first component to evaluate
nbrComponent = number of components to evaluate
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (const Complex& , const ComplexVector& , const Complex& ,
const ComplexVector& v2 )
description:add a linear combination of two vectors to a given vector
input parameters:
x1 = multiplicative coefficient of first vector
v1 = first vector to add
x2 = multiplicative coefficient of first vector
v2 = first vector to add
return value: reference on current vector
AddLinearCombination :
prototype: ComplexVector& AddLinearCombination (const Complex& , const ComplexVector& , const Complex& ,
const ComplexVector& , int , int nbrComponent )
description:add a linear combination of two vectors to a given vector, for a given range of indices
input parameters:
x1 = multiplicative coefficient of first vector
v1 = first vector to add
x2 = multiplicative coefficient of first vector
v2 = first vector to add
firstComponent = index of the first component to evaluate
nbrComponent = number of components to evaluate
return value: reference on current vector
operator -= :
prototype: ComplexVector& operator -= (const ComplexVector& V1 )
description:substract two vectors
input parameters:
V1 = first vector
return value: reference on current vector
operator -= :
prototype: ComplexVector& operator -= (const RealVector& V1 )
description:substract two vectors
input parameters:
V1 = first real vector
return value: reference on current vector
operator + :
prototype: friend ComplexVector operator + (const ComplexVector& , const ComplexVector& V2 )
description:sum two vectors
input parameters:
V1 = first vector
V2 = second vector
return value: resulting vector
operator + :
prototype: friend ComplexVector operator + (const RealVector& , const ComplexVector& V2 )
description:sum two vectors with left one real
input parameters:
V1 = first vector (real)
V2 = second vector
return value: resulting vector
operator + :
prototype: friend ComplexVector operator + (const ComplexVector& , const RealVector& V2 )
description:sum two vectors with right one real
input parameters:
V1 = first vector
V2 = second vector (real)
return value: resulting vector
operator - :
prototype: friend ComplexVector operator - (const ComplexVector& , const ComplexVector& V2 )
description:substract two vectors
input parameters:
V1 = first vector
V2 = second vector
return value: resulting vector
operator - :
prototype: friend ComplexVector operator - (const RealVector& , const ComplexVector& V2 )
description:substract two vectors with left one real
input parameters:
V1 = first vector (real)
V2 = second vector
return value: resulting vector
operator - :
prototype: friend ComplexVector operator - (const ComplexVector& , const RealVector& V2 )
description:substract two vectors with rightt one real
input parameters:
V1 = first vector
V2 = second vector (real)
return value: resulting vector
operator * :
prototype: friend ComplexVector operator * (const ComplexVector& , double d )
description:multiply a vector with a real number on the right hand side
input parameters:
V1 = vector to multiply
d = real to use
return value: resulting vector
operator * :
prototype: friend ComplexVector operator * (const ComplexVector& , const Complex& d )
description:multiply a vector with a complex number on the right hand side
input parameters:
V1 = vector to multiply
d = complex to use
return value: resulting vector
operator * :
prototype: friend ComplexVector operator * (double , const ComplexVector& V1 )
description:multiply a vector with a real number on the left hand side
input parameters:
V1 = vector to multiply
d = real to use
return value: resulting vector
operator * :
prototype: friend ComplexVector operator * (const Complex& , const ComplexVector& V1 )
description:multiply a vector with a complex number on the left hand side
input parameters:
V1 = vector to multiply
d = complex to use
return value: resulting vector
operator *= :
prototype: ComplexVector& operator *= (double d )
description:multiply a vector with a real number on the right hand side
input parameters:
d = real to use
return value: reference on current vector
operator /= :
prototype: ComplexVector& operator /= (double d )
description:divide a vector with a real number on the right hand side
input parameters:
d = real to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const Complex& d )
description:multiply a vector with a complex number on the right hand side
input parameters:
d = complex to use
return value: reference on current vector
operator /= :
prototype: ComplexVector& operator /= (const Complex& d )
description:divide a vector with a complex number on the right hand side
input parameters:
d = complex to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const RealMatrix& M )
description:left multiply a vector with a real matrix (using temporary vector)
input parameters:
M = matrix to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const ComplexMatrix& M )
description:left multiply a vector with a complex matrix (using temporary vector)
input parameters:
M = matrix to use
return value: reference on current vector
operator &= :
prototype: ComplexVector& operator &= (const ComplexMatrix& M )
description:left multiply a vector with an hermtian conjugated complex matrix (using temporary vector)
input parameters:
M = matrix to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const HermitianMatrix& M )
description:left multiply a vector with an hermitian matrix
input parameters:
M = matrix to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const ComplexTriDiagonalHermitianMatrix& M )
description:left multiply a vector with a complex tridiagonal hermitian matrix (without using temporary vector)
input parameters:
M = matrix to use
return value: reference on current vector
operator *= :
prototype: ComplexVector& operator *= (const RealTriDiagonalSymmetricMatrix& M )
description:left multiply a vector with a real tridiagonal symmetric matrix (without using temporary vector)
input parameters:
M = matrix to use
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const HermitianMatrix& , ComplexVector& V )
description:left multiply a vector with an hermitian matrix and use to store result in current vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const RealMatrix& , ComplexVector& V )
description:left multiply a vector with a real matrix and use to store result in current vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const ComplexMatrix& , ComplexVector& V )
description:left multiply a vector with a complex matrix and use to store result in current vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const Matrix& , ComplexVector& V )
description:left multiply a vector with a matrix and use to store result in current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const Matrix& , ComplexVector& V )
description:left multiply a vector with a matrix and add result to current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const Matrix& , ComplexVector& , int , int sourceNbrComponent )
description:left multiply a vector with a matrix and use to store result in current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceNbrComponent = number of component to take into account in the source vector
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const Matrix& , ComplexVector& , int , int sourceNbrComponent )
description:left multiply a vector with a matrix and add current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceNbrComponent = number of component to take into account in the source vector
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const Matrix& , ComplexVector& , int , int ,
int , int destStep )
description:left multiply a vector with a matrix and use to store result in current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceStep = step to add to go to the following source vector coordinate
destStart = destination vector first coordinate to modify
destStep = step to add to go to the following destination vector coordinate
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const Matrix& , ComplexVector& , int , int ,
int , int destStep )
description:left multiply a vector with a matrix and add current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceStep = step to add to go to the following source vector coordinate
destStart = destination vector first coordinate to modify
destStep = step to add to go to the following destination vector coordinate
return value: reference on current vector
Multiply :
prototype: ComplexVector& Multiply (const Matrix& , ComplexVector& , int , int ,
int , int , int destStep )
description:left multiply a vector with a matrix and use to store result in current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceStep = step to add to go to the following source vector coordinate
sourceNbrComponent = number of component to take into account in the source vector
destStart = destination vector first coordinate to modify
destStep = step to add to go to the following destination vector coordinate
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const Matrix& , ComplexVector& , int , int ,
int , int , int destStep )
description:left multiply a vector with a matrix and add current
vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceStep = step to add to go to the following source vector coordinate
sourceNbrComponent = number of component to take into account in the source vector
destStart = destination vector first coordinate to modify
destStep = step to add to go to the following destination vector coordinate
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const HermitianMatrix& , ComplexVector& V )
description:left multiply a vector with an hermitian matrix and add result to the current vector
input parameters:
M = matrix to use
V = vector to multiply
return value: reference on current vector
ComplexVector&Multiply :
prototype: ComplexVector&Multiply (const HermitianMatrix& , ComplexVector& , int , int sourceNbrComponent )
description:do a partial left multication of a vector with an hermitian matrix and use to store result in current vector (without creating temporary vector)
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceNbrComponent = number of component to take into account in the source vector
return value: reference on current vector
AddMultiply :
prototype: ComplexVector& AddMultiply (const HermitianMatrix& , ComplexVector& , int , int sourceNbrComponent )
description:do a partial left multication of a vector with an hermitian matrix and add result to the current vector
input parameters:
M = matrix to use
V = vector to multiply
sourceStart = source vector first coordinate to modify
sourceNbrComponent = number of component to take into account in the source vector
return value: reference on current vector
operator [] :
prototype: Complex operator [] (int i )
description:return reference on vector i-th coordinate
input parameters:
i = coordinate position
Re :
prototype: double& Re (int i )
description:return reference on real part of vector i-th coordinate
input parameters:
i = coordinate position
Im :
prototype: double& Im (int i )
description:return reference on imaginary part of vector i-th coordinate
input parameters:
i = coordinate position
Norm :
prototype: double Norm ()
description:get vector norm
input parameters:
return value: vector norm
SqrNorm :
prototype: double SqrNorm ()
description:get square of vector norm
input parameters:
return value: square of vector norm
Normalize :
prototype: ComplexVector& Normalize ()
description:normalize vector
input parameters:
return value: reference on current vector
Extract :
prototype: ComplexVector Extract (int , int , int step = 1 )
description:Extract a subvector from a given vector
input parameters:
firstCoordinate = Coordinate where extraction has to begin
lastCoordinate = Coordinate where extraction has to stop (extract also include this last coordinate)
step = distance to the next coordinate (1 means to take the folowing)
return value: return corresponding subvector
Merge :
prototype: ComplexVector& Merge (const ComplexVector& , int , int step = 1 )
description:Merge a subvector into a given vector
input parameters:
V = vector to merge
firstCoordinate = Coordinate where merge has to begin
step = distance to the next coordinate in the destination vector (1 means to take the following)
return value: reference to the current Vector
Merge :
prototype: ComplexVector& Merge (const RealVector& , int , int step = 1 )
description:Merge a real subvector into a complex given vector
input parameters:
V = real vector to merge
firstCoordinate = Coordinate where merge has to begin
step = distance to the next coordinate in the destination vector (1 means to take the following)
return value: reference to the current Vector
WriteVector :
prototype: bool WriteVector (char* fileName )
description:write vector in a file
input parameters:
fileName = name of the file where the vector has to be stored
return value: true if no error occurs
WriteAsciiVector :
prototype: bool WriteAsciiVector (char* fileName )
description:write vector in a file in ascii mode
input parameters:
fileName = name of the file where the vector has to be stored
return value: true if no error occurs
ReadVector :
prototype: bool ReadVector (char* fileName )
description:read vector from a file
input parameters:
fileName = name of the file where the vector has to be read
return value: true if no error occurs
operator << :
prototype: friend ostream& operator << (ostream& , const ComplexVector& P )
description:Output Stream overload
operator << :
prototype: friend MathematicaOutput& operator << (MathematicaOutput& , const ComplexVector& v )
description:Mathematica Output Stream overload
input parameters:
Str = reference on Mathematica output stream
v = vector to print
return value: reference on output stream
Back to index.