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
BaseKernel.m
Go to the documentation of this file.
1 namespace kernels{
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 KerMorObject,
20  public ICloneable {
43  public: /* ( setObservable ) */
44 
65  matrix<double> P = "[]";
86  public:
87 
88  logical IsRBF = false;
105  logical IsScProd = false;
121  protected:
122 
123  fG = 1;
124 
125  fP = "[]";
126 
127 
128  public:
129 
131  this = this@KerMorObject;
132  this.registerProps(" P ", " G ");
133  }
134 
135 
136  function fcn = getLipschitzFunction() {
137  fcn = @this.getGlobalLipschitz;
138  }
155  function bool = eq(B) {
156  bool = eq@KerMorObject(A,B) && isequal(A.fP, B.fP) && ...
157  isequal(A.fG, B.fG) && A.IsRBF == B.IsRBF && A.IsScProd == B.IsScProd;
158  }
169  function copy = clone(copy) {
170  copy.G= this.G;
171  copy.P= this.P;
172  copy.IsRBF= this.IsRBF;
173  copy.IsScProd= this.IsScProd;
174  }
175 
176 
177  /* % Getter & Setter */
178  public:
179 
180 
181 #if 0 //mtoc++: 'get.G'
182 function G = G() {
183  G = this.fG;
184  }
185 
186 #endif
187 
188 
189 
190 #if 0 //mtoc++: 'get.P'
191 function P = P() {
192  P = this.fP;
193  }
194 
195 #endif
196 
197 
198 
199  public: /* ( Abstract ) */
200 
201  virtual function K = evaluate(matrix<double> x,matrix<double> y) = 0;
215  virtual function Nabla = getNabla(x,y) = 0;
230  virtual function c = getGlobalLipschitz() = 0;
249 };
250 }
251 
252 
253 
ICLONEABLE Interface for cloneable handle classes.
Definition: ICloneable.m:17
logical IsRBF
Flag that determines if the current kernel is a radial basis function, i.e. its evaluation is of the ...
Definition: BaseKernel.m:88
Base class for any KerMor class.
Definition: KerMorObject.m:17
function registerProps(varargin)
Call this method at any class that defines DPCM observed properties.
Definition: DPCMObject.m:125
virtual function Nabla = getNabla(x, y)
Computes the partial derivatives with respect to each component of the first argument.
virtual function c = getGlobalLipschitz()
Returns the global lipschitz constant of this kernel.
A boolean value.
KerMorObject()
Constructs a new KerMor object.
Definition: KerMorObject.m:55
function fcn = getLipschitzFunction()
Method that allows error estimators to obtain a lipschitz constant estimation function from this kern...
Definition: BaseKernel.m:136
function copy = clone(copy)
The interface method with returns a copy of the current class instance.
Definition: BaseKernel.m:169
matrix< double > P
Projection/selection matrix for argument components.
Definition: BaseKernel.m:65
logical IsScProd
Flag that determines if the current kernel bases on scalar product evaluations, i.e. are of the form for some scalar function .
Definition: BaseKernel.m:105
function bool = eq(B)
Checks if a kernel equals another kernel.
Definition: BaseKernel.m:155
virtual function K = evaluate(matrix< double > x,matrix< double > y)
Evaluation method for the current kernel.
Base class for all KerMor Kernels.
Definition: BaseKernel.m:18
matrix< double > G
The matrix that induces the state space scalar product and norm to use.
Definition: BaseKernel.m:45