Initial commit
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
#ifndef ALGHORITHM_QUADRATIC_PROBING_H
|
||||
#define ALGHORITHM_QUADRATIC_PROBING_H
|
||||
|
||||
#include "one.h"
|
||||
|
||||
BEGIN_NAMESPACE(BusinessLogic)
|
||||
BEGIN_NAMESPACE(Hash)
|
||||
BEGIN_NAMESPACE(Algorithm)
|
||||
BEGIN_NAMESPACE(QuadraticProbing)
|
||||
|
||||
class Product final : public One::Product
|
||||
{
|
||||
private:
|
||||
friend Creator;
|
||||
Product()
|
||||
{
|
||||
}
|
||||
|
||||
protected:
|
||||
// virtual bool isValidInput() const override {
|
||||
// return isPrimeNumber(size());
|
||||
// }
|
||||
virtual size_t getFirstCoefficient() override {
|
||||
return m_hashFunction->getHash(m_convertValue);
|
||||
}
|
||||
virtual size_t getSecondCoefficient(size_t counter) override {
|
||||
return std::pow(size(), counter);
|
||||
}
|
||||
};
|
||||
|
||||
END_NAMESPACE // LinearProbing
|
||||
END_NAMESPACE // Algorithm
|
||||
END_NAMESPACE // Hash
|
||||
END_NAMESPACE // BusinessLogic
|
||||
|
||||
#endif // !ALGHORITHM_QUADRATIC_PROBING_H
|
||||
Reference in New Issue
Block a user