IGLib  1.7.2
The IGLib base library EXTENDED - with other lilbraries and applications.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
IG.Test.TestVectorOperations Class Reference

Unit tests for vector operations. More...

Public Member Functions

void AccessOutOfRangeVector1 ()
 
void AccessOutOfRangeVector2 ()
 
void OrthogonalizationGramSchmidtRobustD7 ()
 Tests robust Gramm-Schmidt orthogonalization. The number of original vectors is smaller than the number of requested resulting vectors. More...
 
void OrthogonalizationGramSchmidtNormalizedUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNormalizedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustNormalizedUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustNormalizedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 
void AccessOutOfRangeVector1 ()
 
void AccessOutOfRangeVector2 ()
 
void OrthogonalizationGramSchmidtRobustD7 ()
 Tests robust Gramm-Schmidt orthogonalization. The number of original vectors is smaller than the number of requested resulting vectors. More...
 
void OrthogonalizationGramSchmidtNormalizedUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNormalizedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustNormalizedUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustNormalizedD5 ()
 Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustUnmodifiedD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 
void OrthogonalizationGramSchmidtNonRobustD5 ()
 Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors. More...
 

Static Public Member Functions

static bool TestGramSchmidtOrthogonalization (int dim, out double maxErrorMixed, out double maxErrorDiagonal, int numRepetitions=1, double tol=1e-8, int outputLevel=0, IRandomGenerator randomGenerator=null, bool normalize=false, bool modifiedGrammSchmidt=true, bool nonRobust=false)
 Performs a test of Gramm-Schmidt orthogonalization on a set of random vectors. More...
 
static bool TestGramSchmidtOrthogonalization (int dim, out double maxErrorMixed, out double maxErrorDiagonal, int numRepetitions=1, double tol=1e-8, int outputLevel=0, IRandomGenerator randomGenerator=null, bool normalize=false, bool modifiedGrammSchmidt=true, bool nonRobust=false)
 Performs a test of Gramm-Schmidt orthogonalization on a set of random vectors. More...
 

Detailed Description

Unit tests for vector operations.

$A Igor May09 Dec14;

Member Function Documentation

void IG.Test.TestVectorOperations.AccessOutOfRangeVector1 ( )
inline
void IG.Test.TestVectorOperations.AccessOutOfRangeVector2 ( )
inline
void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtRobustD7 ( )
inline

Tests robust Gramm-Schmidt orthogonalization. The number of original vectors is smaller than the number of requested resulting vectors.

References IG.Num.VectorBase.Add(), IG.Num.VectorBase.Copy(), IG.Num.IVector.GetCopy(), IG.Num.VectorBase.Multiply(), IG.Num.VectorBase.Norm2Plain(), IG.Num.VectorBase.OrthogonalizeGramSchmidt(), IG.Num.VectorBase.ScalarProduct(), and IG.Num.VectorBase.SetRandom().

static bool IG.Test.TestVectorOperations.TestGramSchmidtOrthogonalization ( int  dim,
out double  maxErrorMixed,
out double  maxErrorDiagonal,
int  numRepetitions = 1,
double  tol = 1e-8,
int  outputLevel = 0,
IRandomGenerator  randomGenerator = null,
bool  normalize = false,
bool  modifiedGrammSchmidt = true,
bool  nonRobust = false 
)
inlinestatic

Performs a test of Gramm-Schmidt orthogonalization on a set of random vectors.

Parameters
dimdimension of vectors to be orthogonalized.
maxErrorDiagonalMaximal absolute inner product of two resulting vectors that are not the same.
maxErrorMixedMaximal absolute value of difference between 1 and dot product of an resulting vector by itself.
numRepetitionsNomber of repetitions (how many times the procedure is repeated).
tolTolerance for zero length of resulting vectors.
outputLevelLevel of output.
randomGeneratorRandom generator used.
normalizeWhether resulting vectors are normalized.
modifiedGrammSchmidtWhether a modified gramm-schmidt algorithm is used.
Returns
True if the test has passed, false otherwise.

References IG.Num.VectorBase.Add(), IG.Lib.StopWatch1.CpuTime, IG.Num.RandomGenerator.Global, IG.Num.VectorBase.OrthogonalizeGramSchmidt(), IG.Num.VectorBase.OrthogonalizeGramSchmidtNonRobust(), IG.Num.Vector.Random(), IG.Num.VectorBase.ScalarProduct(), IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), IG.Lib.StopWatch1.Time, and IG.Num.VectorBase.ToStringMath().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNormalizedUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNormalizedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustNormalizedUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

Nonrobust method is used, which fails if the dimension of space spanned by the provided original vector is less than the number of these vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustNormalizedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

void IG.Test.TestVectorOperations.AccessOutOfRangeVector1 ( )
inline
void IG.Test.TestVectorOperations.AccessOutOfRangeVector2 ( )
inline
void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtRobustD7 ( )
inline
static bool IG.Test.TestVectorOperations.TestGramSchmidtOrthogonalization ( int  dim,
out double  maxErrorMixed,
out double  maxErrorDiagonal,
int  numRepetitions = 1,
double  tol = 1e-8,
int  outputLevel = 0,
IRandomGenerator  randomGenerator = null,
bool  normalize = false,
bool  modifiedGrammSchmidt = true,
bool  nonRobust = false 
)
inlinestatic

Performs a test of Gramm-Schmidt orthogonalization on a set of random vectors.

Parameters
dimdimension of vectors to be orthogonalized.
maxErrorDiagonalMaximal absolute inner product of two resulting vectors that are not the same.
maxErrorMixedMaximal absolute value of difference between 1 and dot product of an resulting vector by itself.
numRepetitionsNomber of repetitions (how many times the procedure is repeated).
tolTolerance for zero length of resulting vectors.
outputLevelLevel of output.
randomGeneratorRandom generator used.
normalizeWhether resulting vectors are normalized.
modifiedGrammSchmidtWhether a modified gramm-schmidt algorithm is used.
Returns
True if the test has passed, false otherwise.

References IG.Num.VectorBase.Add(), IG.Lib.StopWatch1.CpuTime, IG.Num.RandomGenerator.Global, IG.Num.VectorBase.OrthogonalizeGramSchmidt(), IG.Num.VectorBase.OrthogonalizeGramSchmidtNonRobust(), IG.Num.Vector.Random(), IG.Num.VectorBase.ScalarProduct(), IG.Lib.StopWatch1.Start(), IG.Lib.StopWatch1.Stop(), IG.Lib.StopWatch1.Time, and IG.Num.VectorBase.ToStringMath().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNormalizedUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNormalizedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustNormalizedUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors.

Nonrobust method is used, which fails if the dimension of space spanned by the provided original vector is less than the number of these vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustNormalizedD5 ( )
inline

Gramm-Schmidt orthogonalization, normalized vectors, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustUnmodifiedD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, unmodified (less stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

References NUnit.Framework.Assert.IsTrue().

void IG.Test.TestVectorOperations.OrthogonalizationGramSchmidtNonRobustD5 ( )
inline

Gramm-Schmidt orthogonalization, vectors are not normalized, modified (more stable) procedure. Tested on 5 dimensional randomly generated vectors. vector is less than the number of these vectors.

References NUnit.Framework.Assert.IsTrue().


The documentation for this class was generated from the following file: