19template <SquareMatrix MatIn>
26 static_assert(
Real<T>,
"Sqrt assumes reals domain");
27 static_assert(
N >= 1,
"Sqrt requires matrix dim of at least 1");
48 for (std::size_t
i = 0;
i <
config.steps; ++
i) {
74 .steps = 128, .tol =
T(1
e-12), .floor_eps =
T(1
e-14)};
Field classified by scalar_traits as real.
std::remove_cvref_t< T > remove_cvref_t
Remove top-level const, volatile, and reference qualification.
constexpr std::size_t mat_rows_v
Registered compile-time row count after cv/ref normalization.
constexpr bool all_equal(const Vec &X, const Vec &Y, real_type_t< vector_element_t< Vec > > tol=1e-10)
checks if two vectors are equivalent to a given tolerance (different than == operator on vector which...
typename mat_traits< remove_cvref_t< Mat > >::value_type matrix_scalar_t
Registered matrix scalar type after cv/ref normalization.
Configuration for generic numerical factorizations.
constexpr auto apply(const Mat &A) const
Compute the matrix square root and inverse square root.
static constexpr std::size_t N
linalg::remove_cvref_t< MatIn > Mat
alias & types
constexpr auto operator()(const Mat &A) const
Compute the matrix square root and inverse square root.