Log of /trunk/math/matrix/src/TDecompSparse.cxx
Parent Directory
Revision
22885 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Mar 28 13:57:25 2008 UTC (6 years, 9 months ago) by
rdm
File length: 80337 byte(s)
Diff to
previous 22039
move the following directories under the new "math" meta directory:
mathcore
mathmore
fftw
foam
fumili
genvector
matrix
minuit
minuit2
mlp
physics
smatrix
splot
unuran
quadp
Revision
16458 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Oct 6 06:52:34 2006 UTC (8 years, 3 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 80340 byte(s)
Diff to
previous 15300
From Eddy Offermann:
Previously, the matrix package contained a large amount of ASSERT
statements which are a nuisance for programs analyzing a series of
independent events like in high-energy physics .
Assert's were issued when for instance a division by zero was requested
or a matrix was invalid . Most algorithms made matrices/vectors invalid
after an error occured in an operation , like inversion of a singular matrix .
Unfortunately, not all assert's were accompanied by error messages .
This situation has been completely overhauled :
- All error conditions in the algorithms are now accompanied by error
messages .
- In all algorithms it is still asserted that vectors/matrices are
valid BUT only in very few cases is a matrix/vector made invalid :
for instance if memory is allocated with incorrect parameters .
- In case of division by zero, the division is skipped . In case of a
singular matrix, the inversion routine returns the original matrix .
In the past the result of an inversion could be checked through the
value of the returned determinant or checking whether the inverted matrix
was valid .
Since from now on, we never make the matrix invalid in this operation, the
latter check will not indicate a singular matrix anymore .
The decompostion classes TDecomp... have a backward-compatible
change in the interface which makes detection of singularity easier :
old interface :
void Invert (TMatrixD &inv);
TMatrixD Invert ();
new interface :
Bool_t Invert (TMatrixD &inv);
TMatrixD Invert (Bool_t &status);
TMatrixD Invert () { Bool_t status; return Invert(status);
}
The returned status is kFALSE in case of singularity .
The old situation is easily reproduced by setting the ROOT variable
gErrorAbortLevel to kError . This cause an exception when there is an error
message (Error...) ., In the past the matrix would be made invalid which
would cause the next operation to throw an exception .
Revision
15300 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Fri Jun 2 05:11:20 2006 UTC (8 years, 7 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 80253 byte(s)
Diff to
previous 15174
From Eddy:
Worked more on the comments in the matrix package . Actually the
important
ones are all there .. but have to add thing slike "cop constructor" to
make the checker happy .
Added also namespaces TMatrixTCramer and TMatrixTSymCramerInv to the
dictionary
Revision
14745 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Apr 19 08:22:26 2006 UTC (8 years, 9 months ago) by
rdm
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 71339 byte(s)
Diff to
previous 12591
Change the TError.h macros:
Assert -> R__ASSERT
Check -> R__CHECK
Change the TCollection.h macro:
ForEach -> R__FOR_EACH
This to avoid potential problems due too trivial macro names.
The old macros will be removed in the next release. Currently
they will print out warning messages with the advice to move
to the new macro names.
Revision
11119 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue Feb 15 16:17:10 2005 UTC (9 years, 11 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 71327 byte(s)
Diff to
previous 10667
From Eddy Offermann
Here a patch to remove some inconsistencies/bugs in the indexing of the
decomposed matrices and eigen-vectors/-values in case the row/column
index
did not start 0 .
The tests in stressLinear were modified/extended to check these cases .
Revision
9503 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Mon Jul 12 20:00:41 2004 UTC (10 years, 6 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 71051 byte(s)
Diff to
previous 9181
From Eddy Offermann:
Some code re-organization:
- made TDecompLU::DecomposeLUCrout and TDecompLU::DecomposeLUGauss
protected.
As a consequence changed TDecompLU::InvertLU so that it now calls
the decomposition step .
This change prohibits the user of calling InvertLU without applying
first
the decomposition step
- Routines in TMatrixD/FCramerInv return now a Bool_t instead of Int_t
.
More important, these routines check that the matrix is indeed of the
appropriate shape, since the user could call them directly instead
of going through TMatrixD/F::InvertFast
- Removed the redundant TDecompBase::MultiSolve(TMatrixDSym &B), it did
exactly what TDecompBase::MultiSolve(TMatrixD &B) did .
- void (Trans)Solve(TVectorD &b,Int_t ok) and
void (Trans)Solve(TMatrixDColumn &cb, Int_t ok) routines in TDecomp*
now make vector b or matrix b in case of an error (when ok was set to
false)
Revision
9095 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed Jun 2 15:42:48 2004 UTC (10 years, 7 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 70508 byte(s)
Diff to
previous 9043
From Eddy Offermann:
TMatrixD/FBase::Print(Option_t *name) :
now allows an optional name to be printed.
TDecompSparse:
This decomposition class is (as stated in the header)
only for symmetric matrices . The routine wants
only the upper triangle (including diagonal) of the
matrix . Therefore, add functionality to accomplish
this .
The routine Solve() contained a bug and some of the
logic was rearranged.
The initialization in InitPivot was also rearranged so
that the pivoting threshold is set correctly
Due to these changes, the quadratic programming with
sparse matrices is now functional .
Revision
8984 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Wed May 19 15:47:40 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 69202 byte(s)
Diff to
previous 8964
From Eddy Offermann:
removed 2 bugs related to sparse matrices:
1. index mistake in the protected routine
InsertRow
2. TMatrixDSparseDiag::operator() and
TMatrixDSparseRow::operator() :
forgot to update several pointers after a call
to InsertRow
Revision
8964 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Modified
Tue May 18 14:01:04 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 69178 byte(s)
Diff to
previous 8892
From Eddy Offermann:
- Changed behavior of
TMatrixDSparse::operator()(Int_t i,Int_t j)
TMatrixDSparseRow::Double_t operator ()(Int_t i)
old: if position (i,j) did not exist in the sparse table.
as defined by fRowIndex and fColIndex, an error
message was printed and fJunk position returned.
new: if position (i,j) does not exist, it is added to
the index table.
fJunk data member of TMatrixDSparse removed:
ClassDef=>2
- Bug : removed several Double_t in TMatrixF.. classes
- Added SetRowIndexArray and SetColIndexArray
(opposite of
GetRowIndexArray....) to base classes
- Added InsertRow and ExtractRow to base classes
- Moved SetSub to the base classes; removed bugs from
TMatrixSparse::SetSub version
- Added to TMatrixDSparse own version of Randomize and
RandomizePD
- Added TMatrixDSparsdeDiag_const and
TMatrixDSparseDiag
Revision
8892 -
(
view)
(
download)
(
as text)
(
annotate)
-
[select for diffs]
Added
Wed May 12 10:39:29 2004 UTC (10 years, 8 months ago) by
brun
Original Path:
trunk/matrix/src/TDecompSparse.cxx
File length: 69206 byte(s)
From Eddy Offermann:
1) patch for the matrix directory (cvs diff -a matrix)
2) tar file containing new modules:
matrix/inc/TDecompSparse.h
matrix/inc/TMatrixDSparse.h
matrix/src/TDecompSparse.cxx
matrix/src/TMatrixDSparse.cxx
3) new stressLinear.cxx
Description of changes:
1) many updates of comments in code
2) possibility to construct random matrices, general
symmetric and positive definite
3) Introduction of new matrix class: TMatrixDSparse .
It defines a general sparse matrix in
Harwell-Boeing
format (sparse structure definition optimized for
matrix-vector multiplications).
Like all the other matrix classes, it derives from
TMatrixDBase
4) Introduction of a new decomposition class:
TDecompSparse . It allows decomposition (and
therefore equation solving) of sparse symmetric
matrices
This form allows you to request diffs between any two revisions of this file.
For each of the two "sides" of the diff,
enter a numeric revision.