GRALE
treelensinversiongafactoryparams.h
1 /*
2 
3  This file is a part of GRALE, a library to facilitate the simulation
4  and inversion of gravitational lenses.
5 
6  Copyright (C) 2008-2012 Jori Liesenborgs
7 
8  Contact: jori.liesenborgs@gmail.com
9 
10  This program is free software; you can redistribute it and/or modify
11  it under the terms of the GNU General Public License as published by
12  the Free Software Foundation; either version 2 of the License, or
13  (at your option) any later version.
14 
15  This program is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18  GNU General Public License for more details.
19 
20  You should have received a copy of the GNU General Public License
21  along with this program; if not, write to the Free Software
22  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 
24 */
25 
26 #ifndef GRALE_TREELENSINVERSIONGAFACTORYPARAMS_H
27 
28 #define GRALE_TREELENSINVERSIONGAFACTORYPARAMS_H
29 
30 #include "graleconfig.h"
31 #include "lensinversiongafactoryparams.h"
32 #include "grid.h"
33 #include <list>
34 
35 namespace grale
36 {
37 
38 class ImagesDataExtended;
39 
40 class GRALE_IMPORTEXPORT TreeLensInversionGAFactoryParams : public LensInversionGAFactoryParams
41 {
42 public:
43  enum BasisFunctionType { PlummerBasis };
44 
45  TreeLensInversionGAFactoryParams();
46  TreeLensInversionGAFactoryParams(int maxGenerations,
47  const std::list<ImagesDataExtended *> &images,
48  Vector2D<double> center,
49  double areaSize,
50  int maxDepth,
51  int maxBasisFunctions,
52  double D_d,
53  double massScale,
54  bool copyImages,
55  double widthScaleFactor,
56  bool useWeights,
57  int firstSubdiv,
58  BasisFunctionType b = PlummerBasis);
59  ~TreeLensInversionGAFactoryParams();
60 
61  int getMaximumNumberOfGenerations() const { return m_maxGenerations; }
62  double getD_d() const { return m_Dd; }
63  double getMassScale() const { return m_massScale; }
64  const std::list<ImagesDataExtended *> &getImages() const { return m_images; }
65  BasisFunctionType getBasisFunctionType() const { return m_basisFunctionType; }
66  Vector2D<double> getCenter() const { return m_center; }
67  double getAreaSize() const { return m_areaSize; }
68  int getMaxTreeDepth() const { return m_maxDepth; }
69  int getMaxBasisFunctions() const { return m_maxBasisFunctions; }
70  double getWidthScaleFactor() const { return m_widthScaleFactor; }
71  bool useWeights() const { return m_useWeights; }
72  int getInitialSubdivision() const { return m_firstSubdiv; }
73 
74  bool write(serut::SerializationInterface &si) const;
75  bool read(serut::SerializationInterface &si);
76 private:
77  int m_maxGenerations;
78  bool m_deleteImages;
79  double m_Dd, m_massScale;
80  std::list<ImagesDataExtended *> m_images;
81  BasisFunctionType m_basisFunctionType;
82  Vector2D<double> m_center;
83  double m_areaSize;
84  double m_widthScaleFactor;
85  int m_maxDepth, m_maxBasisFunctions;
86  bool m_useWeights;
87  int m_firstSubdiv;
88 };
89 
90 } // end namespace
91 
92 #endif // GRALE_TREELENSINVERSIONGAFACTORYPARAMS_H