numerical-collection-cpp 0.10.0
A collection of algorithms in numerical analysis implemented in C++
Loading...
Searching...
No Matches
num_collect::base Namespace Reference

Namespace of definitions common in this project. More...

Namespaces

namespace  concepts
 Namespace of C++ concepts.
 
namespace  impl
 Namespace of internal implementations.
 

Classes

class  algorithm_failure
 Class of exception on failure in algorithm. More...
 
class  assertion_failure
 Class of exception on assertion failure. More...
 
class  file_error
 Class of exception on errors in files. More...
 
class  invalid_argument
 Class of exception on invalid arguments. More...
 
class  iterative_solver_base
 Base class of iterative solvers. More...
 
class  num_collect_exception
 Class of exception in this project. More...
 
class  precondition_not_satisfied
 Class of exception on not satisfying a precondition. More...
 

Typedefs

using index_type = std::ptrdiff_t
 Type of indices in this library.
 

Functions

template<concepts::dense_matrix Matrix>
auto get_size (const Matrix &matrix) -> index_type
 Get the size.
 
template<concepts::real_scalar T>
auto get_size (const std::complex< T > &val) -> index_type
 Get the size.
 
template<concepts::real_scalar T>
auto get_size (const T &val) -> index_type
 Get the size.
 
template<concepts::real_scalar T>
auto isfinite (const std::complex< T > &val) -> bool
 Check whether a number is finite.
 
template<concepts::real_scalar T>
auto isfinite (const T &val) -> bool
 Check whether a number is finite.
 
template<concepts::dense_matrix Matrix>
auto norm (const Matrix &matrix)
 Calculate norm of a matrix.
 
template<concepts::real_scalar T>
auto norm (const std::complex< T > &val) -> T
 Calculate the absolute value of a complex number.
 
template<concepts::real_scalar T>
auto norm (const T &val) -> T
 Calculate the absolute value of a number.
 

Detailed Description

Namespace of definitions common in this project.

Typedef Documentation

◆ index_type

using num_collect::base::index_type = std::ptrdiff_t

Type of indices in this library.

This library uses this signed integer type for indices and sizes, as Eigen library does.

Definition at line 33 of file index_type.h.

Function Documentation

◆ get_size() [1/3]

template<concepts::dense_matrix Matrix>
auto num_collect::base::get_size ( const Matrix & matrix) -> index_type

Get the size.

Template Parameters
MatrixType of matrix.
Parameters
[in]matrixMatrix.
Returns
Size.

Definition at line 39 of file get_size.h.

◆ get_size() [2/3]

template<concepts::real_scalar T>
auto num_collect::base::get_size ( const std::complex< T > & val) -> index_type

Get the size.

Template Parameters
TType of the number.
Parameters
[in]valValue.
Returns
Size.

Definition at line 64 of file get_size.h.

◆ get_size() [3/3]

template<concepts::real_scalar T>
auto num_collect::base::get_size ( const T & val) -> index_type

Get the size.

Template Parameters
TType of the number.
Parameters
[in]valValue.
Returns
Size.

Definition at line 51 of file get_size.h.

◆ isfinite() [1/2]

template<concepts::real_scalar T>
auto num_collect::base::isfinite ( const std::complex< T > & val) -> bool

Check whether a number is finite.

Template Parameters
TFloating-point number type.
Parameters
[in]valNumber.
Return values
trueThe input number is finite.
falseThe input number is infinite or NAN.

Definition at line 53 of file isfinite.h.

◆ isfinite() [2/2]

template<concepts::real_scalar T>
auto num_collect::base::isfinite ( const T & val) -> bool

Check whether a number is finite.

Template Parameters
TFloating-point number type.
Parameters
[in]valNumber.
Return values
trueThe input number is finite.
falseThe input number is infinite or NAN.

Definition at line 39 of file isfinite.h.

◆ norm() [1/3]

template<concepts::dense_matrix Matrix>
auto num_collect::base::norm ( const Matrix & matrix)

Calculate norm of a matrix.

Template Parameters
MatrixMatrix type.
Parameters
[in]matrixMatrix.
Returns
Norm.

Definition at line 39 of file norm.h.

◆ norm() [2/3]

template<concepts::real_scalar T>
auto num_collect::base::norm ( const std::complex< T > & val) -> T

Calculate the absolute value of a complex number.

Template Parameters
TFloating-point number type.
Parameters
[in]valNumber.
Returns
Absolute value.

Definition at line 64 of file norm.h.

◆ norm() [3/3]

template<concepts::real_scalar T>
auto num_collect::base::norm ( const T & val) -> T

Calculate the absolute value of a number.

Template Parameters
TFloating-point number type.
Parameters
[in]valNumber.
Returns
Absolute value.

Definition at line 51 of file norm.h.