Mercurial > hg > octave-nkf
diff liboctave/base-lu.h @ 8367:445d27d79f4e
support permutation matrix objects
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Thu, 04 Dec 2008 08:31:56 +0100 |
parents | f3c00dc0912b |
children | eb63fbe60fab |
line wrap: on
line diff
--- a/liboctave/base-lu.h +++ b/liboctave/base-lu.h @@ -25,13 +25,16 @@ #include "MArray.h" #include "dColVector.h" +#include "PermMatrix.h" -template <class lu_type, class lu_elt_type, class p_type, class p_elt_type> +template <class lu_type> class base_lu { public: + typedef typename lu_type::element_type lu_elt_type; + base_lu (void) { } base_lu (const base_lu& a) : a_fact (a.a_fact), ipvt (a.ipvt) { } @@ -54,12 +57,13 @@ lu_type Y (void) const { return a_fact; } - p_type P (void) const; + PermMatrix P (void) const; ColumnVector P_vec (void) const; protected: + Array<octave_idx_type> getp (void) const; lu_type a_fact; MArray<octave_idx_type> ipvt; };