akreon-linalg
Fixed-size linear algebra and numerical methods in C++26.
Loading...
Searching...
No Matches
numerical_config.hpp
Go to the documentation of this file.
1
/*
2
* Copyright © 2025-2026 Akreon LLC
3
* SPDX-License-Identifier: Apache-2.0
4
*/
5
6
#pragma once
7
#include "
akreon/linalg/space/space_concepts.hpp
"
8
#include "
akreon/linalg/vector/algebra_util.hpp
"
9
namespace
config
{
13
template
<linalg::Real T>
14
struct
FactorConfig
{
15
std::size_t
steps
{64};
16
T
tol
{1e-8};
17
T
floor_eps
{1e-10};
18
};
19
20
}
// namespace config
21
namespace
linalg
{
22
26
enum struct
NumericalEvent
:
uint8_t
{
27
NONE
= 0,
28
29
// detection / observation
30
RANK_DEFICIENCY
,
31
INDEFINITE_FACTORIZATION
,
32
NEAR_SINGULAR_TRIANGULAR_SOLVE
,
33
NUMERICAL_SAFEGUARD
,
34
DB_MAX_ITERS_REACHED
,
35
36
// failure
37
FACTORIZATION_FAILED
,
38
EVD_FAILED
39
};
40
48
inline
constexpr
bool
is_fatal_event
(
NumericalEvent
event
) {
49
return
event
==
NumericalEvent::FACTORIZATION_FAILED
||
50
event
==
NumericalEvent::EVD_FAILED
;
51
}
52
53
}
// namespace linalg
algebra_util.hpp
config
Definition
numerical_config.hpp:9
linalg
Definition
constants.hpp:10
linalg::mat_rows_v
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
Definition
matrix_traits.hpp:91
linalg::is_fatal_event
constexpr bool is_fatal_event(NumericalEvent event)
is_fatal_event
Definition
numerical_config.hpp:48
linalg::NumericalEvent
NumericalEvent
NumericalEvent.
Definition
numerical_config.hpp:26
linalg::NumericalEvent::RANK_DEFICIENCY
@ RANK_DEFICIENCY
linalg::NumericalEvent::NEAR_SINGULAR_TRIANGULAR_SOLVE
@ NEAR_SINGULAR_TRIANGULAR_SOLVE
linalg::NumericalEvent::FACTORIZATION_FAILED
@ FACTORIZATION_FAILED
linalg::NumericalEvent::INDEFINITE_FACTORIZATION
@ INDEFINITE_FACTORIZATION
linalg::NumericalEvent::NONE
@ NONE
linalg::NumericalEvent::EVD_FAILED
@ EVD_FAILED
linalg::NumericalEvent::DB_MAX_ITERS_REACHED
@ DB_MAX_ITERS_REACHED
linalg::NumericalEvent::NUMERICAL_SAFEGUARD
@ NUMERICAL_SAFEGUARD
space_concepts.hpp
config::FactorConfig
Configuration for generic numerical factorizations.
Definition
numerical_config.hpp:14
config::FactorConfig::tol
T tol
tolerance of of solution
Definition
numerical_config.hpp:16
config::FactorConfig::steps
std::size_t steps
total number of iter
Definition
numerical_config.hpp:15
config::FactorConfig::floor_eps
T floor_eps
machine precision (lower bounds)
Definition
numerical_config.hpp:17
include
akreon
linalg
numerical_config.hpp
Generated by
1.9.8