Karim Belabas on Sun, 10 Mar 2024 13:36:49 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
- To: John Cremona <john.cremona@gmail.com>
- Subject: Re: Vecsize?
- From: Karim Belabas <Karim.Belabas@math.u-bordeaux.fr>
- Date: Sun, 10 Mar 2024 13:36:43 +0100
- Arc-authentication-results: i=1; smail; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1710074205; c=relaxed/relaxed; bh=mI/oyOVfmac6Cc4WHM2Mm8x+jD/AikfKTSv2qhHsiXw=; h=DKIM-Signature:Date:From:To:Cc:Subject:Message-ID: Mail-Followup-To:References:MIME-Version:Content-Type: Content-Disposition:Content-Transfer-Encoding:In-Reply-To; b=MNnlPlnJIrzOMe4VsfCz9HKWcS0z5FEHD9bZBScL9Z/FTStOSuhWZ3A7CcVuRYSgKhYs4zj22f2/OPAihQVRSdJ+0FgVUxODugWaeUgiaHQEJWXrSU4d+kDAV7sJw6q8aoWXGUcWFUQRlXgeZG8mGXw63BIOqC9ST0wCfGlm2WCXWgrQjQp8JZV6CcifL9q+NmF4S3T97jsvwYkMdKbCx9insFDT8A5/EyNCmdEpw5bSuuLhQ3RB9iqHs7Pz+LW1qC8krZUps2CQpz6hwOq5cIGzzL0fQCbavsOqSN24I9mNJ/1aYKw0xxZFe0NkLhiWBfPV8ugxqg4L2fmAZxnhoMwbeVMrgr+IbzbMnhtq3WLZIB5aSnafYPbxh2OKvwvS+sWyazK5yqTwhVD/7ACMxy8CKFQGNoNKGVoefvwsV57nwUXTMvFDZGefwBMJtmKNBrHF2ondAzyn9kIXBA5kR16dQhP0nB1tI4JODE3yJMdnz4fsbGUGgNaoEFMqO8yj1grzT6aXcj3uNtaHSJZRvy5CuvvRi/+bievSNoF/fAdgMsMQtqHJ3LPTh26g1Md0ZL4hq3mQQ6AQRxN+dO0GNC4xqJBaaylTSagDwrcL/P4FWfCRg2xa31OEZ+M/PP+u09Z+rwp5lJVZqEieMcTeS5IANVvD5iu7pWTVON0+xq4=
- Arc-seal: i=1; a=rsa-sha256; d=math.u-bordeaux.fr; s=openarc; t=1710074205; cv=none; b=m0P+yB6YUFoMsY7zGNW6IOnbL/sM4DNfM4wfVp6hh5VowpwP7pfj+7a4BE6wXmKMqvxI3GEgod/3xJbBer/1KSiAN4np5YxzHRmBW3iH4T2Ls/xefobgVpuWj5TGrtPlAic7MEPoCw/pNNqTZIHxaKX8CF+4uprMmeM6u1tAuVWxTuD9rq8wk/CeJlEiW10pmWvgX9PW0ONmiyL9cluf8OYBW94qJ2vXSOGSGrVX/bhCxMNEeuTgYmIW5UvrURJaOswq0pQeRZknQbg2zr9ClsPCBZtx58gVpmgh86pbhGIWzchV08jamG9ATCqPlceP4la1LRp87wUy5668MO/K+obe1Bx5xx4BFY1mo/NoXBdOBDWZb/lX0UIUncKMVEojEBjSXYDIiJnbVal0z1CPpcktWDzC8mJ0ba0oAwDGdxC0a3N+H7YIeVvXeZU6BPBkTn5Vd9t+wzaiPFlsSTTJwYm3pWX/9T9z1wGxr02olYQxm9L42C0PRj/43+t9utjMjjBlfuy6zgEKwSKajvsrtVmSrCQDNnlw+IbGSl1Y2mWGHvMbl+iYyEOCSxoKpAK3EmApmrmhlWZWfcc7pTUHRfeCkbgvSTOrXPoUzPBNDHoJs7O/MRR1PaTBrNvlRfsr+F6EziXu/y4JXjdEFhVRXMF78ME+oKteYsbt+lGKyiw=
- Authentication-results: smail; dmarc=none header.from=math.u-bordeaux.fr
- Authentication-results: smail; arc=none
- Cc: Pari Users <pari-users@pari.math.u-bordeaux.fr>
- Delivery-date: Sun, 10 Mar 2024 13:36:49 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=math.u-bordeaux.fr; s=2022; t=1710074205; bh=mI/oyOVfmac6Cc4WHM2Mm8x+jD/AikfKTSv2qhHsiXw=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MO8XZkHr5SJRxK6gjUJ5wYnFMof91sBilBQP1gBy9Ivz2vzZ0s0qy3FqopDO1NfQk t/nZNy6NB9Ssd90MBwQCo9jWt1ABGqxaARPYC+Qv+g61Yta/EgBbXybwhOIeoaVQ38 K3o6zpzv9DqID1NF+hEGiEo2x+L1ABJxf0+RmZadiSZuyZIfUWfHWmp0jUmFptLh5d o844XG1Q9X99mSXR/jjqFeTQcNz4mtUHFHB/V4aKErf8qbllBEQPJ2NFq7YjiTvaZx FdsfkhACk1LyNGTthWj9nDnmFz17w9MFOapNIvQ/jo5cUbO7W0bhLurshl3Jafxnwo uwfcxu41tsvCdVkJhoUlhiiDs83WKQHv+p4afhxj9EkIxTF4LsVpWg9c6uprGhDbNC 4NKpAk/BfrYS9VHBTZB9KTRXGiM7E57dhUGezvDRvsjIRzl6ibD5ITIzF8AiA94VSW f/i4AaaOh4mwZBvgSnyeTZwXyC1Bk0rCATPvMJ+joX9ytN8GGUYvN6wnN4tOtRUtHj 2RL6boKFudO3rkRkfKXRQdEKkG0Vscp7xkCviRWs5sf+EYD1vfiVhIm0a0VKeIpo6Z 1YH7yi9MKWrucSFw+PE4hwseSBompl7spW3rOI7c8YFcAVq/F647t8rFJ0lT3rnoU9 6bBk+fuHzymo6YmAjPOeoBh0=
- In-reply-to: <CAD0p0K7kV6XDuRKnF1pFDsD-FGy6u-pzVFSmfwhK0Mmh0bhuUg@mail.gmail.com>
- Mail-followup-to: John Cremona <john.cremona@gmail.com>, Pari Users <pari-users@pari.math.u-bordeaux.fr>
- References: <CAD0p0K7kV6XDuRKnF1pFDsD-FGy6u-pzVFSmfwhK0Mmh0bhuUg@mail.gmail.com>
Hi John,
* John Cremona [2024-03-10 13:03]:
> 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).
lg(M) - 1
cf subsection 4.5.14 (in section 4.5 Implementation of the PARI types)
> 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.
zero_Flm_copy()
> I spent a long time searching
> through the manual, where the relevant information and functions are very
> scattered (and with few examples).
General information is given in chapter 4 and 5, more detailed information in
chapter 6 and following. Chapger 6 is for integers and reals, chapter 7
is for low level functions operating on more general containers
(polynomials, vectors, matrices) grouped according to the kind of objects
they take as input or produce [ read "7.1 Naming scheme" for details ]
The rest is for more specialized topics.
If you read 7.1, you should come to the conclusion that you want a "zm"
function; these are described in 7.5.4. And zero_zm() is not hard to find
there. Unfortunately, it's not what you want: the zero_zm() description says
it's the same as zero_Flm() which won't work for you (if you modify
one column, you modify them all). The next function is zero_Flm_copy(),
which will work.
But the short answer is: this function you are looking for does not
exist, it's not needed anywhere in libpari. You probably don't need it
either !
Please provide more details about what exactly you what to achieve.
As usual for libpari: the true documentation is the source code
(and all examples are here :-).
Cheers,
K.B.
--
Pr. Karim Belabas, U. Bordeaux, Vice-président en charge du Numérique
Institut de Mathématiques de Bordeaux UMR 5251 - (+33) 05 40 00 29 77
http://www.math.u-bordeaux.fr/~kbelabas/
- References:
- Vecsize?
- From: John Cremona <john.cremona@gmail.com>