Garfield++
v1r0
A toolkit for the detailed simulation of particle detectors based on ionisation measurement in gases and semiconductors
Loading...
Searching...
No Matches
inverse.h
Go to the documentation of this file.
1
#ifndef INVERSE_H
2
#define INVERSE_H
3
/*
4
Various matrix inversions performed upon arrays of DynLinArr and
5
DynArr classes.
6
7
8
Copyright (c) 2001 Igor B. Smirnov
9
10
The file can be used, copied, modified, and distributed
11
according to the terms of GNU Lesser General Public License version 2.1
12
as published by the Free Software Foundation,
13
and provided that the above copyright notice, this permission notice,
14
and notices about any modifications of the original text
15
appear in all copies and in supporting documentation.
16
The file is provided "as is" without express or implied warranty.
17
*/
18
19
#include "
wcpplib/safetl/AbsArr.h
"
20
#include "
wcpplib/math/DoubleAc.h
"
21
22
void
inverse_DynArr_prot
(
const
DynArr<DoubleAc>
& mi,
DynArr<DoubleAc>
& mr,
23
int
& szero,
// sign that the calculations are
24
// terminated owing to attempt to divide by 0.
25
// The final matrix is not correct.
26
int
& serr,
// sign that the interval precision
27
// is broken
28
// (but the final matrix may be provided if
29
// szero=0)
30
int
s_stop = 1
// directive to stop if
31
// the interval precision is broken
32
);
33
34
void
inverse_DynArr
(
const
DynArr<double>
& mi,
DynArr<double>
& mr,
int
& serr);
35
void
inverse_DynArr
(
const
DynArr<DoubleAc>
& mi,
DynArr<DoubleAc>
& mr1,
36
int
& szero,
int
& serr1,
DynArr<DoubleAc>
& mr2,
int
& serr2);
37
// Calls inverse_DynArr_prot two times, first with inbuilt precision
38
// and second with given precision.
39
// serr1 means that the inversion can not be done precissely in
40
// the numerical sence.
41
// In this case mr2 and serr2 are not inited.
42
// if serr1==0, mr2 and serr2 are always calculated.
43
// If szero == 1, then serr1 = 1 too.
44
45
void
inverse_DynArr
(
const
DynArr<double>
& mi,
46
const
DynLinArr<int>
& s_var,
// 1 if variable
47
DynArr<double>
& mr,
int
& serr);
48
void
inverse_DynArr_prot
(
const
DynArr<DoubleAc>
& mi,
49
const
DynLinArr<int>
& s_var,
// 1 if variable
50
DynArr<DoubleAc>
& mr,
int
& szero,
int
& serr,
51
int
s_stop = 1);
52
void
inverse_DynArr
(
const
DynArr<DoubleAc>
& mi,
53
const
DynLinArr<int>
& s_var,
// 1 if variable
54
DynArr<DoubleAc>
& mr1,
int
& szero,
int
& serr1,
55
DynArr<DoubleAc>
& mr2,
int
& serr2);
56
// Pack the matrix , calls the same function declared without s_var
57
// and unpack the result
58
59
DoubleAc
determinant_DynArr
(
const
DynArr<DoubleAc>
& mi,
60
long
q = 0);
// default means total matrix
61
62
DoubleAc
determinant_DynArr
(
const
DynArr<DoubleAc>
& mi,
63
const
DynLinArr<int>
& s_var,
// 1 if variable
64
long
q = 0);
// default means total matrix
65
// counts active rows and columns
66
//int& serr);
67
/*
68
DoubleAc determinant_DynArr_prot(const DynArr<DoubleAc>& mi,
69
long q, // dimension of minor
70
int& szero, // sign that the calculations are
71
// terminated owing to attempt to divide by 0.
72
// The final determinant is not correct.
73
int& serr, // sign that the interval precision
74
// is broken
75
// (but the final matrix may be provided if
76
// szero=0)
77
int s_stop=1 // directive to stop if
78
// the interval precision is broken
79
);
80
*/
81
82
#endif
AbsArr.h
DoubleAc.h
DoubleAc
Definition:
DoubleAc.h:44
DynArr
Definition:
AbsArr.h:1703
DynLinArr
Definition:
AbsArr.h:156
determinant_DynArr
DoubleAc determinant_DynArr(const DynArr< DoubleAc > &mi, long q=0)
Definition:
inverse.cpp:404
inverse_DynArr_prot
void inverse_DynArr_prot(const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop=1)
Definition:
inverse.cpp:15
inverse_DynArr
void inverse_DynArr(const DynArr< double > &mi, DynArr< double > &mr, int &serr)
Definition:
inverse.cpp:113
garfieldpp-v1r0
Heed
wcpplib
matrix
inverse.h
Generated by
1.9.6