-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathszset.m
73 lines (64 loc) · 2.07 KB
/
szset.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
64
65
66
67
68
69
70
71
72
73
classdef szset < optset
% SZSET is the options structure for the szego kernel.
%
% opts = szset('name', value, ...)
% Creates option structure for szego via name/value pairs.
%
% Properties:
% numCollPts -- Number of collcation points.
% kernSolMethod -- Solver method.
% newtonTol -- Newton iteration tolerance.
% trace -- Print out solution trace information.
% numFourierPts -- Default size of FFT to employ.
%
% Methods:
% defaults(szset)
% Shows properties which may be set along with defaults.
%
% See also szego.
% This file is a part of the CMToolkit.
% It is licensed under the BSD 3-clause license.
% (See LICENSE.)
% Copyright Toby Driscoll, 2014.
% Written by Everett Kropf, 2014.
properties
confCenter % Conformal center.
numCollPts % Number of collcation points.
kernSolMethod % Solver method.
newtonTol % Newton iteration tolerance.
trace % Print out solution trace information.
numFourierPts % Default size of FFT to employ.
end
properties(Access=protected)
proplist = ...
{
'confCenter', 0, ...
@szset.isScalarDouble, '[ scalar double {0} ]'
'numCollPts', 512, ...
@szset.isPosInteger, '[ integer {512} ]'
'kernSolMethod', 'auto', ...
@szset.isOkMethod, '[ backslash | orth_resid | {auto} ]'
'newtonTol', 10*eps(2*pi), ...
@szset.isScalarDouble, '[ scalar double {10*eps(2*pi)} ]'
'trace', false, [], '[ true | {false} ]'
'numFourierPts', 256, ...
@szset.isPosInteger, '[ integer {256} ]'
}
end
methods
function opt = szset(varargin)
opt = opt@optset(varargin{:});
end
end
methods(Static, Hidden)
function tf = isPosInteger(x)
tf = (x - fix(x)) == 0 & x > 0;
end
function tf = isOkMethod(s)
tf = any(strcmp(s, {'backslash', 'orth_resid', 'auto'}));
end
function tf = isScalarDouble(x)
tf = numel(x) == 1 & isa(x, 'double');
end
end
end