a DataTree.INode extension for data nodes that can store information on their generation process.
Definition at line 19 of file Info.m.
|
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...
|
|
|
| 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...
|
|
function Greedy.DataTree.Info.append_field |
( |
|
fieldname, |
|
|
|
value |
|
) |
| |
appends a value to an information field storing a vector
- Parameters
-
fieldname | the name of the information field |
value | the 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
-
fieldname | the name of the information field |
default | optional default value in case the information field does not exist. |
- Return values
-
Definition at line 83 of file Info.m.
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
-
fieldname | the name of the information field |
model | a reduced or detailed model holding information about the selected parameters and maybe the time instant. |
id | optional parameter defining a special ID that shall be attached to the leaf element. |
- Return values
-
- Optional fields of model:
t —
the current time step
Definition at line 106 of file Info.m.
function Greedy.DataTree.Info.propagate_stop_flag |
( |
|
flag, |
|
|
|
on_off |
|
) |
| |
updates the stop flag in all children nodes of the current one.
- Parameters
-
flag | the flag name, |
on_off | boolean flag specifying whether the flag shall set or unset. |
Definition at line 192 of file Info.m.
function Greedy.DataTree.Info.set_field |
( |
|
fieldname, |
|
|
|
value |
|
) |
| |
sets an information field
- Parameters
-
fieldname | the name of the information field |
value | the new value |
Definition at line 69 of file Info.m.
function Greedy.DataTree.Info.set_fields |
( |
|
other, |
|
|
|
fns |
|
) |
| |
copies fields from another struct
- Parameters
-
other | another struct whose fields shall be copied as information fields. |
fns | a 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
-
flag | the flag name, |
on_off | boolean flag specifying whether the flag shall set or unset. |
Definition at line 174 of file Info.m.
function stopped_flags = Greedy.DataTree.Info.stopped_on_active_child |
( |
|
flags, |
|
|
IModel |
model, |
|
|
|
id |
|
) |
| |
returns stop flags set on the active child
- Parameters
-
flags | a cell array of flag strings for filtering |
model | a reduced or detailed model holding information about the selected parameters and maybe the time instant. |
id | optional parameter defining a special ID that shall be attached to the leaf element. |
- Return values
-
stopped_flags | a 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
-
flags | a cell array of flag strings for filtering |
- Return values
-
stopped_flags | a 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
-
flags | a cell array of flag strings for filtering |
- Return values
-
stopped_flags | a 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.
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:
- rbasis/basisgen/oop/+Greedy/+DataTree/Info.m