Forgot the little matrix wrapper.
This commit is contained in:
parent
aadf15e439
commit
c11384df59
2 changed files with 41 additions and 1 deletions
14
matrix.hpp
Normal file
14
matrix.hpp
Normal file
|
@ -0,0 +1,14 @@
|
|||
#pragma once
|
||||
#include <vector>
|
||||
|
||||
typedef std::vector<int> MatrixRow;
|
||||
typedef std::vector<MatrixRow> Matrix;
|
||||
|
||||
/*
|
||||
* Just a quick thing to reset a matrix to a value.
|
||||
*/
|
||||
inline void matrix_assign(Matrix &out, int new_value) {
|
||||
for(auto &row : out) {
|
||||
row.assign(row.size(), new_value);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue