lSort {Necklaces} | R Documentation |
Sort a list of vectors
Description
The function takes in input a list of vectors and returns the same list ordered in a lexicographical way.
Usage
lSort(pL = list())
Arguments
pL |
list of vectors to be ordered |
Details
The function takes as input a list of vectors and returns the same list ordered in a lexicographical way.
For example if the input list is (2,2,3),(3,2,3),(1,2,3)
, then the output of the function lSort
produces the following result:
(1,2,3),(2,2,3),(3,2,3).
Value
list |
the input list ordered in lexicographical way |
Note
Called by the cNecklaces
, cBracelets
, fNecklaces
, Necklaces
, Bracelets
, LyndonW
, sBruijn
functions in the Necklaces
package.
Author(s)
Elvira Di Nardo elvira.dinardo@unito.it,
Giuseppe Guarino giuseppe.guarino@rete.basilicata.it
References
Flajolet, P., and Sedgewick, R. (2009) Analytic combinatorics. Cambridge University press.
See Also
cNecklaces
,
cBracelets
,
fNecklaces
,
Necklaces
,
Bracelets
,
LyndonW
,
sBruijn
Examples
# Sort the following list (2,2,3),(3,2,3),(1,2,3)
#
lSort(list(c(2,2,3),c(3,2,3),c(1,2,3)))