Logo ROOT  
Reference Guide
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 
13 namespace ROOT {
14 
15 namespace Minuit2 {
16 
17 int 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
ROOT::Minuit2::Invert
int Invert(LASymMatrix &)
Definition: LaInverse.cxx:21
ROOT::Minuit2::LASymMatrix::Data
const double * Data() const
Definition: LASymMatrix.h:268
LASymMatrix.h
ROOT::Minuit2::LASymMatrix
Class describing a symmetric matrix of size n.
Definition: LASymMatrix.h:45
ROOT::Minuit2::LASymMatrix::size
unsigned int size() const
Definition: LASymMatrix.h:272
LaInverse.h
ROOT
tbb::task_arena is an alias of tbb::interface7::task_arena, which doesn't allow to forward declare tb...
Definition: EExecutionPolicy.hxx:4
ROOT::Minuit2::mnvert
int mnvert(LASymMatrix &t)
Inverts a symmetric matrix.
Definition: mnvert.cxx:23