Function opensn::Transpose(const std::vector<std::vector<double>>&)
Defined in File math.h
Function Documentation
-
std::vector<std::vector<double>> opensn::Transpose(const std::vector<std::vector<double>> &matrix)
Return the transpose of a matrix.
For an m x n input A, returns an n x m matrix T where T[j][i] = A[i][j].
- Throws:
std::runtime_error – if the matrix is empty or has inconsistent row sizes.