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
JoinedBlockData.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 data.ABlockedData {
38  private:
39 
40  td1;
41 
42  td2;
43 
44 
45  public:
46 
47  JoinedBlockData(data1,data2) {
48  if ~isa(data1," data.ABlockedData ") || ~isa(data2," data.ABlockedData ")
49  error(" Only joins of two blocked data instances are allowed ");
50  elseif size(data1,1) ~= size(data2,1)
51  error(" Can only join blocked data with equal sized first dimensions ");
52  end
53  this.td1= data1;
54  this.td2= data2;
55  }
56 
57 
58  function prod = mtimes() {
59  error(" Not yet implemented. ");
60  }
61 
62 
63  function n = getNumBlocks() {
64  n = this.td1.getNumBlocks + this.td2.getNumBlocks;
65  }
66 
67 
68  function B = getBlock(nr) {
69  t1len = this.td1.getNumBlocks;
70  if nr <= t1len
71  B = this.td1.getBlock(nr);
72  else
73  B = this.td2.getBlock(nr-t1len);
74  end
75  }
76 
77 
78  function [n , m ] = size(dim) {
79  n = [size(this.td1,1) size(this.td1,2)+size(this.td2,2)];
80  if nargin == 2
81  if dim > 0 && dim < 3
82  n = n(dim);
83  else
84  n = 0;
85  end
86  elseif nargout == 2
87  m = n(2);
88  n = n(1);
89  end
90  }
91 
92 
93 };
94 }
95 
function [ n , m ] = size(dim)
function B = getBlock(nr)
function n = getNumBlocks()
ABlockedData: General abstract class that allows computation of and SVD on a large matrix that is sep...
Definition: ABlockedData.m:18
function prod = mtimes()
JoinedBlockData(data1, data2)
JoinedBlockData: