// CMSC 341 - Spring 26 - Project 4 #include "vdetect.h" VDetect::VDetect(int size, hash_fn hash, prob_t probing = DEFPOLCY){ } VDetect::~VDetect(){ } void VDetect::changeProbPolicy(prob_t policy){ } bool VDetect::insert(Virus virus){ } bool VDetect::remove(Virus virus){ } const Virus VDetect::getVirus(string sequence, int id) const{ } bool VDetect::updateID(Virus virus, int id){ } float VDetect::lambda() const { } float VDetect::deletedRatio() const { } void VDetect::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 VDetect::isPrime(int number){ bool result = true; for (int i = 2; i <= number / 2; ++i) { if (number % i == 0) { result = false; break; } } return result; } int VDetect::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; }