-
Notifications
You must be signed in to change notification settings - Fork 1
/
enumerateModality.m
36 lines (32 loc) · 1.13 KB
/
enumerateModality.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function modality=enumerateModality(optModality)
% MODALITY = ENUMERATEMODALITY(OPTMODALITY) creates a list of optimization
% tasks given the current best modality. The optimization tasks are
% generated heuristically. For example, given that the current optimal
% modality is [2;1], we should move on to investigate [3;1] and [2;2].
%
% input:
% (1) optModality: size: Lx1
% class: double
% definition: L is the number of processes
% description: vector of the current best number of basis functions
% needed to estimate the l-th distribution
%
% output:
% (1) modality: size: LxL
% class: double
% description: a list of optimization tasks; the l-th column
% corresponds to the l-th task
%
% Author: Surya Effendy
% Date: 08/03/2019
% Declare globals
global L
% Case #1: current optimal modality is empty i.e. initialization
if isempty(optModality)
modality=ones(L,1);
else
% Case #2: given current optimal modality, we step up the complexity of
% each distribution by 1
modality=bsxfun(@plus,optModality,eye(L));
end
end