|
Stratax 0.2.0
|
#include <cstddef>#include <stratax/core/containers/Matrix.hpp>#include <stratax/core/containers/Tensor.hpp>#include <stratax/core/containers/Vector.hpp>#include <stratax/core/Concepts.hpp>#include <stratax/core/Exceptions.hpp>#include <stratax/core/containers/Shape.hpp>#include <stratax/core/validation/Validation.hpp>Go to the source code of this file.
Functions | |
| bool | is_vector_shape (const stratax::core::Shape &shape) |
| bool | is_matrix_shape (const stratax::core::Shape &shape) |
| stratax::core::Shape | matrix_shape (const stratax::core::Shape &shape) |
| template<Array A> | |
| stratax::container::Vector< typename A::value_type > | to_vector (const A &arr) |
| Converts an array-like object to a vector. | |
| template<Array A> | |
| stratax::container::Matrix< typename A::value_type > | to_matrix (const A &arr) |
| Converts an array-like object to a matrix. | |
| template<Array A> | |
| stratax::container::Tensor< typename A::value_type > | to_tensor (const A &arr) |
| Converts an array-like object to a tensor. | |
| template<typename To, typename From> requires Numeric<To> && Numeric<From> | |
| stratax::container::Vector< To > | astype (const stratax::container::Vector< From > &vec) |
| Casts a vector to a different numeric value type. | |
| template<typename To, typename From> requires Numeric<To> && Numeric<From> | |
| stratax::container::Matrix< To > | astype (const stratax::container::Matrix< From > &mat) |
| Casts a matrix to a different numeric value type. | |
| template<typename To, typename From> requires Numeric<To> && Numeric<From> | |
| stratax::container::Tensor< To > | astype (const stratax::container::Tensor< From > &tensor) |
| Casts a tensor to a different numeric value type. | |
| stratax::container::Matrix< To > astype | ( | const stratax::container::Matrix< From > & | mat | ) |
Casts a matrix to a different numeric value type.
| To | Target numeric type. |
| From | Source numeric type. |
| mat | Source matrix. |
Definition at line 195 of file Conversions.hpp.
| stratax::container::Tensor< To > astype | ( | const stratax::container::Tensor< From > & | tensor | ) |
Casts a tensor to a different numeric value type.
| To | Target numeric type. |
| From | Source numeric type. |
| tensor | Source tensor. |
Definition at line 219 of file Conversions.hpp.
| stratax::container::Vector< To > astype | ( | const stratax::container::Vector< From > & | vec | ) |
Casts a vector to a different numeric value type.
| To | Target numeric type. |
| From | Source numeric type. |
| vec | Source vector. |
Definition at line 171 of file Conversions.hpp.
|
inline |
Definition at line 34 of file Conversions.hpp.
|
inline |
Definition at line 14 of file Conversions.hpp.
|
inline |
Definition at line 54 of file Conversions.hpp.
| stratax::container::Matrix< typename A::value_type > to_matrix | ( | const A & | arr | ) |
Converts an array-like object to a matrix.
| A | Source array type. |
| arr | Source array. |
| Exceptions::DimensionError | If the source is not matrix-shaped. |
Definition at line 118 of file Conversions.hpp.
| stratax::container::Tensor< typename A::value_type > to_tensor | ( | const A & | arr | ) |
Converts an array-like object to a tensor.
| A | Source array type. |
| arr | Source array. |
Definition at line 147 of file Conversions.hpp.
| stratax::container::Vector< typename A::value_type > to_vector | ( | const A & | arr | ) |
Converts an array-like object to a vector.
| A | Source array type. |
| arr | Source array. |
| Exceptions::DimensionError | If the source is not rank 1. |
Definition at line 87 of file Conversions.hpp.