-
Notifications
You must be signed in to change notification settings - Fork 182
Add IsGenericMatrixRep matrix object type
#6322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 21 commits
ab613e3
c7ce377
cd615d8
20cb5d9
bfeea74
4c8e15a
ec0d2fe
ce80685
d3850ea
ec8d4ea
779cd77
9b59c1a
9021a26
3b20fa9
8a2fe0c
33779c5
0cac33b
7f2e2a4
f246b18
a7ea309
6abd94f
1ba59c4
a2ea205
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| ############################################################################# | ||
| ## | ||
| ## This file is part of GAP, a system for computational discrete algebra. | ||
| ## | ||
| ## SPDX-License-Identifier: GPL-2.0-or-later | ||
| ## | ||
| ## Copyright of GAP belongs to its developers, whose names are too numerous | ||
| ## to list here. Please refer to the COPYRIGHT file for details. | ||
| ## | ||
|
|
||
| ############################################################################ | ||
| # | ||
| # Dense matrix objects backed by plain lists of plain row lists. | ||
| # | ||
|
|
||
| ############################################################################# | ||
| ## | ||
| ## <#GAPDoc Label="IsGenericMatrixRep"> | ||
| ## <ManSection> | ||
| ## <Filt Name="IsGenericMatrixRep" Arg='obj' Type="Representation"/> | ||
| ## | ||
| ## <Description> | ||
| ## An object <A>obj</A> in <Ref Filt="IsGenericMatrixRep"/> describes | ||
| ## a matrix object (see <Ref Filt="IsMatrixObj"/>) whose entries are stored | ||
| ## as a dense plain list of dense plain row lists. | ||
| ## <P/> | ||
| ## This representation is optimized for efficient entry access via | ||
| ## <M>M[i,j]</M>. Unlike <Ref Filt="IsPlistMatrixRep"/>, it is not a row | ||
| ## list matrix, so direct row access via <M>M[i]</M> is not supported. | ||
| ## </Description> | ||
| ## </ManSection> | ||
| ## <#/GAPDoc> | ||
| ## | ||
| DeclareRepresentation( "IsGenericMatrixRep", | ||
| IsMatrixObj and IsPositionalObjectRep | ||
| and IsCopyable | ||
| and IsNoImmediateMethodsObject | ||
| and HasNumberRows and HasNumberColumns | ||
| and HasBaseDomain and HasOneOfBaseDomain and HasZeroOfBaseDomain, | ||
| [] ); | ||
|
|
||
|
|
||
| # Internal positions for flat plist matrices. | ||
|
fingolfin marked this conversation as resolved.
Outdated
|
||
| BindConstant( "FBDPOS", 1 ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the leading "F" stand for "Flat"? If so it should probably be "G" for generic no? |
||
| BindConstant( "FCOLSPOS", 2 ); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason that this exists? It seems to only be used in If this is for performance reasons, then maybe a comment indicating that?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then we'd loose support for
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I see, and I agree that 0xm matrices are useful. Maybe add a comment about this? |
||
| BindConstant( "FROWSPOS", 3 ); | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It'd be good to clarify what the difference is between
IsPlistMatrixRepandIsGenericMatrixRepis here, as described in one of the comments elsewhere.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For example, although I know what is intended "a dense plain list of dense plain row lists" and "is not a row list matrix" seem contradictory. More words might indicate more clearly what is meant here.