Testing functional API only (oss/rotgen#17)

Co-authored-by: Jules Pénuchot <jules@penuchot.com>

See merge request oss/rotgen!42
This commit is contained in:
Jules Pénuchot 2025-10-17 17:20:47 +02:00
parent 6fa95fb22d
commit 4a7aa08cdb
11 changed files with 192 additions and 192 deletions

View file

@ -218,17 +218,20 @@ namespace rotgen
//-----------------------------------------------------------------------------------------------
// Reductions
//-----------------------------------------------------------------------------------------------
auto trace(concepts::entity auto const& arg)
auto trace(auto const& arg)
requires requires { arg.trace(); }
{
return arg.trace();
}
auto squaredNorm(concepts::entity auto const& arg)
auto squaredNorm(auto const& arg)
requires requires { arg.squaredNorm(); }
{
return arg.squaredNorm();
}
auto norm(concepts::entity auto const& arg)
auto norm(auto const& arg)
requires requires { arg.norm(); }
{
return arg.norm();
}
@ -239,12 +242,14 @@ namespace rotgen
return arg.sum();
}
auto prod(concepts::entity auto const& arg)
auto prod(auto const& arg)
requires requires { arg.prod(); }
{
return arg.prod();
}
auto mean(concepts::entity auto const& arg)
auto mean(auto const& arg)
requires requires { arg.mean(); }
{
return arg.mean();
}
@ -272,17 +277,15 @@ namespace rotgen
}
template<std::integral IndexType>
auto maxCoeff(concepts::entity auto const& arg,
IndexType* row,
IndexType* col)
auto maxCoeff(auto const& arg, IndexType* row, IndexType* col)
requires(requires { arg.maxCoeff(row, col); })
{
return arg.maxCoeff(row, col);
}
template<std::integral IndexType>
auto minCoeff(concepts::entity auto const& arg,
IndexType* row,
IndexType* col)
auto minCoeff(auto const& arg, IndexType* row, IndexType* col)
requires(requires { arg.minCoeff(row, col); })
{
return arg.minCoeff(row, col);
}