gap-packages / qpa

GAP package for quivers and path algebras
https://folk.ntnu.no/oyvinso/QPA/
GNU General Public License v2.0
30 stars 13 forks source link

Allow an empty list of matrices in RightModuleOverPathAlgebra. #41

Closed erich-9 closed 4 years ago

erich-9 commented 4 years ago

If possible, I would like to be allowed to create the zero module with the following command:

RightModuleOverPathAlgebra(A, []);

This doesn't work at the moment since GAP Collections cannot be empty. With the changes in this commit the command above will work. But maybe there is a better way to implement it.

codecov[bot] commented 4 years ago

Codecov Report

Merging #41 into master will increase coverage by <.01%. The diff coverage is 85.71%.

@@            Coverage Diff             @@
##           master      #41      +/-   ##
==========================================
+ Coverage   59.71%   59.72%   +<.01%     
==========================================
  Files          70       70              
  Lines       20455    20462       +7     
==========================================
+ Hits        12214    12220       +6     
- Misses       8241     8242       +1
Impacted Files Coverage Δ
lib/module.gd 100% <100%> (ø) :arrow_up:
lib/module.gi 66.27% <83.33%> (+0.07%) :arrow_up:
sunnyquiver commented 4 years ago

The zero module over a path algebra can be constructed via

gap> ZeroModule(A);                            
<[ 0, 0, 0 ]>

or via

gap> RightModuleOverPathAlgebra(A, [0,0,0],[]);
<[ 0, 0, 0 ]>

Is this sufficient?

erich-9 commented 4 years ago

Yes, this is sufficient. Thank you.

After thinking about it again, it is probably not even a good idea if the command above returned the zero module (even if it might me convenient in some places).