]>
Commit | Line | Data |
---|---|---|
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 | ////////////////////////////////////////////////////////////////////////////////// | |
9 | ||
10 | #include "EquationSolver.h" | |
11 | ||
12 | template <class Function> | |
13 | EquationSolver<Function>::EquationSolver(const EquationSolver & right) { | |
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> | |
23 | EquationSolver<Function> & EquationSolver<Function>::operator=(const EquationSolver & right) { | |
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> | |
33 | Bool_t EquationSolver<Function>::operator==(const EquationSolver & right) const { | |
34 | if (this == &right) return true; | |
35 | else return false; | |
36 | } | |
37 | ||
38 | template <class Function> | |
39 | Bool_t EquationSolver<Function>::operator!=(const EquationSolver & right) const { | |
40 | return !operator==(right); | |
41 | } | |
42 |