Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
LaInverse.cxx
Go to the documentation of this file.
1// @(#)root/minuit2:$Id$
2// Authors: M. Winkler, F. James, L. Moneta, A. Zsenei 2003-2005
3
4/**********************************************************************
5 * *
6 * Copyright (c) 2005 LCG ROOT Math team, CERN/PH-SFT *
7 * *
8 **********************************************************************/
9
10#include "Minuit2/LaInverse.h"
11#include "Minuit2/LASymMatrix.h"
12
13namespace ROOT {
14
15namespace Minuit2 {
16
17int mnvert(LASymMatrix &t);
18
19// symmetric matrix (positive definite only)
20
22{
23 // function for inversion of symmetric matrices using mnvert function
24 // (from Fortran Minuit)
25
26 int ifail = 0;
27
28 if (t.size() == 1) {
29 double tmp = t.Data()[0];
30 if (!(tmp > 0.))
31 ifail = 1;
32 else
33 t.Data()[0] = 1. / tmp;
34 } else {
35 ifail = mnvert(t);
36 }
37
38 return ifail;
39}
40
41} // namespace Minuit2
42
43} // namespace ROOT
Class describing a symmetric matrix of size n.
Definition LASymMatrix.h:45
const double * Data() const
unsigned int size() const
int Invert(LASymMatrix &)
Definition LaInverse.cxx:21
int mnvert(LASymMatrix &t)
Inverts a symmetric matrix.
Definition mnvert.cxx:23
This file contains a specialised ROOT message handler to test for diagnostic in unit tests.