parent
083ada097e
commit
8e80d1d083
34 changed files with 1171 additions and 416 deletions
|
|
@ -9,9 +9,9 @@
|
|||
|
||||
#include "unit/tests.hpp"
|
||||
|
||||
TTS_CASE_TPL("SVD decomposition - Dynamic case",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
TTS_CASE_TPL("SVD decomposition - Dynamic case", rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
int rank, i = 5;
|
||||
auto eps = std::numeric_limits<T>::epsilon();
|
||||
|
|
@ -24,10 +24,10 @@ TTS_CASE_TPL("SVD decomposition - Dynamic case",
|
|||
{
|
||||
rank = decomp.rank();
|
||||
|
||||
auto u = decomp.U(rank);
|
||||
auto d = decomp.singular_values(rank);
|
||||
auto dd = decomp.D(rank);
|
||||
auto v = decomp.V(rank);
|
||||
auto u = decomp.matrixU(rank);
|
||||
auto d = decomp.singularValues(rank);
|
||||
auto dd = decomp.matrixD(rank);
|
||||
auto v = decomp.matrixV(rank);
|
||||
|
||||
TTS_EQUAL(rank, i);
|
||||
|
||||
|
|
@ -48,9 +48,9 @@ TTS_CASE_TPL("SVD decomposition - Dynamic case",
|
|||
} while (rank != 1);
|
||||
};
|
||||
|
||||
TTS_CASE_TPL("SVD decomposition - Static case",
|
||||
rotgen::tests::types)<typename T, typename O>(
|
||||
tts::type<tts::types<T, O>>)
|
||||
TTS_CASE_TPL("SVD decomposition - Static case", rotgen::tests::types)
|
||||
|
||||
<typename T, typename O>(tts::type<tts::types<T, O>>)
|
||||
{
|
||||
int rank, i = 5;
|
||||
auto eps = std::numeric_limits<T>::epsilon();
|
||||
|
|
@ -62,10 +62,10 @@ TTS_CASE_TPL("SVD decomposition - Static case",
|
|||
{
|
||||
rank = decomp.rank();
|
||||
|
||||
auto u = decomp.U(rank);
|
||||
auto d = decomp.singular_values(rank);
|
||||
auto dd = decomp.D(rank);
|
||||
auto v = decomp.V(rank);
|
||||
auto u = decomp.matrixU(rank);
|
||||
auto d = decomp.singularValues(rank);
|
||||
auto dd = decomp.matrixD(rank);
|
||||
auto v = decomp.matrixV(rank);
|
||||
|
||||
TTS_EQUAL(rank, i);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue