Taylor models utilities
#include <audi/taylor_model_utilities.hpp>
-
std::vector<std::vector<double>> matmul(const std::vector<std::vector<double>> &A, const std::vector<std::vector<double>> &B)
Matrix multiplication.
Computes the matrix product \( C = A \cdot B \) where
A
is of shape(m x p)
B
is of shape(p x n)
The result
C
has shape(m x n)
.- Parameters:
A – left-hand matrix of shape
(m x p)
B – right-hand matrix of shape
(p x n)
- Throws:
std::out_of_range – if
A
andB
have incompatible dimensions- Returns:
matrix product
C
of shape(m x n)
-
std::vector<std::vector<double>> transpose(const std::vector<std::vector<double>> &M)
Matrix transpose.
Computes the transpose of a given matrix \(M\).
If
M
has shape(rows x cols)
, the result has shape(cols x rows)
.
- Parameters:
M – input matrix
- Returns:
transpose of
M
-
std::ostream &operator<<(std::ostream &os, const var_map_d &m)
Overloaded stream insertion operator for var_map_d.
Outputs the contents of a var_map_d (mapping variable names to doubles) to the given output stream in a human-readable format.
Example output: {“x”: 1.23, “y”: 4.56}
- Parameters:
os – the output stream
m – the var_map_d mapping variable names to double values
- Returns:
a reference to the output stream with the formatted contents inserted
-
std::ostream &operator<<(std::ostream &os, const var_map_i &m)
Overloaded stream insertion operator for var_map_i.
Outputs the contents of a var_map_i (mapping variable names to intervals) to the given output stream in a human-readable format.
Each interval is displayed as [lower, upper]. Example output: {“x”:[0, 1], “y”:[2, 5]}
- Parameters:
os – the output stream
m – the var_map_i mapping variable names to int_d intervals
- Returns:
a reference to the output stream with the formatted contents inserted