22//
33// Matrix.h: Rcpp R/C++ interface class library -- matrices
44//
5- // Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
5+ // Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
66//
77// This file is part of Rcpp.
88//
2424
2525class Dimension ;
2626
27- template <int RTYPE>
28- class Matrix : public Vector <RTYPE>, public MatrixBase<RTYPE,true , Matrix<RTYPE> > {
27+ template <int RTYPE, template < class > class StoragePolicy = PreserveStorage >
28+ class Matrix : public Vector <RTYPE, StoragePolicy >, public MatrixBase<RTYPE, true , Matrix<RTYPE,StoragePolicy > > {
2929 int nrows ;
3030
3131public:
@@ -35,7 +35,7 @@ class Matrix : public Vector<RTYPE>, public MatrixBase<RTYPE,true, Matrix<RTYPE>
3535 typedef MatrixColumn<RTYPE> Column ;
3636 typedef SubMatrix<RTYPE> Sub ;
3737
38- typedef Vector<RTYPE> VECTOR ;
38+ typedef Vector<RTYPE, StoragePolicy > VECTOR ;
3939 typedef typename VECTOR::iterator iterator ;
4040 typedef typename VECTOR::const_iterator const_iterator ;
4141 typedef typename VECTOR::converter_type converter_type ;
@@ -107,11 +107,6 @@ class Matrix : public Vector<RTYPE>, public MatrixBase<RTYPE,true, Matrix<RTYPE>
107107
108108 inline int offset ( int i, int j) const { return i + nrows * j ; }
109109
110- void update_matrix (){
111- RCPP_DEBUG_1 ( " %s::update_matrix" , DEMANGLE (Matrix) ) ;
112- VECTOR::update_vector () ;
113- }
114-
115110 template <typename U>
116111 void fill_diag__dispatch ( traits::false_type, const U& u) ;
117112
0 commit comments