Interfaces of the different auxiliary functions used in the ortonormalization and in the test.
Definition in file util.h.
|
typedef Array< real, Dynamic, 1 > | noise |
| Array with the different noise levels. More...
|
|
|
void | RandomQuaternion (Vector4 &e) |
| Generates a random quaternion. More...
|
|
void | Quat2Mat (Matrix3 &R, Vector4 &e) |
| Quaternion to rotation matrix. More...
|
|
void | RandomMatrix (Matrix3 &M, real noiseLevel, bool gaussian, default_random_engine &e) |
| Generates a random matrix. More...
|
|
void | TestMethod (ONMethod *method, unsigned int nRep, Matrix3 *N, double *res) |
| Test a particular orthonomalization matrix. More...
|
|
void | PrintResults (unsigned int nMethods, string *methodLabel, unsigned int nResults, string *resultLabel, unsigned int noiseTicks, noise &noiseLevel, double ***results) |
| Prints the results of the evaluation. More...
|
|
void | SaveResults (unsigned int nMethods, string *methodLabel, unsigned int nResults, string *resultLabel, bool gaussian, unsigned int noiseTicks, noise &noiseLevel, double ***results) |
| Saves the results of the evaluation. More...
|
|
◆ MeanDstE
Mean distance error goes to the first column of the result table.
Definition at line 22 of file util.h.
◆ MaxDstE
Max distance error goes to the second column of the result table.
Definition at line 29 of file util.h.
◆ MinDstE
Min distance error goes to the third column of the result table.
Definition at line 36 of file util.h.
◆ MeanOrtoE
Mean distance error goes to the fouth column of the result table.
Definition at line 43 of file util.h.
◆ MaxOrtoE
Max distance error goes to the fith column of the result table.
Definition at line 50 of file util.h.
◆ MinOrtoE
Min distance error goes to teh sixth column of the result table.
Definition at line 57 of file util.h.
◆ AverageT
Average execution time goes to the seventh column of the result table.
Definition at line 64 of file util.h.
◆ noise
Array with the different noise levels.
Definition at line 70 of file util.h.
◆ RandomQuaternion()
void RandomQuaternion |
( |
Vector4 & |
e | ) |
|
This function returns points with a uniform distribution on the surface of a 4-sphere following the algorithm described in:
- Marsaglia, G. "Choosing a Point from the Surface of a Sphere." Ann. Math. Stat. 43, 645-646, 1972.
- Parameters
-
e | The generated quaternion. |
Definition at line 19 of file util.cpp.
Referenced by main().
◆ Quat2Mat()
This function returns the rotation matrix corresponding to a set of Euler parameters.
- Parameters
-
R | The output rotation matrix. |
e | The quaternion. |
Definition at line 41 of file util.cpp.
References real.
Referenced by ApproxMethod(), CayleyMethod(), and main().
◆ RandomMatrix()
void RandomMatrix |
( |
Matrix3 & |
M, |
|
|
real |
noiseLevel, |
|
|
bool |
gaussian, |
|
|
default_random_engine & |
e |
|
) |
| |
This function returns a 3x3 matrix whose entries are random numbers uniformly distributed in the interval [-errorbound, errorbound].
- Parameters
-
M | The output noise matrix. |
noiseLevel | The width of the noise. |
gaussian | true to use Gaussian distribution. |
e | The random engine. |
Definition at line 78 of file util.cpp.
Referenced by main().
◆ TestMethod()
void TestMethod |
( |
ONMethod * |
method, |
|
|
unsigned int |
nRep, |
|
|
Matrix3 * |
N, |
|
|
double * |
res |
|
) |
| |
Test a particular orthonomalization matrix method evaluating its efficiency and its accuracy.
- Parameters
-
method | The method to evaluate. |
nRep | The number of randomly generated matrix to use in the evaluation. |
N | The (nRep) noisy matrices. |
res | The table of results ( |
- See also
- MeanDstE, MaxDstE, MinDstE, MeanOrtoE, MaxOrtoE MinOrtoE, AverageT).
Definition at line 102 of file util.cpp.
References AverageT, MaxDstE, MaxOrtoE, MeanDstE, MeanOrtoE, MinDstE, and MinOrtoE.
Referenced by main().
◆ PrintResults()
void PrintResults |
( |
unsigned int |
nMethods, |
|
|
string * |
methodLabel, |
|
|
unsigned int |
nResults, |
|
|
string * |
resultLabel, |
|
|
unsigned int |
noiseTicks, |
|
|
noise & |
noiseLevel, |
|
|
double *** |
results |
|
) |
| |
Prints the statistics collected when evaluating the methods.
- Parameters
-
nMethods | The number of methods tested. |
methodLabel | A label identifying each method. |
nResults | Number of statistics collected for each method. |
resultLabel | A label identifying each statistic. |
noiseTicks | The number of ticks in the noise scale. |
noiseLevel | The level of noise for each tick. |
results | The table with all the results. This includes the statistics for each method and noise tick. |
Definition at line 145 of file util.cpp.
Referenced by main().
◆ SaveResults()
void SaveResults |
( |
unsigned int |
nMethods, |
|
|
string * |
methodLabel, |
|
|
unsigned int |
nResults, |
|
|
string * |
resultLabel, |
|
|
bool |
gaussian, |
|
|
unsigned int |
noiseTicks, |
|
|
noise & |
noiseLevel, |
|
|
double *** |
results |
|
) |
| |
Saves the statistics collected when evaluating the methods to a file. The name of the file is generated using the methodLabel parameter (one separate file is generated for each method).
The files are stored in the 'results' folder with extension csv.
- Parameters
-
nMethods | The number of methods tested. |
methodLabel | A label identifying each method. |
nResults | Number of statistics collected for each method. |
resultLabel | A label identifying each statistic. |
gaussian | true if we used Gaussian distributions for the noise. |
noiseTicks | The number of ticks in the noise scale. |
noiseLevel | The level of noise for each tick. |
results | The table with all the results. This includes the statistics for each method and noise tick. |
Definition at line 186 of file util.cpp.
References AverageT.
Referenced by main().
|
Follow us!