+/*
+ choleski.cc -- implement Choleski_decomposition
+
+ source file of the Flower Library
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "choleski.hh"
const Real EPS = 1e-7; // so sue me. Hard coded
/*
Standard matrix algorithm.
+ Should add support for banded matrices
*/
Choleski_decomposition::Choleski_decomposition(Matrix P)
: L(P.dim()), D(P.dim())
{
int n = P.dim();
- assert((P-P.transposed()).norm()/P.norm() < EPS);
+#ifdef PARANOID
+ assert((P-P.transposed()).norm()/P.norm() < EPS);
+#endif
+
L.unit();
for (int k= 0; k < n; k++) {
for (int j = 0; j < k; j++){
D(k) = d;
}
-#ifndef NDEBUG
+#ifdef PARANOID
assert((original()-P).norm() / P.norm() < EPS);
#endif
}
invm(i,j) = inv(j);
}
-#ifndef NDEBUG
+#ifdef PARANOID
Matrix I1(n), I2(original());
I1.unit();
assert((I1-I2*invm).norm()/I2.norm() < EPS);
stablecc=atom.cc command-request.cc musical-request.cc bar.cc boxes.cc \
keyword.cc leastsquares.cc \
lookup.cc meter.cc\
- parser.cc lexer.cc qlp.cc qlpsolve.cc\
+ parser.cc \
+# lexer.cc \
+ qlp.cc qlpsolve.cc\
template1.cc template2.cc template3.cc template4.cc\
template5.cc template6.cc version.cc tex-stream.cc tex.cc\
identifier.cc note.cc