KerMor
0.9
Model order reduction for nonlinear dynamical systems and nonlinear approximation
|
MonomialIterator: Create list of d-dim monomials. More...
MonomialIterator: Create list of d-dim monomials.
For a given dimension, this class produces an infinite list of monomials which increase in degree as all monomials of the last degree have been listed. The natural ordering of the monomials is degree first, then lexographically. Example for d=3: \(0,z,x,y,zz,zy,zx,yy,yx,xx,zzz,zzy,zzx,zyy,zyx\ldots\)
Note that the zero-monomial is not included in the list, however, it can be accessed via the extra method getNullMonomial.
This class is part of the framework
Homepage
http://www.morepas.org/software/index.htmlDocumentation
http://www.morepas.org/software/kermor/index.htmlLicense
KerMor license conditions Definition at line 17 of file MonomialIterator.m.
Public Member Functions | |
MonomialIterator (integer dim) | |
Creates a new monomial iterator. More... | |
function colvec < double > alpha = | getNullMonomial () |
Get the monomial of degree zero. More... | |
function [
colvec< double > alpha , int32 deg , exps ] = | nextMonomial () |
Returns the next monomial in the sequence. More... | |
function colvec< int32 > alpha = | getRandMonomial (int32 deg) |
Returns a random monomial. More... | |
Static Public Member Functions | |
static function logical res = | test_MonomialIterator () |
Tests the MonomialIterator for two test cases. More... | |
Public Attributes | |
Dim | |
Public Attributes inherited from handle | |
addlistener | |
Creates a listener for the specified event and assigns a callback function to execute when the event occurs. More... | |
notify | |
Broadcast a notice that a specific event is occurring on a specified handle object or array of handle objects. More... | |
delete | |
Handle object destructor method that is called when the object's lifecycle ends. More... | |
disp | |
Handle object disp method which is called by the display method. See the MATLAB disp function. More... | |
display | |
Handle object display method called when MATLAB software interprets an expression returning a handle object that is not terminated by a semicolon. See the MATLAB display function. More... | |
findobj | |
Finds objects matching the specified conditions from the input array of handle objects. More... | |
findprop | |
Returns a meta.property objects associated with the specified property name. More... | |
fields | |
Returns a cell array of string containing the names of public properties. More... | |
fieldnames | |
Returns a cell array of string containing the names of public properties. See the MATLAB fieldnames function. More... | |
isvalid | |
Returns a logical array in which elements are true if the corresponding elements in the input array are valid handles. This method is Sealed so you cannot override it in a handle subclass. More... | |
eq | |
Relational functions example. See details for more information. More... | |
transpose | |
Transposes the elements of the handle object array. More... | |
permute | |
Rearranges the dimensions of the handle object array. See the MATLAB permute function. More... | |
reshape | |
hanges the dimensions of the handle object array to the specified dimensions. See the MATLAB reshape function. More... | |
sort | |
ort the handle objects in any array in ascending or descending order. More... | |
MonomialIterator.MonomialIterator | ( | integer | dim | ) |
Creates a new monomial iterator.
dim | The target dimension \(d\in\N\) |
Definition at line 62 of file MonomialIterator.m.
References Dim.
Referenced by test_MonomialIterator().
Get the monomial of degree zero.
alpha | The multiindex of size \(1\times d\) with zero entries, corresponding to the zero degree monomial. |
Definition at line 80 of file MonomialIterator.m.
References Dim.
function colvec< int32 > alpha = MonomialIterator.getRandMonomial | ( | int32 | deg | ) |
Returns a random monomial.
deg | The degree \(p = |\alpha|\) of the monomial. |
alpha | The multiindex \(\alpha\in\Z^d\) corresponding to the exponents of the current monomial |
Definition at line 141 of file MonomialIterator.m.
References Dim.
Returns the next monomial in the sequence.
alpha | The multiindex \(\alpha\in\Z^d\) corresponding to the exponents of the current monomial |
deg | The degree \(p = |\alpha|\) of the monomial |
exps | (Debug) The indices of \((1 \ldots d)\) at which an exponent is to be added. |
Connection | A histogram search of exps with bins \((1 \ldots d)\) results in \(\alpha\) |
Definition at line 92 of file MonomialIterator.m.
|
static |
Tests the MonomialIterator for two test cases.
res | True if successful, false else |
Definition at line 163 of file MonomialIterator.m.
References all(), Dim, Utils.implode(), and MonomialIterator().
MonomialIterator.Dim |
Definition at line 46 of file MonomialIterator.m.
Referenced by getNullMonomial(), getRandMonomial(), MonomialIterator(), nextMonomial(), and test_MonomialIterator().