gap icon indicating copy to clipboard operation
gap copied to clipboard

Let DefaultScalarDomainOfMatrixList use BaseDomain if input is list of MatrixObj's

Open ssiccha opened this issue 4 years ago • 0 comments

Main commit:

Fix DefaultScalarDomainOfMatrixList

For a list of MatrixObj matrices, DefaultScalarDomainOfMatrixList now
always uses BaseDomain.

Previously, for general MatrixObj matrices this did not happen due to
them usually not storing their attributes. BaseDomain also wasn't used
for uncompressed MatrixObj matrices which were lists of lists of finite
field elements.

Also contains some minor cleanups:

  • Refactor FieldOfMatrixGroup
  • Clarify DefaultScalarDomainOfMatrixList
  • Add tests for functions in lib/grpffmat.gi

Further thoughts

In general I'd find it cleaner to install a separate method for lists of MatrixObj matrices. Maybe use something like CategoryCollections(IsMatrixObj)? This would be stricter than just accepting lists which have holes or aren't homoegeneous, which is an upside IMO. I'd be happy to adjust the PR accordingly.

Also, I'm wondering whether this is a general problem we'll see with methods handling matrices. How many were

  • written before the MatrixObj project was started,
  • are applicable to a subset of MatrixObj matrices, and
  • don't use information like BaseDomain, NrCols, or NrRows and are thus inefficient or maybe even wrong?

What do you think @ThomasBreuer and @fingolfin?

ssiccha avatar Oct 12 '21 12:10 ssiccha