Post a reply
Username:
Note:If not registered, provide any username. For more comfort, register here.
Subject:
Message body:
Enter your message here, it may contain no more than 60000 characters. 

Smilies
:D :) :( :o :shock: :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen:
Font size:
Font colour
Options:
BBCode is ON
[img] is ON
[flash] is OFF
[url] is ON
Smilies are ON
Disable BBCode
Disable smilies
Do not automatically parse URLs
Confirmation of post
To prevent automated posts the board requires you to enter a confirmation code. The code is displayed in the image you should see below. If you are visually impaired or cannot otherwise read this code please contact the %sBoard Administrator%s.
Confirmation code:
Enter the code exactly as it appears. All letters are case insensitive, there is no zero.
   

Topic review - Get size of bigintmat
Author Message
  Post subject:  Re: Get size of bigintmat  Reply with quote
The size function in Singular for a matrix is very misleading, though may be useful is some situations. Further as per the man page of size, it does not accept bigintmat.

The best way to get the size of a matrix / intmat / bigintmat is to use nrows and ncols functions.

Code:
> bigintmat mymat[2][4] = 1,2,3,4,5,6,8;
> nrows (mymat);
> ncols (mymat);



VInay
Post Posted: Wed Sep 28, 2016 9:23 am
  Post subject:  Get size of bigintmat  Reply with quote
Hi all,

if I call size for a bigintmat, it will cause an error.

Code:
> bigintmat mymat[2][4] = 1,2,3,4,5,6,8;
> size(mymat);                                                                                                                                               
   ? size(`bigintmat`) failed                                                                                                                               
   ? expected size(`bigint`)
   ? expected size(`number`)
   ? expected size(`resolution`)
   ? expected size(`string`)
   ? expected size(`poly`)
   ? expected size(`vector`)
   ? expected size(`ideal`)
   ? expected size(`module`)
   ? expected size(`matrix`)
   ? expected size(`intvec`)
   ? expected size(`intmat`)
   ? expected size(`list`)
   ? expected size(`ring`)
How can I get the total number of entries of a bigintmat besides explicit conversion to intmat? I'd like to be able to call size(mymat) where mymat is of type bigintmat.
Post Posted: Tue Sep 27, 2016 4:19 pm


It is currently Wed Dec 13, 2017 7:01 pm
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group