rbmatlab  1.16.09
 All Classes Namespaces Files Functions Variables Modules Pages
InfoNode.m
1 classdef InfoNode < Greedy.DataTree.Detailed.INode
2  % very simple detailed data tree node with only one child
3  %
4  % @todo Do I need it? If yes, document it.
5 
6  properties
7  % handle to the only child
8  child;
9 
10  % a descriptive name for the node
11  name;
12  end
13 
14  methods
15 
16  function ddin = InfoNode(child, name)
17  % constructor for this node
18  ddin.child = child;
19  ddin.name = name;
20  end
21 
22  function siz = get_rb_size(this)
23  siz = get_rb_size(this.child);
24  end
25 
26  function siz = get_ei_size(this)
27  siz = get_ei_size(this.child);
28  end
29 
30  function data = get(this, index)
31  if index == 1
32  data = this.child;
33  else
34  error('index exceeds dimensions');
35  end
36  end
37 
38  function [ot1, ot2, ot3] = offtime(this, rmodel)
39 
40  ot1 = 0;
41  ot2 = 0;
42  ot3 = 0;
43  end
44 
45  function index = get_index(this, id, mu, nt)
46  index = [1, get_index(this.child, id, mu, nt)];
47  end
48 
49  function tree = create_tree(this, creator, ids, mu_cube, tslice, basepath)
50  % function tree = create_tree(this, creator, ids, mu_cube, tslice, basepath)
51  % @copybrief DataTreeINodecreate_tree()
52  %
53  % @copydetails DataTreeINodecreate_tree()
54  %
55 
56  if nargin < 3
57  ids = [];
58  end
59  if nargin < 4
60  mu_cube = [];
61  end
62  if nargin < 5
63  tslice = [];
64  end
65  if nargin < 6
66  basepath = [];
67  end
68 
69  tree = create_tree(this.child, creator, ids, mu_cube, tslice, [basepath,1]);
70  end
71 
72  function children = length(this)
73  children = 1;
74  end
75 
76  function this = set(this, index, value)
77  assert(index == 1);
78  this.child = value;
79  end
80  end
81 end
DataTree implementation for generated detailed and reduced data
Definition: DuneRBLeafNode.m:2
DataTree specialization for detailed data generated by a Greedy algorithm instance.
Definition: DuneRBLeafNode.m:3
Interface class for general data tree nodes storing detailed data returned by Greedy.Interface.gen_detailed_data()
Definition: INode.m:20
Customizable implementation of an abstract greedy algorithm.
Definition: DuneRBLeafNode.m:1