// CMSC 341 - Fall 25 - Project 4 #include "cache.h" Cache::Cache(int size, hash_fn hash, prob_t probing = DEFPOLCY){ } Cache::~Cache(){ } void Cache::changeProbPolicy(prob_t policy){ } bool Cache::insert(Person person){ } bool Cache::remove(Person person){ } const Person Cache::getPerson(string key, int ID) const{ } bool Cache::updateID(Person person, int ID){ } float Cache::lambda() const { } float Cache::deletedRatio() const { } void Cache::dump() const { cout << "Dump for the current table: " << endl; if (m_currentTable != nullptr) for (int i = 0; i < m_currentCap; i++) { cout << "[" << i << "] : " << m_currentTable[i] << endl; } cout << "Dump for the old table: " << endl; if (m_oldTable != nullptr) for (int i = 0; i < m_oldCap; i++) { cout << "[" << i << "] : " << m_oldTable[i] << endl; } } bool Cache::isPrime(int number){ bool result = true; for (int i = 2; i <= number / 2; ++i) { if (number % i == 0) { result = false; break; } } return result; } int Cache::findNextPrime(int current){ //we always stay within the range [MINPRIME-MAXPRIME] //the smallest prime starts at MINPRIME if (current < MINPRIME) current = MINPRIME-1; for (int i=current; i sqrt(i) && i != current) { return i; } } } //if a user tries to go over MAXPRIME return MAXPRIME; }