Skip to content

Commit a63fdab

Browse files
authored
Re-implement RectArray and Matrix (#730)
This re-implements the RectArray and Matrix classes: * Matrix is no longer derived from RectArray, but instead uses RectArray internally as storage. * RectArray is now implemented in terms of a continuous `std::vector`, rather that manually-allocated pointer-to-pointer * Internal implementations in both classes re-written to use STL algorithms and/or efficient iterators, as appropriate * General modernisation cleanups.
1 parent 47e86f3 commit a63fdab

6 files changed

Lines changed: 750 additions & 792 deletions

File tree

Makefile.am

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,6 @@ core_SOURCES = \
249249
src/core/vector.h \
250250
src/core/recarray.h \
251251
src/core/matrix.h \
252-
src/core/matrix.imp \
253252
src/core/integer.cc \
254253
src/core/integer.h \
255254
src/core/rational.cc \

src/core/matrix.cc

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@
2020
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
2121
//
2222

23-
#include "core.h"
24-
#include "matrix.imp"
23+
#include "matrix.h"
2524

2625
namespace Gambit {
2726

@@ -30,9 +29,4 @@ template class Matrix<Rational>;
3029
template class Matrix<Integer>;
3130
template class Matrix<int>;
3231

33-
template Vector<double> operator*(const Vector<double> &, const Matrix<double> &);
34-
template Vector<Rational> operator*(const Vector<Rational> &, const Matrix<Rational> &);
35-
template Vector<Integer> operator*(const Vector<Integer> &, const Matrix<Integer> &);
36-
template Vector<int> operator*(const Vector<int> &, const Matrix<int> &);
37-
3832
} // end namespace Gambit

0 commit comments

Comments
 (0)