LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
StatelessClassSwitcher.m
1classdef StatelessClassSwitcher < ClassSwitcher
2 % A class switch node basic on class switch probabilities
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 properties
8 csMatrix;
9 end
10
11 methods
12 %Constructor
13 function self = StatelessClassSwitcher(jobclasses, csMatrix)
14 % SELF = STATELESSCLASSSWITCHER(CLASSES, CSMATRIX)
15
16 self@ClassSwitcher(jobclasses, 'StatelessClassSwitcher');
17 self.csMatrix = csMatrix;
18 % this is slower than indexing the matrix, but it is a small
19 % matrix anyway
20 self.updateClasses(jobclasses);
21 self.csFun = @(r,s,state,statep) csMatrix(r,s); % state parameter if present is ignored
22 end
23
24 function self = updateClasses(self, jobclasses)
25 self.classes = jobclasses; % state parameter if present is ignored
26 end
27
28 function self = updateClassSwitch(self, csMatrix)
29 self.csMatrix = csMatrix;
30 self.csFun = @(r,s,state,statep) csMatrix(r,s); % state parameter if present is ignored
31 end
32 end
33
34end