200, suma posicional, redispersión lineal

This commit is contained in:
2025-10-29 15:20:06 +01:00
parent 6bb476f53e
commit 39bcfbac80
8 changed files with 128 additions and 77 deletions

33
tablahash.hpp Normal file
View File

@@ -0,0 +1,33 @@
#pragma once
#include <list>
#include "cuac.hpp"
#include "fecha.hpp"
#include <iostream>
#include <string>
using namespace std;
class TablaHash {
private:
friend class DiccionarioCuacs;
int nElem;
int M;
list<Cuac> *lista;
public:
// implementar dispersión abierta
// tamaño variable (memoria dinámica)
// probar funciones de dispersión
// suma posicional
// posicional por trozos
// extracción
// etc
TablaHash();
TablaHash(int M);
~TablaHash();
void insertar(Cuac nuevo);
void consultar(string nombre);
unsigned int h(string clave);
// unsigned int h_spt(string clave);
int elem() { return nElem; }
};