Mercurial > hg > octave-nkf
comparison liboctave/boolSparse.h @ 13030:b646413c3d0e
Make operators do smarter sparse conversions on permutation matrices.
* Sparse.cc (Sparse<T>::Sparse): New templated ctor, plus two instantiations.
* Sparse.h (Sparse<T>): Declare new ctor.
* MSparse.h (MSparse): Give this class a PermMatrix ctor.
* boolSparse.h (BoolSparseMatrix): Ditto.
* dSparse.cc: Refactor PermMatrix ctor, moved into common parent class.
* dSparse.h (SparseMatrix): Ditto.
* op-pm-sm.cc: Declare and install smarter permutation matrix operators.
* ov-perm.cc (octave_perm_matrix): Declare new virtual function override.
* ov-perm.cc (sparse_bool_matrix_value): Override this virtual function.
author | Jordi Gutiérrez Hermoso <jordigh@gmail.com> |
---|---|
date | Tue, 30 Aug 2011 18:36:06 -0500 |
parents | 12df7854fa7c |
children | 72c96de7a403 |
comparison
equal
deleted
inserted
replaced
13029:50db905c3cf1 | 13030:b646413c3d0e |
---|---|
54 : Sparse<bool> (a, dv) { } | 54 : Sparse<bool> (a, dv) { } |
55 | 55 |
56 explicit SparseBoolMatrix (const boolMatrix& a) : Sparse<bool> (a) { } | 56 explicit SparseBoolMatrix (const boolMatrix& a) : Sparse<bool> (a) { } |
57 | 57 |
58 explicit SparseBoolMatrix (const boolNDArray& a) : Sparse<bool> (a) { } | 58 explicit SparseBoolMatrix (const boolNDArray& a) : Sparse<bool> (a) { } |
59 | |
60 explicit SparseBoolMatrix (const PermMatrix& a) : Sparse<bool> (a) { }; | |
59 | 61 |
60 SparseBoolMatrix (const Array<bool>& a, const idx_vector& r, | 62 SparseBoolMatrix (const Array<bool>& a, const idx_vector& r, |
61 const idx_vector& c, octave_idx_type nr = -1, | 63 const idx_vector& c, octave_idx_type nr = -1, |
62 octave_idx_type nc = -1, bool sum_terms = true, | 64 octave_idx_type nc = -1, bool sum_terms = true, |
63 octave_idx_type nzm = -1) | 65 octave_idx_type nzm = -1) |