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
DefaultSelector.m
Go to the documentation of this file.
1 namespace data{
2 namespace selection{
3 
4 
5 /* (Autoinserted by mtoc++)
6  * This source code has been filtered by the mtoc++ executable,
7  * which generates code that can be processed by the doxygen documentation tool.
8  *
9  * On the other hand, it can neither be interpreted by MATLAB, nor can it be compiled with a C++ compiler.
10  * Except for the comments, the function bodies of your M-file functions are untouched.
11  * Consequently, the FILTER_SOURCE_FILES doxygen switch (default in our Doxyfile.template) will produce
12  * attached source files that are highly readable by humans.
13  *
14  * Additionally, links in the doxygen generated documentation to the source code of functions and class members refer to
15  * the correct locations in the source code browser.
16  * However, the line numbers most likely do not correspond to the line numbers in the original MATLAB source files.
17  */
18 
20  :public data.selection.ASelector {
41  public:
42 
43  function copy = clone() {
44  copy = data.selection.DefaultSelector;
45  /* copy = clone@data.selection.ASelector(this, copy); */
46  }
47 
48 
49  protected: /* ( Sealed ) */
50 
51  function [data.FileMatrixxi , rowvecti , matrixmui , fxi ] = select(models.BaseFullModel model) {
52 
53  md = model.Data;
54  td = md.TrajectoryData;
55  nt = td.getNumTrajectories;
56  xi = [];
57  ti = [];
58  mui = [];
59  len = length(model.Times);
60  if nt > 0
61  [xdim, mudim] = td.getTrajectoryDoFs;
62  xi = data.FileMatrix(xdim,nt*len," Dir ",md.DataDirectory);
63  ti = zeros(1,nt*len);
64  if mudim > 0
65  mui = zeros(mudim,nt*len);
66  end
67  for k=1:nt
68  [x, mu] = td.getTrajectoryNr(k);
69  pos = (k-1)*len+1:k*len;
70  xi(:,pos) = x;
71  ti(pos) = model.Times;
72  if mudim > 0
73  mui(:,pos) = repmat(mu,1,size(x,2));/* #ok */
74 
75  end
76  end
77  end
78  fxi = [];
79  }
99 };
100 }
101 }
102 
Selects all training data.
Base interface for any approximation training data selection algorithm.
Definition: ASelector.m:19
The base class for any KerMor detailed model.
Definition: BaseFullModel.m:18
Times
Evaluation points of the model.
Definition: BaseModel.m:206
function [ data.FileMatrix xi , rowvec ti , matrix mui , fxi ] = select(models.BaseFullModel model)
Selects ALL the trajectory data as training.
virtual function n = getNumTrajectories()
Gets the total number of trajectories.
data.ModelData Data
The full model's data container. Defaults to an empty container.
data.ATrajectoryData TrajectoryData
The trajectory training data for the full model (only complete trajectories!)
Definition: ModelData.m:63