rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
List of all members | Public Member Functions
DataTree.ILeafNode Class Reference

Detailed Description

Interface for a leaf node of a data tree.

See DataTree.INode for more information on data trees:

Definition at line 18 of file ILeafNode.m.

Inheritance diagram for DataTree.ILeafNode:
Inheritance graph
[legend]
Collaboration diagram for DataTree.ILeafNode:
Collaboration graph
[legend]

Public Member Functions

function
children = 
length ()
 Returns the number of children of the node. More...
 
function index = get_index (dummy2, dummy3, dummy)
 Obtains the leaf index vector that best fits the child description given by the three arguments. More...
 
function this = set (dummy2,DataTree.INode value)
 Sets a child at the given path in the tree hierarchy. More...
 
function data = get (index)
 Access to a child of the current node. More...
 
function DataTree.ILeafNode node = get_active_leaf (DataTree.IModel model, id)
 retuns the leaf element for the current IDetailedModel configuration. More...
 
function tree = create_tree (creator, ids, mu_cube, tslice, basepath)
 Creates a new tree from a subtree specified by ids, parameter and time index regions. More...
 
- Public Member Functions inherited from DataTree.INode
virtual function DataTree.INode tree = create_tree (DataTree.ICreator creator, ids, mu_cube, tslice, basepath)
 Creates a new tree from a subtree specified by ids, parameter and time index regions. More...
 
virtual function this = set (index, value)
 Sets a child at the given path in the tree hierarchy. More...
 
function  leaf_func (funcptr, ids, mu_cube, tslice)
 applies a function to all leafs of a DataTree More...
 
function tree = create_scalar_tree (funcptr, ids, mu_cube, tslice)
 copies the current trees with different leafs. These leafs are computes by a function returning scalar values. More...
 
function
start_index = 
traverse_start ()
 Start iterator for a full traverse of the DataTree. More...
 
function
next_index = 
traverse_next (this_index)
 iterator for a full traverse of the DataTree. More...
 
function
description = 
get_active_leaf_description (IModel model, ids)
 returns an enumeration of all leaves' basepath index vectors with a description of their parents. More...
 
function
description = 
get_leaf_description (ids, mu_cube, tslice)
 returns an enumeration of all leaves' basepath index vectors with a description of their parents. More...
 
function tstop = index_valid_till (index)
 Returns the last valid time step index of a time slice. More...
 
function INode data = get_by_description (id, mu, nt)
 A combination of get_index() and get() More...
 
function
active_leaf_index = 
get_active_leaf_index (IModel model, id)
 retuns the leaf element index for the current IDetailedModel configuration. More...
 
function DataTree.LeafNode
active_leaf = 
get_active_leaf (IModel model, id)
 retuns the leaf element for the current IDetailedModel configuration. More...
 
function  display (fn, basepath, name)
 overwrites the standard display method for DataTree objects More...
 
function lines = disp_node (basepath, fn)
 returns a cell array of strings with information on the node. More...
 

Member Function Documentation

function tree = DataTree.ILeafNode.create_tree (   creator,
  ids,
  mu_cube,
  tslice,
  basepath 
)

Creates a new tree from a subtree specified by ids, parameter and time index regions.

The method creates a new DataTree for all nodes tagged by an id in ids, lying in the time slice given by tslice and inside the parameter space region given by mu_rect. At each of these nodes a method from a creator is called to build the tree.

Parameters
creatoran object creating the new tree.
idsa cell array of ids which shall be filtered. An empty cell array means that all ids are accepted. (default = [])
mu_cubea 1x2-cell array of vectors { lower_left, upper_right } specifying the lower left and the upper right corner of a cube in the parameter space for filtering parameter vectors. An empty array disables the filtering (default = []).
tslicea 2D vector specifying an interval of time step indices for time slicing. An empty vector disables the filtering (default = [])
basepatha vector specifying the relation of the current node to the parent node at which the merge began.
Return values
treethe newly created tree

Default implementation: This method calls DataTree.ICreator.create_leaf_node() method of the creator argument.

Definition at line 114 of file ILeafNode.m.

Here is the caller graph for this function:

function data = DataTree.ILeafNode.get (   index)
virtual

Access to a child of the current node.

Default implementation

Parameters
indexthe index needs to be empty.
Return values
datareturns this data leaf node

Implements DataTree.INode.

Definition at line 83 of file ILeafNode.m.

function DataTree.ILeafNode node = DataTree.ILeafNode.get_active_leaf ( DataTree.IModel  model,
  id 
)

retuns the leaf element for the current IDetailedModel configuration.

Todo:
rename this method to get_leaf
Parameters
modela reduced or detailed model holding information about the selected parameters and maybe the time instant.
idoptional parameter defining a special ID that shall be attached to the leaf element.
Return values
active_leafleaf element to be returned.
Optional fields of model:
  • descr —  ModelDescr object specifying the problem discretization
  • descr.t —  current time step number

Definition at line 100 of file ILeafNode.m.

function index = DataTree.ILeafNode.get_index (   dummy2,
  dummy3,
  dummy 
)
virtual

Obtains the leaf index vector that best fits the child description given by the three arguments.

Default implementation

Parameters
dummy2dummy2
dummy3dummy3
dummydummy
Return values
index=[]

Implements DataTree.INode.

Definition at line 46 of file ILeafNode.m.

function children = DataTree.ILeafNode.length ( )
virtual

Returns the number of children of the node.

Default implementation

Return values
children=0

Implements DataTree.INode.

Definition at line 32 of file ILeafNode.m.

Here is the caller graph for this function:

function this = DataTree.ILeafNode.set (   dummy2,
DataTree.INode  value 
)

Sets a child at the given path in the tree hierarchy.

Default implementation

Parameters
dummy2dummy2
valueobject which replaces the leaf node with a new data tree.
Return values
thisreference to newly set data node

Definition at line 65 of file ILeafNode.m.


The documentation for this class was generated from the following file: