John Cremona on Sun, 10 Mar 2024 13:03:48 +0100


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Vecsize?


Libpari has a function matsize which gives the pair [nrows,ncols] of a matrix but I could not find a similar vecsize for vectors. This is for use in a C program, I know that you can use # in GP. My solution is to use matsize anyway and ignore one of the numbers it gives (which is 1).

I also could not find a function which would create an nxn matrix of integers, ready to be filled with C ints in a double loop, but creating a zero matrix of the right size works ok. I spent a long time searching through the manual, where the relevant information and functions are very scattered (and with few examples).

To end on a positive note, your matsnf works a whole lot better and faster than the equivalent function in flint!

John