[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Toon-members] TooN LU.h
From: |
Tom Drummond |
Subject: |
[Toon-members] TooN LU.h |
Date: |
Mon, 22 Jun 2009 15:23:11 +0000 |
CVSROOT: /cvsroot/toon
Module name: TooN
Changes by: Tom Drummond <twd20> 09/06/22 15:23:11
Modified files:
. : LU.h
Log message:
doc updated to remove TooN1-isms
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/TooN/LU.h?cvsroot=toon&r1=1.18&r2=1.19
Patches:
Index: LU.h
===================================================================
RCS file: /cvsroot/toon/TooN/LU.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- LU.h 9 Jun 2009 13:33:22 -0000 1.18
+++ LU.h 22 Jun 2009 15:23:11 -0000 1.19
@@ -49,15 +49,17 @@
upper-diagonal matrix. The library only supports the decomposition of square
matrices.
It can be used as follows to solve the \f$M\underline{x} = \underline{c}\f$
problem as follows:
@code
-// construct M
-double d1[][] = {{1,2,3},{4,5,6},{7,8,10}};
-Matrix<3> M(d1);
-// construct c
-Vector<3> c = 2,3,4;
-// create the LU decomposition of M
-LU<3> luM(M);
-// compute x = M^-1 * c
-Vector<3> x = luM.backsub(c);
+ // construct M
+ Matrix<3> M;
+ M[0] = makeVector(1,2,3);
+ M[1] = makeVector(4,5,6);
+ M[2] = makeVector(7,8,9);
+ // construct c
+ Vector<3> c = makeVector(2,3,4);
+ // create the LU decomposition of M
+ LU<3> luM(M);
+ // compute x = M^-1 * c
+ Vector<3> x = luM.backsub(c);
@endcode
The convention LU<> (=LU<-1>) is used to create an LU decomposition whose size
is
determined at runtime.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Toon-members] TooN LU.h,
Tom Drummond <=