Mercurial > octave
diff liboctave/DET.h @ 8336:9813c07ca946
make det take advantage of matrix type
author | Jaroslav Hajek <highegg@gmail.com> |
---|---|
date | Wed, 19 Nov 2008 15:26:39 +0100 |
parents | 64cf956a109c |
children | 3c1762c7e787 |
line wrap: on
line diff
--- a/liboctave/DET.h Wed Nov 19 11:23:07 2008 +0100 +++ b/liboctave/DET.h Wed Nov 19 15:26:39 2008 +0100 @@ -34,7 +34,7 @@ { public: - base_det (T c = 0, int e = 0) + base_det (T c = 1, int e = 0) { c2 = xlog2 (c, e2); e2 += e; @@ -65,6 +65,8 @@ T value () const { return c2 * static_cast<T> (std::ldexp (1.0, e2)); } operator T () const { return value (); } + base_det square () const { return base_det (c2*c2, e2+e2); } + void operator *= (T t) { int e;