]>
Commit | Line | Data |
---|---|---|
03896fc4 | 1 | ////////////////////////////////////////////////////////////////////////////////// |
2 | // // | |
3 | // Nikolai Amelin, Ludmila Malinina, Timur Pocheptsov (C) JINR/Dubna // | |
4 | // amelin@sunhe.jinr.ru, malinina@sunhe.jinr.ru, pocheptsov@sunhe.jinr.ru // | |
5 | // November. 2, 2005 // | |
6 | // // | |
7 | // This equation solver class is taken from GEANT4 and modified!! // | |
8 | ////////////////////////////////////////////////////////////////////////////////// | |
b1c2e580 | 9 | |
b1c2e580 | 10 | #include "EquationSolver.h" |
b1c2e580 | 11 | |
12 | template <class Function> | |
03896fc4 | 13 | EquationSolver<Function>::EquationSolver(const EquationSolver & right) { |
b1c2e580 | 14 | fMaxIter = right.GetMaxIterations(); |
15 | fTolerance = right.GetTolerance(); | |
16 | fA = right.GetIntervalLowerLimit(); | |
17 | fB = right.GetIntervalUpperLimit(); | |
18 | fRoot = right.GetRoot(); | |
19 | } | |
20 | ||
21 | // operators | |
22 | template <class Function> | |
03896fc4 | 23 | EquationSolver<Function> & EquationSolver<Function>::operator=(const EquationSolver & right) { |
b1c2e580 | 24 | fMaxIter = right.GetMaxIterations(); |
25 | fTolerance = right.GetTolerance(); | |
26 | fA = right.GetIntervalLowerLimit(); | |
27 | fB = right.GetIntervalUpperLimit(); | |
28 | fRoot = right.GetRoot(); | |
29 | return *this; | |
30 | } | |
31 | ||
32 | template <class Function> | |
03896fc4 | 33 | Bool_t EquationSolver<Function>::operator==(const EquationSolver & right) const { |
b1c2e580 | 34 | if (this == &right) return true; |
35 | else return false; | |
36 | } | |
37 | ||
38 | template <class Function> | |
03896fc4 | 39 | Bool_t EquationSolver<Function>::operator!=(const EquationSolver & right) const { |
b1c2e580 | 40 | return !operator==(right); |
41 | } | |
42 |