![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Vector class based on std::array storage and mdspan. More...
#include <shammath/include/shammath/matrix.hpp>
Public Member Functions | |
| constexpr auto | get_mdspan () |
| Get the vector data as a mdspan. | |
| constexpr auto | get_mdspan_mat_col () |
| Get the vector data as a mdspan of a matrix with one column. | |
| constexpr auto | get_mdspan_mat_row () |
| Get the vector data as a mdspan of a matrix with one row. | |
| constexpr T & | operator[] (int i) |
| Access the vector entry at position i. | |
| bool | operator== (const vec< T, n > &other) const |
| Check if this vector is equal to another one. | |
Public Attributes | |
| std::array< T, n > | data |
| The vector data. | |
Vector class based on std::array storage and mdspan.
| T | the type of the vector entries |
| n | the number of entries |
Definition at line 98 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan.
Definition at line 104 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan of a matrix with one column.
Definition at line 109 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan of a matrix with one row.
Definition at line 114 of file matrix.hpp.
|
inline |
Check if this vector is equal to another one.
Definition at line 122 of file matrix.hpp.
|
inlineconstexpr |
Access the vector entry at position i.
Definition at line 119 of file matrix.hpp.
| std::array<T, n> shammath::vec< T, n >::data |
The vector data.
Definition at line 101 of file matrix.hpp.