2 % Interface
class for parameter sample classes that allow the adaptive
3 % refinement of the sampling
6 % cell array of samples that are generated during refinement cycle
9 % cell array of elements which are refined at each refinement step
10 refined_elements = {};
16 % function cogs = cogs(this);
17 % returns the center of gravity of sample cells (in case the sample can be
20 % Usually the center of gravity of grid cells is a new sample vector in
21 % case the element is refined.
24 % cogs: a matrix with sample vectors as row vectors
26 % @todo Maybe this should be renamed to refinement_candidates, because
27 % otherwise it is restricted to grids.
29 max_vertex = elementwise_maximum_of_vertex_values(this, values);
30 % function max_vertex = elementwise_maximum_of_vertex_values(this, values);
31 % returns `\max_{v \in V(e)} \text{val}_v`
for each sample cell `e` (in
32 %
case the sample can be viewed as a grid with vertices as sample vectors)
35 % max_vertex: vector of maxima as described above
37 this = refine(
this, elems);
38 %
function this = refine(
this, elems);
39 % refines the
object at the the given elements
41 % At each refinement, the refined elements and the previous sample is added
42 % to the cell arrays #sample_history and #refined_elements
45 % elems: A vector of element indices to be refined
50 level = get_refinement_levels(
this);
51 %
function level = get_refinement_levels(
this);
52 % returns the number of refinement steps
for each sample element
55 % level: a vector with number of refinement steps
for each sample element
57 skips = skipped_refinements(
this);
58 %
function skips = skipped_refinements(
this);
59 % determines
for every sample element how often it was skipped during the
60 % last refinement steps.
63 % skips: a vector of the number of skips
for each sample element.
68 function sample = get_sample_at_ref_level(
this, ref_level)
69 %
function sample = get_sample_at_ref_level(
this, ref_level)
70 % helper
function returning the sample at a given refinement level
73 % ref_level: the refinement level
76 % sample: the parameter sample how it looked like before refinement
79 if ref_level > length(this.sample_history)
82 sample = this.sample_history{ref_level};
Interface class for parameter sample classes that allow the adaptive refinement of the sampling...
Interface for parameter sampling classes producing discrete parameter sample in the parameter space ...