Closest-pair problem: Difference between revisions

Content added Content deleted
(→‎{{header|Maple}}: fixed brute force step to make sure it gets the right sub-set of L)
Line 2,284: Line 2,284:


local
local
ModuleApply := proc(L::{list,rtable},$)
ModuleApply := proc(L::list,$)
local Lx, Ly, out;
local Lx, Ly, out;
Ly := sort(L, 'key'=(i->i[2]), 'output'='permutation');
Ly := sort(L, 'key'=(i->i[2]), 'output'='permutation');