Find Jobs
Hire Freelancers

C++ Hash Table Implementation

$100-125 USD

Cerrado
Publicado hace más de 13 años

$100-125 USD

Pagado a la entrega
I need a working C++ Implementaion of a Hash Table that is based on the code that can be freely downloaded from <[login to view URL]>. The name of the class is CHashTable. It should have all standard methods necessary to use a hash table. It will be used to store data structures of a specified length (specified at runtime and not ahead of time) with a key value that is an unsigned char array of any length. Performance is critical. Speed is preferred over memory, but it would be nice if there was a switch to change the preference at runtime. Deliverable: 1. C++ MFC dialog-based Visual Studio 2008 Project that compiles correctly. 2. Do not select Unicode for the project. 3. Select MFC as static linked library for the project. 4. CHashTable class as part of the project that includes the specified methods. 5. CHashTable class is based on the SGI source code specified above. 6. Runtime switch to change between high performance/speed and small memory. 7. Simple demo usage of the class. ## Deliverables Methods: // Please note that the structure needs to be allocated since what is passed // might be coming from stack or temporary space. Returns a unique identifier // for the new hash table object. int Add( unsigned char *Key, int nKeyLength, void *structure, int nStructureSize ); // Clear all entries. bool Clear( void ); // Returns -1 (not found) or a unique integer identier from the hashtable. The // identifier is similar to the identity key that a database assigns int Contains( unsigned char *Key, int nKeyLength ); // Get pointer to null-terminated ASCII representation of the hash code. char *GetHashCode( int nIdentifier ); char *GetHashCode( unsigned char *Key, int nKeyLength ); // Return a pointer to the stored data. This will usually be a structure. Caller // should know the size of the structure, so we do not need to deal // with it here. Returns NULL if not found. void *GetObjectData( unsigned char *Key, int nKeyLength ); // Remove a single entry. bool Remove( unsigned char *Key, int nKeyLength ); bool Remove( int nIdentifier ); Performance is critical. Speed is preferred over memory, but it would be nice if there was a switch to change the preference at runtime. Deliverable: 1. C++ MFC dialog-based Visual Studio 2008 Project that compiles correctly. 2. Do not select Unicode for the project. 3. Select MFC as static linked library for the project. 4. CHashTable class as part of the project that includes the specified methods. 5. CHashTable class is based on the SGI source code specified above. 6. Runtime switch to change between high performance/speed and small memory. 7. Simple demo usage of the class. Sample usage: // The struct I am using. // This can be any struct, though, // when calling the Add method. typedef struct { int nValue; char Name[100]; double dAge; } MYDATA; // Declare stuff. CHashTable ht; MYDATA md; unsigned char Key[10]; // Assign values to the md structure. [login to view URL] = 14; strcpy( [login to view URL], "Rick" ); [login to view URL] = 14.14; // Build the key. Please note that it is // not null terminated Key[0] = 14; Key[1] = 15; Key[2] = 'C'; // Call the Add method and get the unique ID for the // newly-created object. int nUniqueID = [login to view URL]( Key, 3, &md, sizeof( MYDATA ) ); // Assign values to the md structure. [login to view URL] = 24; strcpy( [login to view URL], "Sam" ); [login to view URL] = 24.24; // Build the key. Please note that it is // not null terminated Key[0] = 24; Key[1] = 25; Key[2] = 'D'; Key[3] = 'Z'; // Call the Add method and get the unique ID for the // newly-created object. int nUniqueID2 = [login to view URL]( Key, 4, &md, sizeof( MYDATA ) ); // Now get a value out. MYDATA *md2 = [login to view URL]( Key, 4 ); // This could also be // MYDATA *md2 = [login to view URL]( nUniqueID2 ); if( md2 != NULL ) { printf( "%s\n", md2->Name ); }
ID del proyecto: 3035360

Información sobre el proyecto

11 propuestas
Proyecto remoto
Activo hace 13 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
11 freelancers están ofertando un promedio de $91 USD por este trabajo
Avatar del usuario
See private message.
$85 USD en 3 días
4,7 (56 comentarios)
5,4
5,4
Avatar del usuario
See private message.
$102 USD en 3 días
4,9 (84 comentarios)
5,3
5,3
Avatar del usuario
See private message.
$85 USD en 3 días
5,0 (10 comentarios)
3,9
3,9
Avatar del usuario
See private message.
$106,25 USD en 3 días
5,0 (21 comentarios)
3,5
3,5
Avatar del usuario
See private message.
$85 USD en 3 días
2,2 (7 comentarios)
3,9
3,9
Avatar del usuario
See private message.
$102 USD en 3 días
5,0 (8 comentarios)
2,8
2,8
Avatar del usuario
See private message.
$85 USD en 3 días
5,0 (3 comentarios)
2,8
2,8
Avatar del usuario
See private message.
$85 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$85 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$85 USD en 3 días
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
See private message.
$85 USD en 3 días
0,0 (1 comentario)
1,3
1,3
Avatar del usuario
See private message.
$97,75 USD en 3 días
0,0 (3 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
Orlando, United States
5,0
149
Forma de pago verificada
Miembro desde abr 23, 2002

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.