MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
mtl::testsuite Namespace Reference

Functions

const std::unordered_map< std::string, double > & kappa_table ()
 2-norm condition numbers sigma_max / sigma_min for the catalog.
std::vector< std::string > names ()
 The catalog entries (roughly ordered small -> large).
double kappa (const std::string &name)
 Published condition number for name; throws if the name is not in the catalog.
std::string data_dir ()
 The default catalog data directory.
mat::dense2D< double > by_name (const std::string &name, const std::string &dir=data_dir())
 Load a catalog matrix by name as a dense2D<double>, reading its .mtx from dir (default: the CMake-configured catalog directory).

Function Documentation

◆ by_name()

mat::dense2D< double > mtl::testsuite::by_name ( const std::string & name,
const std::string & dir = data_dir() )
inline

Load a catalog matrix by name as a dense2D<double>, reading its .mtx from dir (default: the CMake-configured catalog directory).

Throws if the name is unknown or the file cannot be read.

◆ data_dir()

std::string mtl::testsuite::data_dir ( )
inline

The default catalog data directory.

Header-only consumers frequently pull MTL5 in by adding include/ to the search path only (FetchContent_Populate, -Iinclude), so MTL5's CMake never runs and the configured macro is absent. We therefore derive the data dir from THIS header's own location (__FILE__ is the absolute compile-time path under CMake): include/mtl/generators/testsuite.hpp -> ../../../data/testsuite. The CMake-configured macro, when present, takes precedence. Installed consumers (source tree gone) should pass an explicit dir to by_name().

◆ kappa()

double mtl::testsuite::kappa ( const std::string & name)
inline

Published condition number for name; throws if the name is not in the catalog.

◆ kappa_table()

const std::unordered_map< std::string, double > & mtl::testsuite::kappa_table ( )
inline

2-norm condition numbers sigma_max / sigma_min for the catalog.

Most are the SuiteSparse / Universal published values. Six are computed from the singular values in 60-digit arithmetic (mpmath), because the published value was not a 2-norm condition number (#844): faires74x3 (published 15999, the infinity-norm value), steam3 and fs_183_1 (1-norm values), fs_183_3 and west0167 (copies of fs_183_1's and steam1's), and rump6x6ill (an estimate, 1e16; the true value 7.8e24 is beyond 1/eps, so a double SVD cannot see it).

◆ names()

std::vector< std::string > mtl::testsuite::names ( )
inline

The catalog entries (roughly ordered small -> large).