VPTissue Reference Manual
RangeSweep.h
Go to the documentation of this file.
1 #ifndef SIMPT_PAREX_RANGE_SWEEP_H_
2 #define SIMPT_PAREX_RANGE_SWEEP_H_
3 /*
4  * Copyright 2011-2016 Universiteit Antwerpen
5  *
6  * Licensed under the EUPL, Version 1.1 or as soon they will be approved by
7  * the European Commission - subsequent versions of the EUPL (the "Licence");
8  * You may not use this work except in compliance with the Licence.
9  * You may obtain a copy of the Licence at: http://ec.europa.eu/idabc/eupl5
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the Licence is distributed on an "AS IS" basis,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the Licence for the specific language governing
15  * permissions and limitations under the Licence.
16  */
22 #include "ISweep.h"
23 
24 namespace SimPT_Parex {
25 
29 class RangeSweep : public ISweep
30 {
31 public:
38  RangeSweep(double from, double to, double step);
39 
47  RangeSweep(const boost::property_tree::ptree& pt);
48 
52  virtual ~RangeSweep() {}
53 
57  virtual RangeSweep *Clone() const { return new RangeSweep(*this); }
58 
62  double GetFrom() const { return m_from; }
63 
67  double GetTo() const { return m_to; }
68 
72  double GetStep() const { return m_step; }
73 
74 
75  virtual unsigned int GetNumberOfValues() const;
76 
81  virtual std::string GetValue(unsigned int index) const;
82 
93  virtual boost::property_tree::ptree ToPtree() const;
94 
95 private:
101  void ReadPtree(const boost::property_tree::ptree& pt);
102 
103 private:
104  double m_from;
105  double m_to;
106  double m_step;
107 };
108 
109 } // namespace
110 
111 #endif // end-of-include-guard
double GetTo() const
Gets the to value of the range.
Definition: RangeSweep.h:67
virtual RangeSweep * Clone() const
Polymorphic copy constructor.
Definition: RangeSweep.h:57
An interface class for a parameter sweep.
Definition: ISweep.h:31
double GetStep() const
Gets the step value of the range.
Definition: RangeSweep.h:72
double GetFrom() const
Gets the from value of the range.
Definition: RangeSweep.h:62
A sweep over a range of numerical parameters.
Definition: RangeSweep.h:29
RangeSweep(double from, double to, double step)
Constructor.
Definition: RangeSweep.cpp:29
Namespace for SimPT parameter explorer package.
Definition: Client.cpp:52
virtual std::string GetValue(unsigned int index) const
Returns the value on the given index.
Definition: RangeSweep.cpp:39
virtual boost::property_tree::ptree ToPtree() const
Convert the range sweep to a ptree.
Definition: RangeSweep.cpp:53
Interface class ISweep.
virtual unsigned int GetNumberOfValues() const
Returns the number of values in the sweep.
Definition: RangeSweep.cpp:48