New generator: TUHKMgen
[u/mrichter/AliRoot.git] / TUHKMgen / UHKM / EquationSolver.cxx
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, 2006                                
6
7 */
8 //This equation solver class is taken from GEANT4 and modified!!
9
10 #ifndef NAEquationSolver_h
11 #include "EquationSolver.h"
12 #endif
13
14 template <class Function> 
15 NAEquationSolver<Function>::NAEquationSolver(const NAEquationSolver & right) {
16   fMaxIter = right.GetMaxIterations();
17   fTolerance = right.GetTolerance();
18   fA = right.GetIntervalLowerLimit();
19   fB = right.GetIntervalUpperLimit();
20   fRoot = right.GetRoot();
21 }
22
23 // operators
24 template <class Function> 
25 NAEquationSolver<Function> & NAEquationSolver<Function>::operator=(const NAEquationSolver & right) {
26   fMaxIter = right.GetMaxIterations();
27   fTolerance = right.GetTolerance();
28   fA = right.GetIntervalLowerLimit();
29   fB = right.GetIntervalUpperLimit();
30   fRoot = right.GetRoot();
31   return *this;
32 }
33
34 template <class Function> 
35 Bool_t NAEquationSolver<Function>::operator==(const NAEquationSolver & right) const {
36   if (this == &right) return true;
37   else return false;
38 }
39
40 template <class Function> 
41 Bool_t NAEquationSolver<Function>::operator!=(const NAEquationSolver & right) const {
42   return !operator==(right);
43 }
44