| 02-05-2008, 01:09 PM | #1 |
Good Day everyone! Again I ask for your guidance lol. Now for the question: Is sorting array elements feasible/recommendable in jass? Thanks guys. |
| 02-05-2008, 02:22 PM | #2 |
feasible yes, "recommendable" ? I would say that depends on the algorithm in question... |
| 02-05-2008, 02:48 PM | #3 |
Well I was thinking of using a Binary search to look for elements, and sort elements upon insertion(Ascending order). Another question: would it get messed up if a sorting procedure was active and I searched the array? I'm having doubts about it. |
| 02-05-2008, 03:08 PM | #4 | |
Quote:
what are you talking about? |
| 02-05-2008, 03:10 PM | #5 |
heapsort. |
| 02-05-2008, 03:28 PM | #6 |
Sorry about the unclear question, What would happen if the array insertion and array searching happened simultaenously? would I have an error? Scenario: game-time: 1.21; element inserted into the array and sorting procedure (or function) was invoked. game-time: 1.25; A function accessed and searched the Array to look for an element. @ cohadar: I don't know what a heapsort is, i don't even know what a heap is lol. |
| 02-05-2008, 03:33 PM | #7 | |
Quote:
|
| 02-05-2008, 03:51 PM | #8 |
Thanks man! |
