See examples in Sort.mw
isleq(u,v)
check if the first argument is less or equal than the second one.
The main aim of this procedure is to extend evalb to lists.Sort(L,/F,id,$)::list
enhances interface to the built-in sort command
to sort L::list.
If F::procedure:=(u->u) is proc(anything,anything)
then it is used a standard input to the built-in sort command,
otherwise the value of F is used in comparison.
In addition, if id::list:=[] is nonempty then
instead of element e, the value of e[op(id)] is used in F.Rort(L,/F,id,$)::list
sorts in the reverse order.SortM(L,id)::list
sorts the list of lists L::list by all indices in the list id::list.SortIdx(L,/F,id,{nolist},$)::list
for a given L::indexable, returns the list of indexes P
such that L[P] is sorted.
Arguments F,id are the same as in Sort command.
The optional argument nolist::boolean has the same meaning
as for the built-in indices command.
Be aware that if type(L,rtable) then zero entries are ignored
in SortIdx,MaxVal,MinVal,MaxIdx,MinIdx.MaxVal/MinVal(L,/ForId,$)::list
return the greatest/smallest element.
Here ForId:=(u->u) can be either F or id from Sort command.MaxIdx/MinIdx(L,/ForId,$)::list
return index of the greatest/smallest element.SortEE(ev,/evc,F,$)
sort eigenvalues ev::Vector and
optionally eigenvectors evc::Matrix:=<<0>>
in the order of F(ev) (acts elementwise),
where F::procedure:=(u->u).SortSign(L,$)::{list,Vector},{-1,1}
sort L::{list,Vector} and return the sorted L together with the permutation sign.
It uses Insertion Sort algorithm.