LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
Process.m
1classdef Process < Copyable
2 % An abstract class for stochastic processes
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 properties
8 name
9 params
10 end
11
12 methods (Abstract)
13 X = sample(self); % Sample a value from the inter-arrival time distribution
14 end
15
16 methods (Hidden)
17 %Constructor
18 function self = Process(name, numParam)
19 % SELF = POINTPROCESS(NAME, NUMPARAM)
20
21 self.name = name;
22 self.params = cell(1,numParam);
23 for i=1:numParam
24 self.params{i}=struct('paramName','','paramValue',-1);
25 end
26 end
27
28 function nParam = getNumParams(self)
29 % NPARAM = GETNUMPARAMS()
30
31 nParam = length(self.params);
32 end
33
34 function setParam(self, id, name, value,typeClass)
35 % SETPARAM(ID, NAME, VALUE,TYPECLASS)
36
37 self.params{id}.paramName=name;
38 self.params{id}.paramValue=value;
39 end
40
41
42 function param = getParam(self,id)
43 % PARAM = GETPARAM(SELF,ID)
44
45 param = self.params{id};
46 end
47 end
48
49end