Implements rotgen::quaternion

Closes #19

Co-authored-by: Jules Pénuchot <jules@penuchot.com>
This commit is contained in:
Joel Falcou 2025-11-09 19:07:20 +01:00
parent aba4d65feb
commit c400650f1a
53 changed files with 995 additions and 84 deletions

View file

@ -1,10 +1,10 @@
//==================================================================================================
//==============================================================================
/*
ROTGEN - Runtime Overlay for Eigen
Copyright : CODE RECKONS
SPDX-License-Identifier: BSL-1.0
*/
//==================================================================================================
//==============================================================================
#pragma once
#include <rotgen/rotgen.hpp>
@ -59,30 +59,33 @@ namespace rotgen::tests
for (rotgen::Index c = 0; c < output.cols(); ++c) output(r, c) = fn(r, c);
}
auto default_init_function = [](auto row, auto col) {
return row + 3 * col - 2.5;
};
auto generate_matrix_references()
{
auto fn = [](auto r, auto c) { return r + 3 * c - 2.5; };
std::vector<rotgen::tests::matrix_descriptor> cases = {
// Singular matrix
{1, 1, fn},
{1, 1, default_init_function},
// Square matrix below MAX_SIZE
{3, 3, fn},
{3, 3, default_init_function},
// Square matrix at MAX_SIZE
{4, 4, fn},
{4, 4, default_init_function},
// Square matrix above MAX_SIZE
{7, 7, fn},
{7, 7, default_init_function},
// Tall matrix below MAX_SIZE
{5, 2, fn},
{5, 2, default_init_function},
// Tall matrix at MAX_SIZE
{8, 2, fn},
{8, 2, default_init_function},
// Tall matrix above MAX_SIZE
{10, 3, fn},
{10, 3, default_init_function},
// Thick matrix below MAX_SIZE
{2, 5, fn},
{2, 5, default_init_function},
// Thick matrix at MAX_SIZE
{2, 8, fn},
{2, 8, default_init_function},
// Thick matrix above MAX_SIZE
{3, 10, fn}};
{3, 10, default_init_function}};
return cases;
}