| 
	LoÃc Grenià on Thu, 06 Sep 2012 07:49:18 +0200
	 | 
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
	
	| 
        Re: number of lines of matrices
	 | 
 
- To: pari-dev@pari.math.u-bordeaux.fr
 
- Subject: Re: number of lines of matrices
 
- From: LoÃc Grenià <loic.grenie@gmail.com>
 
- Date: Thu, 6 Sep 2012 07:49:10 +0200
 
- Delivery-date: Thu, 06 Sep 2012 07:49:18 +0200
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=mime-version:in-reply-to:references:date:message-id:subject:from:to         :content-type:content-transfer-encoding;        bh=jqsuCGcOtwzHA0BockvPEx1QLYkNvQdcHFCPY3gUFIw=;        b=SID/h2JE5tLsHd+dNBXMwLtmHyqcuuUV3J8YVmgoyyGssWY6oeZ3NfomxyXae77AFs         JLE8NDR+qiBNLd9xJr42ZJbqt1fm5kqk1aSBAQX8YuZXC/GSP3xl7WUgfKjiG8sEsGo0         ienLQNWsc9JA4bU399FTm7fqZvjzec+9HHeu1c7FBf/kavex0l1IBZ0E34t/ANRQP3e2         9KpYAG2b1Pw0yM+LTlUbKhn8/xyyyiZvRRUCVL5r8KurfJIMHBh0DC2iiXwdiOvaDCec         rM94rKq+EXTPHJ89bMNDMP98pONtVxVDABny3yMCsH6nrC0CjIMsxdtkc+Y6snjOStsT         pvOw==
 
- In-reply-to: <20120905213902.GG28485@yellowpig>
 
- References: <20120905213902.GG28485@yellowpig>
 
2012/9/5 Bill Allombert <Bill.Allombert@math.u-bordeaux1.fr>:
> Dear PARI Developers,
>
> Maybe we should add a function to query the number of lines of a non-empty matrix.
>
> There are lot of instances of lg(x[1]) in the code, and this should be replaced
> by lg(gel(x,1)) because it causes problem with strict aliasing.
>
> something like
> INLINE long
> nblin(GEN x) { return lg(gel(x,1))-1; }
>
> But how should we call it ? widthmat() ?
  heightmat maybe ? In that case widthmat should also be implemented I
  think. matwidth/height sound better (most matrix functions start with mat)
  but degpol is degpol and not poldeg.
         Thanks,
                 LoÃc