]> Dogcows Code - chaz/yoink/blobdiff - src/Moof/cml/matrix/dynamic.h
cml version bump to 1.0.1
[chaz/yoink] / src / Moof / cml / matrix / dynamic.h
index 1362210fa7272009468e8fbfd947122ed7a2df7d..4092bfefaeb5f7b4d7d54f3a764c177a9a43f973 100644 (file)
@@ -205,6 +205,16 @@ class matrix<Element,dynamic<Alloc>,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.017325 seconds and 4 git commands to generate.