GENEIAL  0.2=/
 All Classes Pages
BaseSelectionSettings.h
1 #pragma once
2 
3 #include <geneial/namespaces.h>
4 
5 #include <cassert>
6 
7 geneial_private_namespace(geneial)
8 {
9 geneial_private_namespace(operation)
10 {
11 geneial_private_namespace(selection)
12 {
13 
14 geneial_export_namespace
15 {
16 
17 
21 class BaseSelectionSettings
22 {
23 private:
24  unsigned int _numberOfParents;
25 
26 public:
27  static const constexpr unsigned int DEFAULT_NUMBER_OF_PARENTS = 5;
28 
29  virtual ~BaseSelectionSettings()
30  {
31  }
32 
33  unsigned int getNumberOfParents() const
34  {
35  return _numberOfParents;
36  }
37 
38  void setNumberOfParents(const unsigned int numberOfParents)
39  {
40  _numberOfParents = numberOfParents;
41  }
42 
43  explicit BaseSelectionSettings(const unsigned int numberOfParents = DEFAULT_NUMBER_OF_PARENTS) :
44  _numberOfParents(numberOfParents)
45  {
46  assert(_numberOfParents > 0);
47  }
48 
49 };
50 
51 } /* geneial_export_namespace */
52 } /* private namespace selection */
53 } /* private namespace operation */
54 } /* private namespace geneial */
55