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

Fixed SaveAlgebra/ReadAlgebra for algebras with 11+ vertices #75

Closed HereComesTheMoon closed 2 years ago

HereComesTheMoon commented 2 years ago

The ReadAlgebra and SaveAlgebra functions had bugs for algebras with 11 or more vertices. More precisely: When using SaveAlgebra on an algebra with vertices eg. 1,...,11 then they were stored in the file as follows:

Vertices:
1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
, 11

ReadAlgebra threw an error when trying to read such a file in. I rewrote the code to remove the redundant ", " in the second line, and made ReadAlgebra slightly more robust. I also added a simple test which stores an algebra with 11 vertices, then reads it back in (and deletes the file after).