Typed Linear Algebra 0.1.0
Typed Linear Algebra
|
This library provides a C++ statically type-safe linear algebra facade to the Eigen linear algebra library.
Example of installation commands in Shell:
Another variation for your CMake infrastructure via fetch content:
For more, see installation instructions.
Strongly typed matrix. Compose a linear algebra backend matrix into a typed matrix. Row and column indexes provide each element's index type.
Also documented in the fcarouge/typed_linear_algebra.hpp header.
Template Parameter | Definition |
---|---|
Matrix | The underlying linear algebra matrix. |
RowIndexes | The tuple type of the row indexes. |
ColumnIndexes | The tuple type of the row indexes. |
Member Type | Definition |
---|---|
underlying | The type of the element's underlying storage. |
row_indexes | The tuple with the row components of the indexes. |
column_indexes | The tuple with the column components of the indexes. |
element<i, j> | The type of the element at the given matrix indexes position. |
Member Function | Definition |
---|---|
(default constructor) | Construct a default typed matrix. |
(default copy constructor) | Copy construct the typed matrix. |
(default copy assignment operator) | Copy assign a typed matrix. |
(default move constructor) | Move construct a typed matrix. |
(default move assignment operator) | Move construct a typed matrix. |
(conversion copy constructor) | Copy construct the typed matrix from another typed matrix with a compatible underlying matrix or from a compatible underlying matrix. |
(conversion copy constructor) | Copy construct the typed column-vector from a parameter pack or C-style array. |
(conversion copy constructor) | Copy construct the typed row-vector from a parameter pack or C-style array. |
(conversion copy constructor) | Copy construct the typed singletin matrix from the sole element. |
operator[i, j] | Access the specified element. |
operator(i, j) | Access the specified element. |
at<i, j>() | Access the specified element. |
(conversion operator) | Access the singleton element. |
(destructor) | Destruct a default typed matrix. |
Typed matrix element conversions customization point. Specialize this template to allow conversion of element's type and underlying type.
A specialization of the standard formatter is provided for the typed matrix. Use std::format
to store a formatted representation of the matrix. Standard format parameters to be supported.
Type safety cannot be guaranteed at compilation time without index safety. The indexes can either be non-type template parameters or strong types overloadings. Converting a runtime index to a dependent template type is not possible in C++. A proxy reference could be used to allow traditional assignment syntax but the runtime check and extra indirection are not interesting tradeoffs. A template call operator can be used for getting a type safe value but impractical syntax for setting. Without index safety, the accepted tradeoff is a templated index at<i, j>()
method.
The library is used in projects:
Your project link here!
The library is designed, developed, and tested with the help of third-party tools and services acknowledged and thanked here:
Become a sponsor today! Support this project with coffee and infrastructure!
Your group logo and link here!
Your name and link here!
Thanks everyone!
TypedLinearAlgebra is public domain:
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to https://unlicense.org