1classdef Trace < Replayer
2 % Empirical time series from a trace, alias
for Replayer
4 % Copyright (c) 2012-2026, Imperial College London
9 function self = Trace(data)
14 function [m1,m2,m3,scv,skew] = getMoments(self)
16 [row,col] = size(data);
17 m1 = 0; % the first moment
18 m2 = 0; % the second moment
19 m3 = 0; % the third moment
21 bin1 = ((data(i+1,2)-data(i,2))/2+data(i,2))*((data(i+1,1)-data(i,1)));
22 bin2 = ((data(i+1,2)-data(i,2))/2+data(i,2))^2*((data(i+1,1)-data(i,1)));
23 bin3 = ((data(i+1,2)-data(i,2))/2+data(i,2))^3*((data(i+1,1)-data(i,1)));
29 skew = (m3-3*m1*(m2-m1^2)-m1^3)/((m2-m1^2)^(3/2));