Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
hash
- Page 1
Hash the sentence in java
Programming
Software Development
3 Years Ago
by Błkèęš
Hash
the sentence in java
Re: Hash tables?
Programming
Software Development
13 Years Ago
by rubberman
…simply 2-dimension arrays sorted by the key (
hash
value). The
hash
value is a mathematical representation of the data … where different data values will result in the same
hash
value.
Hash
tables have the ability to deal with this, by…hence the desire to have non-colliding
hash
algorithms. Generating a good
hash
can be expensive in terms of CPU …
Hash Table template implementation help
Programming
Software Development
18 Years Ago
by developer4321
… // HashTable hashTableInt<int>; // // /////////////////////////////////////////// // Each
hash
entry stores a key, object pair template <typename Data…; } ///////////////////////////////////// // // Class used to iterate over the
hash
table // ///////////////////////////////////// template <typename Data> class HashTableIterator…
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by Lazaro Claiborn
…// HashTable hashTableInt<int>; // // /////////////////////////////////////////// // Each
hash
entry stores a key, object pair template <typename Data… } ///////////////////////////////////// // // Class used to iterate over the
hash
table // ///////////////////////////////////// template <typename Data> class HashTableIterator…
Hash Table - Insertion
Programming
Software Development
13 Years Ago
by CodeNinjaMike
…a duplicate of key while(table[
hash
]!=NULL && table[
hash
]->getKey()!=key) //Increment the… a key in place while (table[
hash
] != NULL && table[
hash
]->getKey() != key) //Increment … to insert data into on the table
hash
= (
hash
+ 1) % TABLE_SIZE; //If it's null if …
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by thekashyap
… the existing implementation. 1. Inside insertItem(). [code=C++] int i =
hash
(key); HashTableEntry<Data> *e = _buckets[i]; while(e…) != 0) { e = e->_next; }[/code] Isn't it that
hash
() ALWAYS returns same number for same key? If yes, why…
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by developer4321
…. In regards to your comment on my implementation of the
hash
() fuction.... each HashTableEntry in _buckets[] actually represents a linked … also very confused) So, yes it is true that
hash
() will always return the same number for the same key… entry to the linked list for that index in the
hash
table: e->_next; Hence, [COLOR=#008000]e->…
Hash Function in C
Programming
Software Development
12 Years Ago
by alex910TN
… in a programming language to unique indicies in a
hash
table. The problem is that the lexemes (provided below…tried so far include: 1.
hash
=
hash
+ (int)array[i]; //i=0 to i=lexemelength 2.
hash
= 3 *
hash
+ (int)array[i]; //…same i specs 3.
hash
= (3*
hash
) + (int)tolower(array[i]); …
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by Lazaro Claiborn
…, Data & data) { // TODO: Returns the next element in the
hash
table. // The key and data values are stored in the…
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by developer4321
…]<LI class=li1> [COLOR=#008000]// Array of the
hash
buckets.[/COLOR] [*] HashTableEntry<Data> **_buckets; [/LIST]was given…
Re: Hash Table template implementation help
Programming
Software Development
18 Years Ago
by thekashyap
… _size, _filled_buckets[TableSize] ;[/inlinecode] to HashTable. In insertItem() just push
hash
value (i.e i) into this array. [inlinecode]_filled_buckets[++_size…
Hash function...need help...
Programming
Software Development
15 Years Ago
by jralexander137
…char[] record) {} public boolean findRecord(char[] record) {} private int
hash
(char[] key) {} private Disk disk; // disk on which the …. ------------------------------------------------------------------ So if I'm understanding this correctly the
Hash
function will take a char array of length 27 which…
Hash tables, how do they work?
Programming
Software Development
9 Years Ago
by Sarkurd
…hash_val(seed,args...); } // auxiliary generic function to create a
hash
value out of a heterogeneous list of arguments template <…no == c2.no; } }; int main() { // unordered set with own
hash
function and equivalence criterion unordered_set<Customer,CustomerHash,CustomerEqual>…
Re: Hash table Implementation
Programming
Software Development
14 Years Ago
by Narue
…That's always a possibility, but with a decent
hash
function you won't see enough collisions for the chains…QUOTE]2 . using a separate data stucture , preferably an other
hash
table[/QUOTE] Tricky to get right because now you need…written such that the client code supplies a
hash
function. For a double
hash
, that starts to be a significant workload …
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by lookof2day
… to [CODE] private int
hash
(char[] key){ int hashVal = 1; int prime … hashVal = prime * hashVal + key[i]; } System.out.println("
Hash
Value is: " + hashVal); return hashVal; } [/CODE] You…statements. The given code will generate a
hash
value for you which you can use as key…
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by jralexander137
…++){ while(i < key.length-1){ System.out.println("
Hash
Val: " + hashVal + "and i val: " + i…hashVal = prime * hashVal + key[i]; i++; } System.out.println("
Hash
Value is: " + hashVal); return hashVal; } [/code] and here is…
Hash table Implementation
Programming
Software Development
14 Years Ago
by meet123321
…; struct hnode{ HNODE *link; }; typedef struct { unsigned long (*
hash
)(const void *); int (*compare)(const void *, const void *); const …*); HNODE **table; unsigned int buckets; unsigned int count; }
HASH
; The existing implementation caters a huge amount of data. Well…
Hash Chaining Issues
Programming
Software Development
13 Years Ago
by Stazloz
…[TABLE_SIZE]; std::size_t total_records; // HELPER MEMBER FUNCTION std::size_t
hash
(int key) const; }; } #include "table2.template&… #include "table2.h" // Provides the chained
hash
table class using namespace std; using namespace main_savitch_12B; // …
Hash Table ( display function )
Programming
Software Development
16 Years Ago
by ulquiorra
… for some schoolwork I need to make one. The
hash
table and hashfunction itself aren't the problem. The … = s; int b = 39482; int c = 11923; unsigned int
hash
= 0; unsigned i; for( i = 0; i < stringHashing…->data.length(); i++ ) {
hash
=
hash
* c + stringHashing->data.at(i); c = c * b; } …
Re: hash table
Programming
Software Development
15 Years Ago
by ankit894u
… *hashtable, char *str) { list_t *list; unsigned int hashval =
hash
(hashtable, str); /* Go to the correct list based on the…char *str) { list_t *new_list; list_t *current_list; unsigned int hashval =
hash
(hashtable, str); /* Attempt to allocate memory for list */ if ((new_list…
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by jralexander137
…...any thoughts/help would be great. [code] private int
hash
(char[] key){ int hashVal = 0; int tableSize = disk.getSectorCount(); for(… = 37 * hashVal + key[i]; } hashVal %= tableSize; System.out.println("
Hash
Value is: " + hashVal); return hashVal; } [/code]
Hash Table with Separate Chaining
Programming
Software Development
14 Years Ago
by ace8957
… * next; };//end node hashNode array[MAX]; public: int
hash
(string); void prepArray(); void tableInsert(Person p); void tableDelete(string…}//end else } void hashTable::tableInsert(Person p) { int index =
hash
(p.getPhonenumber()); hashNode *hp = &(array[index]);//hashed position //hashNode…
Hash navigation
Programming
Web Development
12 Years Ago
by chr.s
…each subsequent slide loaded, display the URL with a product
hash
**. E.g. with the following format: `http://www.…altering (disabling) the browser history on each
hash
change, as updating the
hash
results in a new browser history entry … unchanged when browsing through the slides and append the
hash
only when the details are loaded**. There would be…
Re: Hash Table with Separate Chaining
Programming
Software Development
14 Years Ago
by IamAuser
…Node*>(size); } ~HashTable(){ } void insert(int data){ int index =
hash
(data); if(buckets->at(index) == NULL){ buckets->at…= p->next; } } void remove(){ } int getSize(){ return size; } int
hash
(int a){ a = (a+0x7ed55d16) + (a<<12); a…
Re: Hash Table Interpreter
Programming
9 Years Ago
by aeck
…;> s); } } else if(s == "++") { //table[
hash
(temp)].setNum(table[
hash
(temp)].getNum()+1); while(line >> s); } else…
Hash Table
Programming
Software Development
16 Years Ago
by BestJewSinceJC
… that I go on Wikipedia's page for
hash
tables. It was actually pretty informative. I'…any suggestions in advance. 1. When does the
hash
table need to be resized. I know about …Doesn't checking to see how full the
hash
table is require looking at every index to …the initial capacity of the array that my
hash
table uses should be? Is it related to…
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by ivakadfc
I thought the
hash
function is supposed to give the number of the sector to which the first record will be saved.
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by jralexander137
My understanding of what the
hash
function was supposed to do was that given a key, …
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by ivakadfc
You are correct about this. But I cannot understand why you need firstAllocated to show you where the start is if you know that your
hash
table is the sectors between 0 and 599. Also the first overflow sector is going to start at 600. Why do you need firstOverflow? I mean i can see why but shouldn't it be private final int or something?
Re: Hash function...need help...
Programming
Software Development
15 Years Ago
by jralexander137
And for this
hash
function should I not factor in the null values in the key? Just the locations in the key that have actual char values?
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC