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
Domain.m
Go to the documentation of this file.
1 namespace sampling{
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 
18 class Domain
19  :public handle {
38  public:
39 
57  .vector<logical> Locations;
70  public:
71 
72  Domain(points,locations) {
73  if size(points,2) ~= size(locations,2)
74  error(" Column count of point matrix and number of location flags must be the same. ");
75  end
76  this.Points= points;
77  this.Locations= locations;
78  }
79 
80 
81  function [matrix<double>params , rowvec<integer>idx ] = filter(matrix<double> params) {
82  nn = dsearchn(this.Points" , params ");
83  idx = find(this.Locations(nn));
84  params = params(:, idx);
85  }
101 #if 0 //mtoc++: 'set.Locations'
102 function Locations(value) {
103  if ~islogical(value)
104  error(" Locations must be a logical row vector. ");
105  end
106  this.Locations= value;
107  }
108 
109 #endif
110 
111 
117 };
118 }
119 
function [ matrix< double > params , rowvec< integer > idx ] = filter(matrix< double > params)
Filters from the given parameters only those that belong to this domain.
Definition: Domain.m:81
Matlab's base handle class (documentation generation substitute)
A boolean value.
Domain(points, locations)
Definition: Domain.m:72
matrix< double > Points
Samples from the full parameter domain box specified by the parameter's MinVal and MaxVal...
Definition: Domain.m:40
vector< logical > Locations
Logical vector specifying which of the points in Points are valid.
Definition: Domain.m:57
Domain:
Definition: Domain.m:18