Jpp
19.0.0
the software that should make you happy
Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
examples
JMath
JSVD3D.cc
Go to the documentation of this file.
1
#include <string>
2
#include <iostream>
3
#include <iomanip>
4
5
#include "TRandom3.h"
6
7
#include "
JMath/JMath.hh
"
8
#include "
JMath/JSVD3D.hh
"
9
#include "
JMath/JMathTestkit.hh
"
10
11
#include "
Jeep/JParser.hh
"
12
#include "
Jeep/JMessage.hh
"
13
14
15
int
main
(
int
argc,
char
**argv)
16
{
17
using namespace
std;
18
using namespace
JPP;
19
20
double
precision;
21
int
debug
;
22
23
try
{
24
25
JParser<>
zap;
26
27
zap[
'e'
] =
make_field
(precision) = 1.0e-3;
28
zap[
'd'
] =
make_field
(
debug
) = 3;
29
30
zap(argc, argv);
31
}
32
catch
(
const
exception &error) {
33
FATAL
(error.what() << endl);
34
}
35
36
37
gRandom->SetSeed(0);
38
39
40
JMatrix3D
A
= getRandom<JMatrix3D>();
41
42
JSVD3D svd;
43
44
svd.decompose(
A
);
45
46
DEBUG
(
"A"
<< endl <<
A
<< endl);
47
DEBUG
(
"U"
<< endl << svd.U << endl);
48
DEBUG
(
"S"
<< endl << svd.S << endl);
49
DEBUG
(
"V"
<< endl << svd.V << endl);
50
51
JMatrix3D
C
= svd.invert();
52
53
C
*=
A
;
54
55
DEBUG
(
"C"
<< endl <<
C
<< endl);
56
57
ASSERT
(
C
.isIdentity(precision));
58
59
return
0;
60
}
JPARSER::JParser
Utility class to parse command line options.
Definition:
JParser.hh:1711
main
int main(int argc, char *argv[])
Definition:
Main.cc:15
JMathTestkit.hh
JPHYSICS::C
static const double C
Physics constants.
Definition:
JPhysics/JConstants.hh:25
ASSERT
#define ASSERT(A,...)
Assert macro.
Definition:
JMessage.hh:90
make_field
#define make_field(A,...)
macro to convert parameter to JParserTemplateElement object
Definition:
JParser.hh:2158
JSVD3D.hh
JMessage.hh
General purpose messaging.
FATAL
#define FATAL(A)
Definition:
JMessage.hh:67
JParser.hh
Utility class to parse command line options.
JMath.hh
Base class for data structures with artithmetic capabilities.
A
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
Definition:
JShellParser.csh:15
debug
int debug
debug level
Definition:
archive-put-wiki-detectors.sh:92
DEBUG
#define DEBUG(A)
Message macros.
Definition:
JMessage.hh:62
Generated by
1.8.5