X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2FMoof%2Fcml%2Fmatrix%2Fdynamic.h;h=4092bfefaeb5f7b4d7d54f3a764c177a9a43f973;hp=1362210fa7272009468e8fbfd947122ed7a2df7d;hb=50c1239917f5e443b8ec91773c85ceb3db7da67b;hpb=1dd005530930657fd6216edc1dfcfa4c270a81c9 diff --git a/src/Moof/cml/matrix/dynamic.h b/src/Moof/cml/matrix/dynamic.h index 1362210..4092bfe 100644 --- a/src/Moof/cml/matrix/dynamic.h +++ b/src/Moof/cml/matrix/dynamic.h @@ -205,6 +205,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: