]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/cml/matrix/fixed.h
cml version bump to 1.0.1
[chaz/yoink] / src / Moof / cml / matrix / fixed.h
index d20ccfaba4841b7259c5a2a17fde2530e92a5faa..f35bf1c64a4f5081ec74e76849cd63aa7cd468b3 100644 (file)
@@ -198,6 +198,16 @@ class matrix<Element,fixed<Rows,Cols>,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:
 
This page took 0.017937 seconds and 4 git commands to generate.