Skip to content
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

Declaration of EntriesOfHomalgMatrix(AsListList) #306

Open
kamalsaleh opened this issue Jan 11, 2020 · 3 comments
Open

Declaration of EntriesOfHomalgMatrix(AsListList) #306

kamalsaleh opened this issue Jan 11, 2020 · 3 comments

Comments

@kamalsaleh
Copy link
Member

These methods are currently declared as operations applied on the homalg matrix. I have been wondering why to not declare them as attributes to the matrix?

Setting them as attributes would speed up the running time of multiples calls in many instances. For example in case of external rings in singular or magma.

@mohamed-barakat
Copy link
Member

An external homalg matrix has its defining data in the external CAS. The idea is to store small attributes in GAP and the above attributes are huge. We can think about introducing a marking for matrices which enables them to store this data. What do you think?

@kamalsaleh
Copy link
Member Author

mmm, very sensible. I was thinking about introducing two attributes:

##
DeclareAttribute( "EntriesOfHomalgMatrixAttr", IsHomalgMatrix );
DeclareAttribute( "EntriesOfHomalgMatrixAsListListAttr", IsHomalgMatrix );

##
InstallMethod( EntriesOfHomalgMatrixAttr, [ IsHomalgMatrix ], EntriesOfHomalgMatrix );
InstallMethod( EntriesOfHomalgMatrixAsListListAttr, [ IsHomalgMatrix ], EntriesOfHomalgMatrixAsListList );

These give enough flexibility and the user can use them (at the cost of memory) or not.

@kamalsaleh
Copy link
Member Author

or maybe store the output inside the record of the matrix, which can be triggered by an optional argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants