Implement fixed size options for rotgen containers
See merge request oss/rotgen!11
This commit is contained in:
parent
8e545dd51a
commit
2084874b1b
39 changed files with 1247 additions and 323 deletions
|
|
@ -6,7 +6,7 @@
|
|||
*/
|
||||
//==================================================================================================
|
||||
#include "unit/tests.hpp"
|
||||
#include <rotgen/matrix.hpp>
|
||||
#include <rotgen/rotgen.hpp>
|
||||
#include <Eigen/Dense>
|
||||
|
||||
TTS_CASE_TPL("Matrix norm-related operations", rotgen::tests::types)
|
||||
|
|
@ -30,9 +30,9 @@ TTS_CASE_TPL("Matrix norm-related operations", rotgen::tests::types)
|
|||
rotgen::matrix<T,rotgen::Dynamic,rotgen::Dynamic,O::value> matrix(rows, cols);
|
||||
Eigen::Matrix<T, Eigen::Dynamic, Eigen::Dynamic,O::value> ref(rows, cols);
|
||||
|
||||
for (std::size_t r = 0; r < rows; ++r)
|
||||
for (rotgen::Index r = 0; r < rows; ++r)
|
||||
{
|
||||
for (std::size_t c = 0; c < cols; ++c)
|
||||
for (rotgen::Index c = 0; c < cols; ++c)
|
||||
{
|
||||
ref(r, c) = matrix(r, c) = fn(r,c);
|
||||
}
|
||||
|
|
@ -40,8 +40,8 @@ TTS_CASE_TPL("Matrix norm-related operations", rotgen::tests::types)
|
|||
|
||||
TTS_EQUAL(matrix.norm(), ref.norm());
|
||||
TTS_EQUAL(matrix.squaredNorm(), ref.squaredNorm());
|
||||
TTS_EQUAL(matrix.template lp_norm<1>() , ref.template lpNorm<1>());
|
||||
TTS_EQUAL(matrix.template lp_norm<2>() , ref.template lpNorm<2>());
|
||||
TTS_EQUAL(matrix.template lp_norm<rotgen::Infinity>(), ref.template lpNorm<Eigen::Infinity>());
|
||||
TTS_EQUAL(matrix.template lpNorm<1>() , ref.template lpNorm<1>());
|
||||
TTS_EQUAL(matrix.template lpNorm<2>() , ref.template lpNorm<2>());
|
||||
TTS_EQUAL(matrix.template lpNorm<rotgen::Infinity>(), ref.template lpNorm<Eigen::Infinity>());
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue