You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are sparse matrices from the gauss package not allowed to have zero entries? Because I get an error when trying to compute the rank of such a matrix; for example:
┌───────┐ GAP 4.13.0 of 2024-03-15
│ GAP │ https://www.gap-system.org
└───────┘ Architecture: x86_64-pc-linux-gnu-default64-kv9
Configuration: gmp 6.2.1, GASMAN, readline
Loading the library and packages ...
Packages: AClib 1.3.2, Alnuth 3.2.1, AtlasRep 2.1.8, AutPGrp 1.11,
Browse 1.8.21, CaratInterface 2.3.6, CRISP 1.4.6, Cryst 4.1.27,
CrystCat 1.1.10, CTblLib 1.3.9, FactInt 1.6.3, FGA 1.5.0,
Forms 1.2.9, GAPDoc 1.6.7, genss 1.6.8, IO 4.8.2, IRREDSOL 1.4.4,
LAGUNA 3.9.6, orb 4.9.0, Polenta 1.3.10, Polycyclic 2.16,
PrimGrp 3.4.4, RadiRoot 2.9, recog 1.4.2, ResClasses 4.7.3,
SmallGrp 1.5.3, Sophus 1.27, SpinSym 1.5.2, StandardFF 1.0,
TomLib 1.2.11, TransGrp 3.6.5, utils 0.85
Try '??help' for help. See also '?copyright', '?cite' and '?authors'
gap> LoadPackage("gauss");
─────────────────────────────────────────────────────────────────────────────
Loading Gauss 2023.02-04 (Extended Gauss functionality for GAP)
by Simon Görtzen (https://www.linkedin.com/in/simongoertzen/).
maintained by:
Mohamed Barakat (https://mohamed-barakat.github.io) and
Sebastian Gutsche (https://sebasguts.github.io).
Homepage: https://homalg-project.github.io/pkg/Gauss
Report issues at https://github.com/homalg-project/homalg_project/issues
─────────────────────────────────────────────────────────────────────────────
true
gap> SN := SparseMatrix( 2, 3, [ [ 2 ], [ 1, 3 ] ], [ [ 1 ], [ 3, 2 ] ] * One( GF(3) ) );
<a 2 x 3 sparse matrix over GF(3)>
gap> Rank(SN);
Error, no method found! For debugging hints type ?Recovery from NoMethodFound
Error, no 2nd choice method found for `RankDestructive' on 2 arguments at $(GAPPATH)/lib/
methsel2.g:250 called from
RankDestructive( CopyMat( mat ), mat!.ncols
) at $(GAPPATH)/pkg/gauss/gap/Sparse.gi:396 called from
<function "Rank method for sparse matrices">( <arguments> )
called from read-eval loop at *stdin*:3
type 'quit;' to quit to outer loop
brk>
It would be nice if gauss could handle this more gracefully. Moreover, if zero entries are not permitted, then I would recommend stating this more clearly in the documentation. (In my opinion, it would be better if gauss automatically processed such entries so that it doesn't have any problems with it later on.)
The text was updated successfully, but these errors were encountered:
Oh, I see. Could this be added to the documentation?
Even better would be the following (which I'll leave as a feature request): it would be nice if gauss could automatically ignore zero entries in the input. It already seems to do this when constructing from a GAP matrix and when calling SetEntry or AddToEntry, but not when calling SparseMatrix( nrows, ncols, indices, entries[, R] ).
Yes, this should be added to the documentation. PR are welcome :)
Yes, SparseMatrix is a low-level computational interface. It is not meant for direct user interaction. We use Gauss through GaussForHomalg. So SparseMatrix is already a SparseMatrixNC.
Are sparse matrices from the
gauss
package not allowed to have zero entries? Because I get an error when trying to compute the rank of such a matrix; for example:This gives the following error:
It would be nice if
gauss
could handle this more gracefully. Moreover, if zero entries are not permitted, then I would recommend stating this more clearly in the documentation. (In my opinion, it would be better ifgauss
automatically processed such entries so that it doesn't have any problems with it later on.)The text was updated successfully, but these errors were encountered: