📄 lfu.java
字号:
package util;import java.awt.Color;import java.awt.Label;import java.util.logging.Level;import java.util.logging.Logger;public class LFU extends PageReplace{ private int BlockNum = 0; private int[] Block = null; private int[] BlockRec = null; private int[] time = null; double []efficiency=null; int[] seq=null; Label[] label=null; String nextSeq = null; String lastSeq = null; Label next = null; Label last = null; Label efficiencyLabel = null; public LFU(int[]s,double[] eff,Label[] l,Label next,Label last,Label efficiencyLabel) { this.seq = s; this.label = l; this.next = next; this.last = last; efficiency= eff; this.efficiencyLabel = efficiencyLabel; char[] show = new char[40]; for (int i = 0,j=0; i < seq.length; i++) { show[j++] = (char)(seq[i]+48); show[j++] = ' '; } nextSeq = new String().valueOf(show); lastSeq = ""; this.BlockNum = l.length; this.Block = new int[l.length]; for (int i = 0; i < Block.length; i++) { Block[i] = 0; } this.BlockRec = new int[l.length]; for (int i = 0; i < BlockRec.length; i++) { BlockRec[i] = 0; } this.time = new int[l.length]; for (int i = 0; i < time.length; i++) { time[i] = 0; } } public void run() { next.setVisible(true); next.setText("寰呰
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -