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

Detailed Description

a DataTree.INode extension for data nodes that can store information on their generation process.

Definition at line 19 of file Info.m.

Inheritance diagram for Greedy.DataTree.Info:
Inheritance graph
[legend]
Collaboration diagram for Greedy.DataTree.Info:
Collaboration graph
[legend]

Public Member Functions

function  append_field (fieldname, value)
 appends a value to an information field storing a vector More...
 
function  set_field (fieldname, value)
 sets an information field More...
 
function value = get_field (fieldname, default)
 returns the value of an information field More...
 
function value = get_field_on_active_child (fieldname,IModel model, id)
 returns the value of an information field from the active leaf node More...
 
function  set_fields (other, fns)
 copies fields from another struct More...
 
function  set_stop_flag (flag, on_off)
 sets the stop flag in this node More...
 
function  propagate_stop_flag (flag, on_off)
 updates the stop flag in all children nodes of the current one. More...
 
function
stopped_flags = 
stopped_on_active_child (flags,IModel model, id)
 returns stop flags set on the active child More...
 
function
stopped_flags = 
stopped_on_any_child (flags)
 returns stop flags set on any child of the current node More...
 
function
stopped_flags = 
stopped_on_all_leafs (flags)
 returns stop flags set on all children nodes of the current node More...
 

Public Attributes

 fields = "[]"
 a dynamically growing structure of information fields More...
 
 stop_flags = {""}
 a cell array of strings describing why the generation of this node terminated. More...
 

Member Function Documentation

function Greedy.DataTree.Info.append_field (   fieldname,
  value 
)

appends a value to an information field storing a vector

Parameters
fieldnamethe name of the information field
valuethe value to be appended (scalar or column vector)

Definition at line 52 of file Info.m.

function value = Greedy.DataTree.Info.get_field (   fieldname,
  default 
)

returns the value of an information field

Parameters
fieldnamethe name of the information field
defaultoptional default value in case the information field does not exist.
Return values
valuethe stored value

Definition at line 83 of file Info.m.

Here is the caller graph for this function:

function value = Greedy.DataTree.Info.get_field_on_active_child (   fieldname,
IModel  model,
  id 
)

returns the value of an information field from the active leaf node

Parameters
fieldnamethe name of the information field
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
valuethe stored value
Optional fields of model:
  • t —  the current time step

Definition at line 106 of file Info.m.

Here is the call graph for this function:

function Greedy.DataTree.Info.propagate_stop_flag (   flag,
  on_off 
)

updates the stop flag in all children nodes of the current one.

Parameters
flagthe flag name,
on_offboolean flag specifying whether the flag shall set or unset.

Definition at line 192 of file Info.m.

Here is the call graph for this function:

function Greedy.DataTree.Info.set_field (   fieldname,
  value 
)

sets an information field

Parameters
fieldnamethe name of the information field
valuethe new value

Definition at line 69 of file Info.m.

function Greedy.DataTree.Info.set_fields (   other,
  fns 
)

copies fields from another struct

Parameters
otheranother struct whose fields shall be copied as information fields.
fnsa cell array of strings which acts as a filter for the field names of other.

Definition at line 155 of file Info.m.

function Greedy.DataTree.Info.set_stop_flag (   flag,
  on_off 
)

sets the stop flag in this node

Parameters
flagthe flag name,
on_offboolean flag specifying whether the flag shall set or unset.

Definition at line 174 of file Info.m.

Here is the caller graph for this function:

function stopped_flags = Greedy.DataTree.Info.stopped_on_active_child (   flags,
IModel  model,
  id 
)

returns stop flags set on the active child

Parameters
flagsa cell array of flag strings for filtering
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
stopped_flagsa cell array of stop flags found after filtering. If only one flag is given in the argument flags, a boolean value is returned, indicating whether the flag is set.
Optional fields of model:
  • t —  the current time step

Definition at line 216 of file Info.m.

function stopped_flags = Greedy.DataTree.Info.stopped_on_all_leafs (   flags)

returns stop flags set on all children nodes of the current node

Parameters
flagsa cell array of flag strings for filtering
Return values
stopped_flagsa cell array of stop flags found after filtering. If only one flag is given in the argument flags, a boolean value is returned, indicating whether the flag is set.

Definition at line 301 of file Info.m.

function stopped_flags = Greedy.DataTree.Info.stopped_on_any_child (   flags)

returns stop flags set on any child of the current node

Parameters
flagsa cell array of flag strings for filtering
Return values
stopped_flagsa cell array of stop flags found after filtering. If only one flag is given in the argument flags, a boolean value is returned, indicating whether the flag is set.

Definition at line 269 of file Info.m.

Member Data Documentation

Greedy.DataTree.Info.fields = "[]"

a dynamically growing structure of information fields


Default: "[]"

Definition at line 30 of file Info.m.

Greedy.DataTree.Info.stop_flags = {""}

a cell array of strings describing why the generation of this node terminated.


Default: {""}

Definition at line 39 of file Info.m.


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