LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
Disabled.m
1classdef Disabled < ContinuousDistribution & DiscreteDistribution
2 % A distribution that is not configured
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 methods
8 function self = Disabled()
9 % SELF = DISABLED()
10
11 % Constructs a disabled distribution
12 self@ContinuousDistribution('Disabled',1,[NaN,NaN]);
13 self@DiscreteDistribution('Disabled',1,[NaN,NaN]);
14 setParam(self, 1, 'value', NaN);
15 % not implemented yet
16 self.obj = jline.lang.processes.Disabled();
17 end
18 end
19
20 methods
21 function bool = isContinuous(self)
22 % BOOL = ISCONTINUOUS()
23
24 % Returns true is the distribution is continuous
25 bool = true;
26 end
27
28 function bool = isDisabled(self)
29 % BOOL = ISDISABLED()
30
31 % Returns true is the distribution is disabled
32 bool = true;
33 end
34
35 function bool = isDiscrete(self)
36 % BOOL = ISDISCRETE()
37
38 % Returns true is the distribution is discrete
39 bool = true;
40 end
41
42 function X = sample(self, n)
43 % X = SAMPLE(N)
44
45 % Get n samples from the distribution
46 if nargin<2 %~exist('n','var'),
47 n = 1;
48 end
49 X = nan(n,1);
50 end
51
52 function ex = getMean(self)
53 % EX = GETMEAN()
54
55 % Get distribution mean
56 ex = NaN;
57 end
58
59 function SCV = getSCV(self)
60 % SCV = GETSCV()
61
62 % Get distribution squared coefficient of variation (SCV = variance / mean^2)
63 SCV = NaN;
64 end
65
66 function Ft = evalCDF(self,t)
67 % FT = EVALCDF(SELF,T)
68
69 % Evaluate the cumulative distribution function at t
70 % AT T
71
72 Ft = NaN;
73 end
74
75 function p = evalPMF(self, k)
76 % P = EVALPMF(K)
77
78 % Evaluate the probability mass function at k
79 % AT K
80
81 p = 0*k;
82 end
83 end
84
85 methods (Static)
86 function singleton = getInstance
87 persistent staticDisabled
88 if isempty(staticDisabled)
89 staticDisabled = Disabled();
90 end
91 singleton = staticDisabled;
92 end
93 end
94
95end
96