1classdef (Sealed) ReplacementStrategy
2 % Enumeration of cache replacement strategies
4 % Copyright (c) 2012-2026, Imperial College London
10 SFIFO = 2; % strict fifo
12 %HLRU = 4; % also called k-LRU (Martina et al, Gast & van Houdt; not supported at present)
17 function text = toString(type)
19 text = ReplacementStrategy.toText(type);
22 function text = toText(type)
25 case ReplacementStrategy.RR
27 case ReplacementStrategy.FIFO
29 case ReplacementStrategy.SFIFO
31 case ReplacementStrategy.LRU
36 function text = toFeature(type)
37 % TEXT = TOFEATURE(TYPE)
40 case ReplacementStrategy.RR
41 text =
'ReplacementStrategy_RR';
42 case ReplacementStrategy.FIFO
43 text =
'ReplacementStrategy_FIFO';
44 case ReplacementStrategy.SFIFO
45 text =
'ReplacementStrategy_SFIFO';
46 case ReplacementStrategy.LRU
47 text =
'ReplacementStrategy_LRU';
48 %
case ReplacementStrategy.HLRU
49 % text =
'ReplacementStrategy_HLRU';