Package jline.lib.rmf
Class CachePosGraphRMF
java.lang.Object
jline.lib.rmf.CachePosGraphRMF
General position-resolved density-dependent population process (DDPP) mean
field for FIFO(m) / strict FIFO(m) caches honouring a per-item access graph.
G[k] is the (h+1)x(h+1) access graph of item k: row 0 is miss
admission (col 0 = reject, col l = admit to list l), row 1+i is a hit in list
i (col b = promote to list b>=i; b==i means STAY in place, the FIFO/SFIFO
convention). A miss admits at the head of the target list (its tail evicted);
a hit at position j of list i promotes to the head of target b>i, and the tail
of b is demoted to list i -- to the vacated position j for FIFO
(reinsertHead=false) or to the head with a 1..j-1 shift for strict
FIFO (reinsertHead=true). Reduces exactly to the linear drift when G
is the standard chain; the fixed point is integrated from a COLD (empty)
cache so non-admissible items drain.
-
Constructor Summary
ConstructorsConstructorDescriptionCachePosGraphRMF(double[] popularity, int[] capacities, boolean reinsertHead) -
Method Summary
Modifier and TypeMethodDescriptiondouble[]driftGraph(double[] xin) Object[]driftTrajectory(double time, int nPoints, double[] xinit) Integrate the general drift over a finite window on a uniform time grid.double[]double[]fixedPointGraph(double tmax) Fixed point of the general drift from a cold (empty) cache.intdouble[]missProb(double[] x) voidsetItemGraph(double[][][] g)
-
Constructor Details
-
CachePosGraphRMF
public CachePosGraphRMF(double[] popularity, int[] capacities, boolean reinsertHead)
-
-
Method Details
-
setItemGraph
public void setItemGraph(double[][][] g) -
getDimension
public int getDimension() -
driftGraph
public double[] driftGraph(double[] xin) -
fixedPointGraph
public double[] fixedPointGraph(double tmax) Fixed point of the general drift from a cold (empty) cache. -
fixedPointGraph
public double[] fixedPointGraph() -
driftTrajectory
Integrate the general drift over a finite window on a uniform time grid. The start is a cold (empty) cache unlessxinitis supplied.- Parameters:
time- end time of the window (start is 0).nPoints- number of uniform grid points (>= 2).xinit- initial occupancy (dim,), or null for a cold start.- Returns:
Object[]{ T (double[nPoints]), X (double[nPoints][dim]) }.
-
missProb
public double[] missProb(double[] x)
-