LINE Solver
MATLAB API documentation
Loading...
Searching...
No Matches
SampledMetric.m
1classdef SampledMetric < Copyable
2 % Observed data for a metric
3 %
4 % Copyright (c) 2012-2026, Imperial College London
5 % All rights reserved.
6
7 properties
8 t;
9 type;
10 data;
11 node;
12 class;
13 cond;
14 format; % 'timeseries' (default) or 'trace' (per-request)
15 end
16
17 methods
18
19 function self = SampledMetric(type, ts, data, node, jobclass)
20 self.t = ts;
21 self.data = data;
22 self.type = type;
23 self.node = node;
24 self.class = [];
25 self.cond = [];
26 self.format = 'timeseries';
27 if exist('jobclass','var')
28 self.class = jobclass;
29 end
30 end
31
32 function setConditional(self, event)
33 if exist('event','var')
34 self.cond = event;
35 end
36 end
37
38 function setTrace(self)
39 self.format = 'trace';
40 end
41
42 function bool = isAggregate(self)
43 bool = isempty(self.class);
44 end
45
46 function bool = isConditional(self)
47 bool = ~isempty(self.cond);
48 end
49
50 function bool = isTrace(self)
51 bool = strcmp(self.format, 'trace');
52 end
53 end
54end
55