Search found 9 matches

by toastedcrumpets
Sat Jan 09, 2010 10:41 pm UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Re: Symmetric hash function for two unsigned ints

Could you give me an example? I only know PIC assembler and have never included it in a C++ project before. I have two size_t vars that I want to sort using, i guess, PMAXUW and PMINUW. I would write, based on my limited knowledge and quick browsing of the gnu extensions size_t a, b; ........ size_t...
by toastedcrumpets
Tue Jan 05, 2010 12:57 pm UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Re: Symmetric hash function for two unsigned ints

I looked up the GNU extensions for >? and <? have been removed in gcc in favour of std::min and std::max. I haven't read the GNU extensions before so thanks for the suggestion. Unfortunately this didn't speed up my program as I didn't specify a march option, I'll try again with march=native though.
by toastedcrumpets
Sun Nov 29, 2009 11:26 am UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Re: Symmetric hash function for two unsigned ints

What I'm suggesting (although I don't understand why you are using the hash-(set,map,table, whatever)) is that you ditch the hashes, and just have a dense array of molecules in memory, indexed by a unique identifier. Then have two more arrays that tell you pairs of interactions, and iterate through...
by toastedcrumpets
Tue Nov 03, 2009 3:15 pm UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Re: Symmetric hash function for two unsigned ints

I've written a molecular dynamics code . . . but the matrix is too sparse to store completely in memory. How about using indirect array accesses to make the data non-sparse as far as your memory is concerned? Hey there, This calculation isn't for a neighbour list but it does behave in a way very si...
by toastedcrumpets
Fri Oct 30, 2009 3:10 pm UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Re: Symmetric hash function for two unsigned ints

Hey jaap, Yes, the higher the events/s is, the better the hash is. Thanks for your input, I've posted the benchmarks for your suggested functions. I think it's obvious that the granularity of the current benchmark is about 1000 events/s, so these hashes are all almost equal. I guess the hash(a,b) { ...
by toastedcrumpets
Fri Oct 30, 2009 2:23 pm UTC
Forum: Computer Science
Topic: Symmetric hash function for two unsigned ints
Replies: 14
Views: 3457

Symmetric hash function for two unsigned ints

Hello all, This is a simple hash function problem, but I'm not a computer scientist so I would like to see if anyone can do better! I've written a molecular dynamics code and in it I have an unordered_set for storing a sparse matrix of particle pair data (basically contacts). The code is highly depe...
by toastedcrumpets
Wed Sep 30, 2009 7:21 am UTC
Forum: Mathematics
Topic: Show us your articles! Or what's your Erdos number?
Replies: 185
Views: 253627

Re: Show us your articles! Or what's your Erdos number?

Ok, to introduce myself to the board and to try and bring this thread back on topic... I have an Erdos number of 4, at least that's the best I can do using the AMS search engine. M.Bannerman & William G. Hoover, paper William G. Hoover & William Moran paper William Moran & Harold S. Shap...
by toastedcrumpets
Tue Sep 29, 2009 5:53 am UTC
Forum: Mathematics
Topic: An equation for a particle reflecting off of a surface
Replies: 7
Views: 1261

Re: An equation for a particle reflecting off of a surface

This sort of equation and many more complex variants are used in event-driven molecular dynamics (EDMD) simulations, so although they're not readily available on the internet they are available in books on EDMD. Generally this sort of problem is worked out using vector notation and a good book (whic...
by toastedcrumpets
Mon Sep 28, 2009 9:13 pm UTC
Forum: Mathematics
Topic: An equation for a particle reflecting off of a surface
Replies: 7
Views: 1261

Re: An equation for a particle reflecting off of a surface

Hey, Tell me if I've misunderstood the problem, but the answer is... You just have to reflect the component of the velocity normal to the walls surface. It's called specular reflection in older event driven MD books and is best expressed using vector notation \Delta {\bf v} = -(1+\alpha)(...

Go to advanced search