KerMor  0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ModelParam.m
Go to the documentation of this file.
1 namespace data{
2 
3 
4 /* (Autoinserted by mtoc++)
5  * This source code has been filtered by the mtoc++ executable,
6  * which generates code that can be processed by the doxygen documentation tool.
7  *
8  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
9  * Except for the comments, the function bodies of your M-file functions are untouched.
10  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
11  * attached source files that are highly readable by humans.
12  *
13  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
14  * the correct locations in the source code browser.
15  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
16  */
17 
19  :public handle {
43  public:
44 
45  char Name = "New Parameter";
79  char Spacing = "lin";
104  public: /* ( Dependent ) */
105 
119  ::@double MaxVal;
132  .boolean HasRange;
146  public: /* ( Dependent ) */
147 
148  ModelParam(char name,double default,varargin) {
149 
150  this.Name= name;
151  this.Default= default;
152 
153 
154  i.addParamValue('Desired',1);
155  i.addParamValue('Range',[default * .9 default*1.1]);
156  i.addParamValue('Spacing','lin');
157  i.parse(varargin[:])
158  r = i.Results;
159  this.Desired= r.Desired;
160  this.Range= r.Range;
161  this.Spacing= r.Spacing;
162  }
189 #if 0 //mtoc++: 'set.Name'
190 function Name(value) {
191  if ~ischar(value)
192  error(" name should be a character field ");
193  end
194  this.Name= value;
195  }
196 
197 #endif
198 
199 
200 
201 #if 0 //mtoc++: 'set.Range'
202 function Range(range) {
203  if isscalar(range)
204  range = [range range];
205  end
206  if range(2) < range(1)
207  error(" Invalid range: MinVal must be greater or equal to MaxVal. ");
208  end
209  this.Range= range;
210  }
211 
212 #endif
213 
220 #if 0 //mtoc++: 'set.Desired'
221 function Desired(value) {
222  if value < 0 || ~isscalar(value)
223  error(" Desired must be a positive integer greater than zero. ");
224  end
225  this.Desired= value;
226  }
227 
228 #endif
229 
230 
231 
232 #if 0 //mtoc++: 'set.Default'
233 function Default(value) {
234  if isempty(value) || ~isscalar(value)
235  error(" Default must be a scalar double ");
236  end
237  this.Default= value;
238  }
239 
240 #endif
241 
242 
243 
244 #if 0 //mtoc++: 'set.Spacing'
245 function Spacing(value) {
246  if ~ischar(value) || ~any(strcmp(value,[" lin "," log "]))
247  error(" Spacing can either be 'lin' or 'log'. ");
248  end
249  this.Spacing= value;
250  }
251 
252 #endif
253 
254 
255 
256 
257 #if 0 //mtoc++: 'get.MinVal'
258 function value = MinVal() {
259  value = this.Range(1);
260  }
261 
262 #endif
263 
264 
265 
266 #if 0 //mtoc++: 'get.MaxVal'
267 function value = MaxVal() {
268  value = this.Range(2);
269  }
270 
271 #endif
272 
273 
274 
275 #if 0 //mtoc++: 'get.HasRange'
276 function value = HasRange() {
277  value = abs(this.MinVal - this.MaxVal) > 10*eps;
278  }
279 
280 #endif
281 
282 
319 };
320 }
321 
322 
323 
char Spacing
Sets the desired sampling type for random or grid sampling.
Definition: ModelParam.m:79
double MaxVal
The minimum value of the parameters Range.
Definition: ModelParam.m:119
integer Desired
For Sampling: The desired number of samples. This field may be used differently, refer to the samplin...
Definition: ModelParam.m:65
double MinVal
The maximum value of the parameter's data.ModelParam.Range.
Definition: ModelParam.m:106
ModelParam(char name,double default, varargin)
Creates a new model parameter.
Definition: ModelParam.m:148
A double value.
char Name
The Name of the Parameter.
Definition: ModelParam.m:45
boolean HasRange
Flag that indicates if this parameter is constant or has a range to vary within.
Definition: ModelParam.m:132
An integer value.
Matlab's base handle class (documentation generation substitute)
double Default
The default value of this parameter.
Definition: ModelParam.m:92
A variable number of input arguments.
Stores model parameters.
Definition: ModelParam.m:18
double Range
The range of the values the parameter may take.
Definition: ModelParam.m:55
A MatLab character array.