In a tutorial by Greywolf i read about hashtables in simkin. But the section wasn't finished. Does anyone know more about this topic?
An explanation what a hashtable is:
A hashtable is like an array, but with strings instead of numbers. A normal array gives each element a number and it has a value. In a hashtable, each element has a name instead of a number. The cool thing about a hashtable is that it organizes the data in a way that is just as fast as a normal array, but way better to read.
I would really like to use hashtables to organize my items and character abilities better.
Hashtables in simkin?
Hashtables in simkin?
Everyone can see the difficult, but only the wise can see the simple.
-----
-----
Re: Hashtables in simkin?
Hash tables don't necessarily need strings as their keys. A hash table uses a hashing function to make your string into a unique number that is then put into a vector (array). When you do a lookup, the string you supply is hashed into a number which should match the entry in the vector. This is why hash tables are faster than normal arrays and maps.
As for Simkin, I would gather that you can export any functions related to hash tables using Simkin. Simkin does not have a built in hash table variable. I can't seem to find one in the documentation at least.
As for Simkin, I would gather that you can export any functions related to hash tables using Simkin. Simkin does not have a built in hash table variable. I can't seem to find one in the documentation at least.
Many Bothans died to bring you this signature....
Re: Hashtables in simkin?
I've never scriped using Simkin but I did a search and found THIS in the Simkin documentation. Not sure if it will help.
EDIT: You can also look here to find more hash table classes:
http://www.simkin.co.uk/Docs/cpp/api/classes.html
EDIT: You can also look here to find more hash table classes:
http://www.simkin.co.uk/Docs/cpp/api/classes.html
Last edited by Allanon on Thu Sep 25, 2008 5:36 pm, edited 2 times in total.
Re: Hashtables in simkin?
I knew that, just wanted to put it a bit simplerparadoxnj wrote:Hash tables don't necessarily need strings as their keys. A hash table uses a hashing function to make your string into a unique number that is then put into a vector (array). When you do a lookup, the string you supply is hashed into a number which should match the entry in the vector. This is why hash tables are faster than normal arrays and maps.
Everyone can see the difficult, but only the wise can see the simple.
-----
-----