vecsearch t_MAT

"Ruud H.G. van Tol" <[email protected]> Wed, 22 Jan 2025 10:15:12 +0100
Newsgroups gmane.comp.mathematics.pari.devel
Message-ID <[email protected]>
??vecsearch
[...]
? v = vecsort([3,0,2; 1,0,2]) \\ sort matrix columns according to lex order
    %1 =
    [0 2 3]

    [0 2 1]
    ? vecsearch(v, [3,1]~)
    %2 = 3
    ? vecsearch(v, [3,1])  \\ can search for x or x~
    %3 = 3
    ? vecsearch(v, [1,2])
    %4 = 0 \\ not in the list
[...]

The docs mention an "abuse of notation" czse,
but in v2.17.0 that doesn't work as mentioned:

? my(v=vecsort([3,0,2; 1,0,2])); printp(v); vecsearch(v, [3,1]~)

[0 2 3]

[0 2 1]

   ***   at top-level: ...=vecsort([3,0,2;1,0,2]));vecsearch(v,[3,1]~)
   *** ^-------------------
   *** vecsearch: incorrect type in vecsearch (t_MAT).

-- Ruud