Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JMatrix1S.hh
Go to the documentation of this file.
1#ifndef __JMATRIX1S__
2#define __JMATRIX1S__
3
4#include <cmath>
5#include <algorithm>
6
7#include "JMath/JMatrix1D.hh"
8#include "JLang/JException.hh"
9
10
11/**
12 * \author mdejong
13 */
14
15namespace JMATH {}
16namespace JPP { using namespace JMATH; }
17
18namespace JMATH {
19
21
22
23 /**
24 * 1 x 1 symmetric matrix
25 */
26 class JMatrix1S :
27 public JMatrix1D
28 {
29 public:
30 /**
31 * Default constructor.
32 */
34 JMatrix1D()
35 {}
36
37
38 /**
39 * Contructor.
40 *
41 * \param A matrix
42 */
43 JMatrix1S(const JMatrix1D& A) :
44 JMatrix1D(A)
45 {}
46
47
48 /**
49 * Contructor.
50 *
51 * \param __a00 (0,0)
52 */
53 JMatrix1S(const double __a00) :
54 JMatrix1D(__a00)
55 {}
56
57
58 /**
59 * Invert matrix
60 */
61 void invert()
62 {
63 if (a00 == 0) {
64 throw JDivisionByZero("LDU decomposition zero pivot");
65 }
66
67 a00 = 1.0 / a00;
68 }
69 };
70}
71
72#endif
Exceptions.
Exception for division by zero.
1 x 1 matrix
Definition JMatrix1D.hh:35
1 x 1 symmetric matrix
Definition JMatrix1S.hh:28
void invert()
Invert matrix.
Definition JMatrix1S.hh:61
JMatrix1S(const JMatrix1D &A)
Contructor.
Definition JMatrix1S.hh:43
JMatrix1S(const double __a00)
Contructor.
Definition JMatrix1S.hh:53
JMatrix1S()
Default constructor.
Definition JMatrix1S.hh:33
Auxiliary classes and methods for mathematical operations.
Definition JEigen3D.hh:88
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).