ildyria / Arimaa

3 stars 1 forks source link

Vector VS List VS HashMap for v_stat #9

Closed GPrev closed 9 years ago

GPrev commented 9 years ago

I was coding the sum of the results (when gathered by the master thread) and the loop has n² iterations. I was wondering if: -Vector were unnecessary (as the index is not used, only the first element identifying the move) and thus could be replaced by list -HashMap would be more efficient (as we could search by move directly, so complexity in O(n) not O(n²) ) (see typedefs.h)

ildyria commented 9 years ago

"Vector were unnecessary (as the index is not used, only the first element identifying the move) and thus could be replaced by list"

Vector sorted by Move (therefore u_long) will be provided.

ildyria commented 9 years ago

Done. But the addition operator need to be updated.