Jelajahi Sumber

Fix some errors in the structure of matrix.

Sam Jaffe 7 tahun lalu
induk
melakukan
7a9f9602d7
1 mengubah file dengan 3 tambahan dan 10 penghapusan
  1. 3 10
      matrix.hpp

+ 3 - 10
matrix.hpp

@@ -7,7 +7,7 @@
 
 #pragma once
 
-#include "math/vector/vector.hpp"
+#include "vector/vector.hpp"
 #include "expect/expect.hpp"
 
 namespace math { namespace matrix {
@@ -51,6 +51,7 @@ typename std::enable_if<!is_matrix<_type>::value, matrix<t, r, c> >::type
     public:
       row_reference(S ( & h )[C]) : _handle(h) {}
       row_reference(row_reference const &) = delete;
+      row_reference(row_reference &&) = default;
 
       row_reference & operator=(row_reference const & other) {
         return operator=<S>(other);
@@ -82,15 +83,7 @@ typename std::enable_if<!is_matrix<_type>::value, matrix<t, r, c> >::type
         _data[i][j] = init[i][j];
       }
     }
-    matrix(std::initializer_list<std::array<T, C>> const & init) {
-      expects(init.size() == R, "initializer size mismatch");
-      size_t i = 0;
-      for (auto it = init.begin(), end = init.end(); it != end && i < R; ++it, ++i) {
-        for (size_t j = 0; j < C; ++j) {
-          _data[i][j] = (*it)[j];
-        }
-      }
-    }
+
     template <size_t N>
     matrix(vector::vector<typename std::enable_if<C == 1 && N == R, T>::type, N> const & other) {
       VECTOR_FOR_EACH(i) {