Lord KJWilliams
Member
Is there any use for using sorting algorithms in game programming GML such as Bubble Sort? I have programmed this in C, and I found on only different variations of it. I want to use a sorting algorithm to list in order by id, for making sorting through a ds_map easier. It says on the online manual :
Secondly, I looked up the concept of sorting algorithms, and found a website that explains it in C or C++.
Please beware, these pages use advanced subjects in Computer Science.
One page explains the idea of Time Complexity in the use of sorting algorithms , which you might find interesting... see :
https://www.geeksforgeeks.org/understanding-time-complexity-simple-examples/
Another page ( same website ) I found on the subject of the sorting algorithm called bubble sort, there is more than one way to implement the use of bubble sort which falls back on the explanation of Time Complexity... see :
https://www.geeksforgeeks.org/analysis-of-different-sorting-techniques/
I have no idea if these sorting techniques will behave the same in GML as they do in C or C++ as shown in the examples.
I want to know a way to cut down the searching in a ds_map, if I am sorting through 1000 entries of a ds_map. The problem is, it says in the online manual there is no order, so a ds_map is NOT contiguous, but is it dynamic like a dynamically linked node list, like in C++ ? No information states that , which I have read in the manual.
Thanks in Advance
Has anyone done this using a sorting algorithm such as bubble sort?Maps are not sorted in any (recognisable) way, meaning that to find a certain key you may have to iterate through the whole thing (which is very slow).
Secondly, I looked up the concept of sorting algorithms, and found a website that explains it in C or C++.
Please beware, these pages use advanced subjects in Computer Science.
One page explains the idea of Time Complexity in the use of sorting algorithms , which you might find interesting... see :
https://www.geeksforgeeks.org/understanding-time-complexity-simple-examples/
Another page ( same website ) I found on the subject of the sorting algorithm called bubble sort, there is more than one way to implement the use of bubble sort which falls back on the explanation of Time Complexity... see :
https://www.geeksforgeeks.org/analysis-of-different-sorting-techniques/
I have no idea if these sorting techniques will behave the same in GML as they do in C or C++ as shown in the examples.
I want to know a way to cut down the searching in a ds_map, if I am sorting through 1000 entries of a ds_map. The problem is, it says in the online manual there is no order, so a ds_map is NOT contiguous, but is it dynamic like a dynamically linked node list, like in C++ ? No information states that , which I have read in the manual.
Thanks in Advance