[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Sorting part of a list
- From: "Daniel Slaney" <Daniel.Slaney@...>
- Date: Wed, 18 Apr 2012 11:18:20 +0100
I've recently tried to implement an algorithm that requires sorting just
a section of an array at a time.
Unless I'm missing something this requires making copies of the
sub-array in Lua which is sub-optimal.
Would it be possible to change (using the syntax from the reference
manual):
table.sort(list [, comp])
to
table.sort(list, [, comp [, i [, j]]])
Where i and j are the first and last indexes to sort between and they
default to 1 and #list respectively.
Daniel Slaney