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

Detailed Description

Default implementation for a DataTree.INode.

This class implements the methods get(), get_index(), set() and length().

Definition at line 18 of file DefaultNode.m.

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

Public Member Functions

function data = get (index)
 Access to a child of the current node. More...
 
function path = get_index (id, mu, nt)
 Obtains the leaf index vector that best fits the child description given by the three arguments. More...
 
function
children = 
length ()
 Returns the number of children of the node. More...
 
function this = set (index, value)
 Sets a child at the given path in the tree hierarchy. 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...
 
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...
 

Public Attributes

 values = "[]"
 cell array of DataTree.INode elements, holding the childrens of this DataTree.INode. More...
 

Member Function Documentation

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

Access to a child of the current node.

Access a children node by an index which is usually retrieved by a call to get_index()

Parameters
indexvector describing the father-child relation
Return values
datathe children node

Implements DataTree.INode.

Reimplemented in DataTree.IdMapNode.

Definition at line 45 of file DefaultNode.m.

Here is the call graph for this function:

function path = DataTree.DefaultNode.get_index (   id,
  mu,
  nt 
)
virtual

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

Todo:
add get_indices method returning indices in a range

The leaf child description consists of an

  • id string,
  • a parameter vector and
  • a time step number.
Parameters
ida string id filtered through an DataTree.IdMapNode in the tree hierarchy.
mua parameter vector filtered through a DataTree.PpartNode instance in the tree hierarchy.
ntan integer corresponding to a time step index filtered through a DataTree.TpartNode instance in the tree hierarchy.
Return values
indexthe most-specific (longest possible) index vector leading to a DataTree.ILeafNode element matching the child description.

Implements DataTree.INode.

Reimplemented in DataTree.IdMapNode, and DataTree.TpartNode.

Definition at line 62 of file DefaultNode.m.

function children = DataTree.DefaultNode.length ( )
virtual

Returns the number of children of the node.

For leaf elements this method should return 0.

Return values
childrenthe number of childres of the current node

Implements DataTree.INode.

Definition at line 76 of file DefaultNode.m.

Here is the caller graph for this function:

function this = DataTree.DefaultNode.set (   index,
  value 
)
virtual

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

Usually this method is used to set a leaf data node with attached data.

Parameters
indexthe path index where the node shall be injected
valuethe node that shall be attached as a child
Return values
thisthe modified DataTree node.

Implements DataTree.INode.

Definition at line 87 of file DefaultNode.m.

Here is the call graph for this function:

Member Data Documentation

DataTree.DefaultNode.values = "[]"

cell array of DataTree.INode elements, holding the childrens of this DataTree.INode.


Default: "[]"

Definition at line 33 of file DefaultNode.m.


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