Example program to test inversion of symmetric matrix.  
More...
#include <string>
#include <iostream>
#include <iomanip>
#include "TRandom3.h"
#include "JLang/JException.hh"
#include "JMath/JMatrix2S.hh"
#include "Jeep/JParser.hh"
#include "Jeep/JMessage.hh"
 
Go to the source code of this file.
 | 
| int  | main (int argc, char **argv) | 
|   | 
Example program to test inversion of symmetric matrix. 
- Author
 - mdejong 
 
Definition in file JMatrix2S.cc.
 
      
        
          | int main  | 
          ( | 
          int  | 
          argc,  | 
        
        
           | 
           | 
          char **  | 
          argv  | 
        
        
           | 
          ) | 
           |  | 
        
      
 
Definition at line 20 of file JMatrix2S.cc.
   29     JParser<> zap(
"Example program to test inversion of symmetric matrix.");
 
   36   catch(
const exception &error) {
 
   37     FATAL(error.what() << endl);
 
   45   const Double_t xmin = -1.0;
 
   46   const Double_t xmax = +1.0;
 
   49   JMatrix2D A(gRandom->Uniform(xmin,xmax), 0.0,                       
 
   50               gRandom->Uniform(xmin,xmax), gRandom->Uniform(xmin,xmax));
 
   55   DEBUG(
"Matrix A" << endl);
 
   58   NOTICE(
"Determinant A " << A.getDeterminant() << endl);
 
   66     DEBUG(
"Matrix A^-1" << endl);
 
   69     NOTICE(
"Determinant A^-1 = " << B.getDeterminant() << endl);
 
   73     DEBUG(
"Matrix A x A^-1" << endl);
 
   76     NOTICE(
"Determinant (A x A^-1)           = " << 
C.getDeterminant()                      << endl);
 
   77     NOTICE(
"Determinant A x Determinant A^-1 = " << A.getDeterminant() * B.getDeterminant() << endl);
 
   78     NOTICE(
"A x A^-1 = I ? "                     << 
C.isIdentity(precision)                 << endl);
 
   80     if (!
C.isIdentity(precision)) {
 
   81       ERROR(
"Matrix A x A^-1 /= I" << endl);
 
   84     JMatrix2D D = 
C - JMatrix2D::getIdentity();
 
   86     DEBUG(
"Matrix D = C - I" << endl);
 
   89     ASSERT(
C.isIdentity(precision));
 
   91   catch (
const JException& error) {
 
Utility class to parse command line options. 
 
#define ASSERT(A)
Assert macro. 
 
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object 
 
#define DEBUG(A)
Message macros.