LINE Solver (C++)
Templated C++ port of the LINE queueing solver
Loading...
Searching...
No Matches
cache_miss_is.h File Reference

Cache miss rates from the importance-sampling hit probabilities. More...

#include <cstddef>
#include <vector>
#include "line/api/cache/cache_is.h"
#include "line/api/cache/cache_prob_is.h"
#include "line/num/number.h"
#include "line/util/error.h"
#include "line/util/matrix.h"
Include dependency graph for cache_miss_is.h:

Go to the source code of this file.

Classes

struct  line::cache::CacheMissIsResult< T >

Namespaces

namespace  line
namespace  line::cache

Functions

template<class T>
CacheMissIsResult< T > line::cache::cache_miss_is (const Matrix< T > &gamma, const std::vector< int > &m, const Matrix< T > &lambda, std::size_t samples, std::uint64_t seed, const std::vector< int > &sigma, const std::vector< int > &cap)
 Cache miss rates from the importance-sampling hit probabilities.
template<class T>
CacheMissIsResult< T > line::cache::cache_miss_is (const Matrix< T > &gamma, const std::vector< int > &m, const Matrix< T > &lambda, std::size_t samples, std::uint64_t seed)
 cache_miss_is without storage cost caps.
template<class T>
CacheMissIsResult< T > line::cache::cache_miss_is (const Matrix< T > &gamma, const std::vector< int > &m, const Matrix< T > &lambda)
 cache_miss_is with the MATLAB default of 1e5 samples.

Detailed Description

Cache miss rates from the importance-sampling hit probabilities.

Templated port of matlab/src/api/cache/cache_miss_is.m: the per-item miss probabilities come from cache_prob_is, and the miss rates are the request rates weighted by them. The normalizing constant is estimated alongside by cache_is and returned, as the reference does.

With no request rates the reference returns the mean miss probability as the global rate and leaves the per-user and per-item vectors empty; that contract is kept.

Arithmetic. static_assert(has_transcendental) – it is the importance sampler of cache_prob_is with a linear map on top.

Definition in file cache_miss_is.h.