New answers tagged

1 vote

Ordering function with recognition of duplicates

Using Association - related functions (which were not available at the time the question was posted): ...
eldo's user avatar
  • 47.8k
1 vote

Sort matrix by columns and rows without changing them

Using ReverseSort: ReverseSort[ReverseSort /@ Transpose[tab]] (*{{1, 1, 1, 1}, {1, 1, 1, 0}, {1, 1, 0, 0}, {1, 0, 0, 0}}*)
E. Chan-López's user avatar
1 vote

Sort matrix by columns and rows without changing them

Since V 12.0 there is ReverseSortBy ...
eldo's user avatar
  • 47.8k
1 vote

Implementing HeapSort in WL

Thanks go for Daniel for helping me to fix my problem. The fixed code is shown below: ...
LambdaHaskell's user avatar
1 vote

Implementing HeapSort in WL

As of V12.1, the "PriorityQueue" data structure is built in: ...
Greg Hurst's user avatar
  • 35.5k
2 votes
Accepted

How to sort filenames in actual numerical order?

Just use SortBy[names, {StringLength, Identity}] With numbers: ...
I.M.'s user avatar
  • 2,826
5 votes

How to sort filenames in actual numerical order?

...
kglr's user avatar
  • 384k
8 votes

How to sort filenames in actual numerical order?

This approach doesn't require extracting the numerical identifier. It first groups by length of filename and then lexicographically within each group. ...
JimB's user avatar
  • 40.4k
1 vote

Retaining and reusing a one-to-one mapping from a sort

Since V 12.0 there is OrderingBy which simplifies the solution considerably: ...
eldo's user avatar
  • 47.8k
5 votes

How to sort filenames in actual numerical order?

same way, but extract number automatically. ...
AsukaMinato's user avatar
  • 8,785
5 votes

How to sort filenames in actual numerical order?

$Version (* "13.3.1 for Mac OS X ARM (64-bit) (July 24, 2023)" *) Clear["Global`*"] File names in random order ...
Bob Hanlon's user avatar
  • 151k
5 votes
Accepted

Range of values which not satisfy an equation?

Perhaps ...
Ulrich Neumann's user avatar
4 votes

Reproducing a ranking function that behaves like Excel's RANK

...
Syed's user avatar
  • 41.6k
5 votes

Reproducing a ranking function that behaves like Excel's RANK

xlRanks = 1 + Length @ # - Ceiling @ Statistics`Library`GetDataRankings @ # &; Examples: ...
kglr's user avatar
  • 384k
4 votes

Reproducing a ranking function that behaves like Excel's RANK

...
eldo's user avatar
  • 47.8k
2 votes

Inserting an integer into a sorted list

1. Introduction Since V 12.1 there is CreateDataStructure A link to its many members: DataStructures A suitable choice for the question at hand would be ...
eldo's user avatar
  • 47.8k
0 votes

Writing a function that sorts by low powers while ignoring higher powers of various variables

If I decompress your example and assign it to "ampl", then I can run the following code on it: ...
jdp's user avatar
  • 1,061
0 votes

Sorting a list of lines such that they are successively connected

Here is what I coded. Here, $u$ has a list of lines. $v$ is the list of directed lines. To this end, the initial line segment must be specified, i.e., $v_{1}=u_{15}$ below. ...
bkarpuz's user avatar
  • 799

Top 50 recent answers are included