c_physics_engine
A custom physics engine written in C/C++
|
Classes | |
class | Matrix |
Functions | |
std::ostream & | operator<< (std::ostream &flux, const Matrix &mat) |
Print a matrix. | |
Matrix | operator* (float scalar, const Matrix &mat) |
Scale a matrix. | |
Variables | |
const std::out_of_range | OOB = std::out_of_range("Row or column index out of bounds.") |
const std::out_of_range | SUBMAT_OOB = std::out_of_range("Submatrix exceeds bounds of original matrix.") |
const std::invalid_argument | SHAPE_MISMATCH = std::invalid_argument("Matrix-shapes don't match.") |
const std::invalid_argument | INNERDIM_MISMATCH = std::invalid_argument("Inner matrix-dimensions don't align.") |
const std::invalid_argument | DIM_MISMATCH = std::invalid_argument("Matrix-columns or -rows don't match.") |
const std::invalid_argument | TOO_FEW = std::invalid_argument("Too few matrices, minimum 1.") |
const std::invalid_argument | DIV_ZERO = std::invalid_argument("Division by 0.") |
Scale a matrix.
scalar | The scalar to scale by. |
mat | The matrix to scale. |
std::ostream & cpp_physics::operator<< | ( | std::ostream & | flux, |
const Matrix & | mat ) |
Print a matrix.
flux | cout-voodoo |
mat | The matrix to print. |
const std::invalid_argument cpp_physics::DIM_MISMATCH = std::invalid_argument("Matrix-columns or -rows don't match.") |
const std::invalid_argument cpp_physics::DIV_ZERO = std::invalid_argument("Division by 0.") |
const std::invalid_argument cpp_physics::INNERDIM_MISMATCH = std::invalid_argument("Inner matrix-dimensions don't align.") |
const std::out_of_range cpp_physics::OOB = std::out_of_range("Row or column index out of bounds.") |
const std::invalid_argument cpp_physics::SHAPE_MISMATCH = std::invalid_argument("Matrix-shapes don't match.") |
const std::out_of_range cpp_physics::SUBMAT_OOB = std::out_of_range("Submatrix exceeds bounds of original matrix.") |
const std::invalid_argument cpp_physics::TOO_FEW = std::invalid_argument("Too few matrices, minimum 1.") |