-
Notifications
You must be signed in to change notification settings - Fork 3
/
MASSEFseparator.m
63 lines (52 loc) · 1.76 KB
/
MASSEFseparator.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
classdef MASSEFseparator < handle
%MASSEFseparator Abstract base class for MASSEF separation algorithms
%
% MASSEFseparator properties:
% label - A label for the instance of the algorithm (shown in
% the results file).
% estTag - Tags for the estimated outputs.
%
% MASSEFseparator methods:
% MASSEFseparator - Create an instance of the algorithm.
% separate - Run the separation algorithm on the time-domain
% mixture (Abstract).
%
% Note that this is a handle class and hence derived classes are passed
% by reference.
%
% See also MASSEF.
% Copyright 2016 University of Surrey.
properties
label % A label for the instance of the algorithm (shown in the MASSEF results file)
estTag % Tags for the estimated outputs
end
methods
% constructor
function obj = MASSEFseparator()
obj.label = '';
obj.estTag = '';
end
% set estTag
function set.estTag(obj,val)
if ischar(val)
obj.estTag = cellstr(val);
elseif iscellstr(val)
obj.estTag = val;
else
error('MASSEFseparator:estTag:invalid','''estTag'' must be a char array or cell array of strings');
end
end
% set label
function set.label(obj,val)
if ischar(val)
obj.label = val;
else
error('MASSEFseparator:label:invalid','''label'' must be a char array');
end
end
end
methods (Abstract)
% separation
[signal,mask,est_azis,est_eles] = separate(obj,mixture);
end
end