http://www.perlmonks.org?node_id=1045607


in reply to Re^2: Understanding the Schwartzian transform.
in thread Understanding the Schwartzian transform.

Is this the canonical form of the Schwartzian Transform or a variant?

Yes, it can be considered as the canonical form of the Schwartzian Transform. The original ST that appeared in a newsgroup more than 15 years ago might not have worked on fila age (I don't remember), but, definitely, the "output_array = map {block} sort {block} map {block} input array" is the canonical form of the Schwartzian Transform.

  • Comment on Re^3: Understanding the Schwartzian transform.

Replies are listed 'Best First'.
Re^4: Understanding the Schwartzian transform.
by Anonymous Monk on Jul 22, 2013 at 08:03 UTC

    but, definitely, the "output_array = map {block} sort {block} map {block} input array" is the canonical for of the Schwartzian Transform.

    Sorry, that is like the generic form of Guttman-Rosler Transforms (see links) except without the secret ingredient :)(normalize/restore)

    Schwartzian is

    my @sorted = map { restore_from_cache } sort { by_cached_expensive } map { store_cache_expensive } @original;

      Sorry, but except that I did not detail what goes into the code blocks (as this has been detailed well enough the the previous posts), I do not see any difference between your version of the Schwartzian Transform and mine.

        Because in GRT, you just change the data so they can be sorted lexicographically as strings, while in Schwartzian transform, you create a structure. You can simplify both to map {} sort {} map {} list (in GRT, sort block can be omitted), their difference can be seen only if you give more details.
        لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ