r/AskComputerScience • u/KingOfSouls28 • Nov 18 '24
What is the Big O Notation of the Square Diamond algorithm?
I was directed here by the programming help sub.
Context: I am writing a dissertation on procedural generation (in games) but can't find a source that states the efficiency of Square Diamond, most papers I read just state if an algorithm is efficient or not and in what category (memory, time etc) which my supervisor says is vague and should be avoided. Where/what is the best way to find the complexities of algorithms with reliable sources?
I was hoping there would be some sort of online library listing all the different algorithms for specific tasks with their big O notations, but can't find anything like that.
Any help is greatly appreciated, thank you! :)
14
u/SignificantFidgets Nov 18 '24
As a side note, if you're writing a dissertation do not use this wording, because it's wrong. Algorithms do not "have a big O notation." Algorithms have a running time, and the running time can be bounded using big-O notation. The wording is important, especially if it's in something as formal as a dissertation.
3
u/munificent Nov 18 '24
Gavin S. P. Miller briefly analyzes diamond-square in "The definition and rendering of height maps". In there, he says:
That sounds right to me. Diamond-square will write each vertex exactly once.
2
u/turtle_dragonfly Nov 18 '24
I find the book "The Algorithm Design Manual" by Skiena, is a pretty good start for this. Not comprehensive, but covers a lot of ground.