On 10/19/18 3:58 PM, Carl Sturtivant wrote:
On Friday, 19 October 2018 at 17:53:58 UTC, Stanislav Blinov wrote:
On Friday, 19 October 2018 at 17:40:59 UTC, Carl Sturtivant wrote:
If we imagine an Ordered Range being a finite Range of some kind with
the additional property that its values are
On Friday, 19 October 2018 at 17:53:58 UTC, Stanislav Blinov
wrote:
On Friday, 19 October 2018 at 17:40:59 UTC, Carl Sturtivant
wrote:
If we imagine an Ordered Range being a finite Range of some
kind with the additional property that its values are ordered
(--- exact definition needed
On Friday, 19 October 2018 at 17:40:59 UTC, Carl Sturtivant wrote:
If we imagine an Ordered Range being a finite Range of some
kind with the additional property that its values are ordered
(--- exact definition needed ---)...
There's already a SortedRange:
On Wednesday, 17 October 2018 at 19:02:00 UTC, Steven
Schveighoffer wrote:
On 10/17/18 2:03 PM, Carl Sturtivant wrote:
On Monday, 15 October 2018 at 13:39:59 UTC, Steven
Schveighoffer wrote:
But that's just the thing -- merge sort *does* depend on the
container type. It requires the ability
On 10/17/18 2:03 PM, Carl Sturtivant wrote:
On Monday, 15 October 2018 at 13:39:59 UTC, Steven Schveighoffer wrote:
But that's just the thing -- merge sort *does* depend on the container
type. It requires the ability to rearrange the elements structurally,
since you merge the sets of items
On Monday, 15 October 2018 at 13:39:59 UTC, Steven Schveighoffer
wrote:
But that's just the thing -- merge sort *does* depend on the
container type. It requires the ability to rearrange the
elements structurally, since you merge the sets of items
together. This requires making another list
On 10/13/18 9:31 PM, Jonathan M Davis wrote:
On Saturday, October 13, 2018 6:52:05 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
You can't quick-sort a list. You can merge sort it, and it's O(nlgn).
I'll work on getting a sort routine into Phobos for it, but I don't know
what the
On Sunday, 14 October 2018 at 01:31:26 UTC, Jonathan M Davis
wrote:
Unless there's something about the implementation that's tied
to the list itself, I would think that it would make more sense
to make it a generic algorithm, then it will work with any
non-random-access range, and it avoids
On Sunday, 14 October 2018 at 01:31:26 UTC, Jonathan M Davis
wrote:
Unless there's something about the implementation that's tied
to the list itself, I would think that it would make more sense
to make it a generic algorithm, then it will work with any
non-random-access range, and it avoids
On Saturday, October 13, 2018 6:52:05 PM MDT Steven Schveighoffer via
Digitalmars-d-learn wrote:
> You can't quick-sort a list. You can merge sort it, and it's O(nlgn).
>
> I'll work on getting a sort routine into Phobos for it, but I don't know
> what the appropriate location for it is, as a
On 10/13/18 3:48 AM, Jacob Carlborg wrote:
On 2018-10-12 21:40, Codifies wrote:
a while ago I wrote a doubly linked list (in C), which has a compare
callback to allow custom sorting for example
int cmpNodes(cnode_t* n1, cnode_t* n2)
{
mapNode_t* rn1 = (mapNode_t*)(n1->data);
mapNode_t*
On Saturday, 13 October 2018 at 07:48:04 UTC, Jacob Carlborg
wrote:
On 2018-10-12 21:40, Codifies wrote:
a while ago I wrote a doubly linked list (in C), which has a
compare callback to allow custom sorting for example
int cmpNodes(cnode_t* n1, cnode_t* n2)
{
mapNode_t* rn1 =
On 2018-10-12 21:40, Codifies wrote:
a while ago I wrote a doubly linked list (in C), which has a compare
callback to allow custom sorting for example
int cmpNodes(cnode_t* n1, cnode_t* n2)
{
mapNode_t* rn1 = (mapNode_t*)(n1->data);
mapNode_t* rn2 = (mapNode_t*)(n2->data);
if (rn1->G
On 10/12/18 4:59 PM, Codifies wrote:
On Friday, 12 October 2018 at 20:29:27 UTC, Steven Schveighoffer wrote:
On 10/12/18 3:40 PM, Codifies wrote:
[...]
Unfortunately, I can't find a way to sort a doubly linked list in
phobos, so comparisons are somewhat moot.
However, if there *were* a
On Friday, 12 October 2018 at 20:29:27 UTC, Steven Schveighoffer
wrote:
On 10/12/18 3:40 PM, Codifies wrote:
[...]
Unfortunately, I can't find a way to sort a doubly linked list
in phobos, so comparisons are somewhat moot.
However, if there *were* a sorting routine, generally the
On 10/12/18 3:40 PM, Codifies wrote:
a while ago I wrote a doubly linked list (in C), which has a compare
callback to allow custom sorting for example
int cmpNodes(cnode_t* n1, cnode_t* n2)
{
mapNode_t* rn1 = (mapNode_t*)(n1->data);
mapNode_t* rn2 = (mapNode_t*)(n2->data);
if (rn1->G
a while ago I wrote a doubly linked list (in C), which has a
compare callback to allow custom sorting for example
int cmpNodes(cnode_t* n1, cnode_t* n2)
{
mapNode_t* rn1 = (mapNode_t*)(n1->data);
mapNode_t* rn2 = (mapNode_t*)(n2->data);
if (rn1->G + rn1->H > rn2->G + rn2->H) return 1;
17 matches
Mail list logo