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/*
4Various matrix inversions performed upon arrays of DynLinArr and
5DynArr classes.
6
7
8Copyright (c) 2001 Igor B. Smirnov
9
10The file can be used, copied, modified, and distributed
11according to the terms of GNU Lesser General Public License version 2.1
12as published by the Free Software Foundation,
13and provided that the above copyright notice, this permission notice,
14and notices about any modifications of the original text
15appear in all copies and in supporting documentation.
16The file is provided "as is" without express or implied warranty.
17*/
18
21
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
34void inverse_DynArr(const DynArr<double>& mi, DynArr<double>& mr, int& serr);
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
45void inverse_DynArr(const DynArr<double>& mi,
46 const DynLinArr<int>& s_var, // 1 if variable
47 DynArr<double>& mr, int& serr);
49 const DynLinArr<int>& s_var, // 1 if variable
50 DynArr<DoubleAc>& mr, int& szero, int& serr,
51 int s_stop = 1);
52void 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
60 long q = 0); // default means total matrix
61
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/*
68DoubleAc 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
DoubleAc determinant_DynArr(const DynArr< DoubleAc > &mi, long q=0)
Definition: inverse.cpp:404
void inverse_DynArr_prot(const DynArr< DoubleAc > &mi, DynArr< DoubleAc > &mr, int &szero, int &serr, int s_stop=1)
Definition: inverse.cpp:15
void inverse_DynArr(const DynArr< double > &mi, DynArr< double > &mr, int &serr)
Definition: inverse.cpp:113