X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fmatrix%2Ffixed.h;h=f35bf1c64a4f5081ec74e76849cd63aa7cd468b3;hp=d20ccfaba4841b7259c5a2a17fde2530e92a5faa;hb=50c1239917f5e443b8ec91773c85ceb3db7da67b;hpb=1dd005530930657fd6216edc1dfcfa4c270a81c9 diff --git a/src/Moof/cml/matrix/fixed.h b/src/Moof/cml/matrix/fixed.h index d20ccfa..f35bf1c 100644 --- a/src/Moof/cml/matrix/fixed.h +++ b/src/Moof/cml/matrix/fixed.h @@ -198,6 +198,16 @@ class matrix,BasisOrient,Layout> set_basis_element(i,j,s,basis_orient()); } + /** Set the matrix row from the given vector. */ + void set_row(size_t i, const row_vector_type& row) { + for(size_t j = 0; j < this->cols(); ++ j) (*this)(i,j) = row[j]; + } + + /** Set the matrix column from the given vector. */ + void set_col(size_t j, const col_vector_type& col) { + for(size_t i = 0; i < this->rows(); ++ i) (*this)(i,j) = col[i]; + } + public: