![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Vector class with runtime size based on std::vector storage and mdspan. More...
#include <shammath/include/shammath/matrix.hpp>
Public Member Functions | |
| vec_d (int size) | |
| Constructor. | |
| 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_d< T > &other) const |
| Check if this vector is equal to another one. | |
Public Attributes | |
| std::vector< T > | data |
| The vector data. | |
| int | size |
| The vector size. | |
Vector class with runtime size based on std::vector storage and mdspan.
| T | the type of the vector entries |
| n | the number of entries |
Definition at line 190 of file matrix.hpp.
|
inline |
Constructor.
Definition at line 198 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan.
Definition at line 201 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan of a matrix with one column.
Definition at line 206 of file matrix.hpp.
|
inlineconstexpr |
Get the vector data as a mdspan of a matrix with one row.
Definition at line 211 of file matrix.hpp.
|
inline |
Check if this vector is equal to another one.
Definition at line 219 of file matrix.hpp.
|
inlineconstexpr |
Access the vector entry at position i.
Definition at line 216 of file matrix.hpp.
| std::vector<T> shammath::vec_d< T >::data |
The vector data.
Definition at line 193 of file matrix.hpp.
| int shammath::vec_d< T >::size |
The vector size.
Definition at line 195 of file matrix.hpp.