#9894: Group cohomology spkg, version 2.1.2
-------------------------------------------------------+--------------------
Reporter: SimonKing | Owner:
Type: enhancement | Status:
needs_review
Priority: major | Milestone:
sage-5.0
Component: optional packages | Resolution:
Keywords: modular group cohomology solaris t2 | Work issues:
Report Upstream: N/A | Reviewers:
Karl-Dieter Crisman
Authors: Simon King | Merged in:
Dependencies: | Stopgaps:
-------------------------------------------------------+--------------------
Changes (by SimonKing):
* status: needs_work => needs_review
Comment:
I have updated the spkg (at the old location).
Changes: I modified the hash function of my `MeatAxe` matrix wrapper.
Before, the hash was based on the triple given by the modulus of the
finite field, the dimensions of the matrix, and the contents of the memory
block describing the matrix. Now, it is ''only'' based on the memory block
describing the matrix.
Rationale:
* In our applications, the field is fixed, and so it does not add useful
information to the hash.
* The size of the block of memory describing the matrix gives some
information about the dimensions of the matrix, such that including the
''exact'' dimensions is not so important.
Also it is faster in that way:
{{{
sage: from pGroupCohomology.mtx import MTX
sage: M = MTX(5, [[randint(0,4) for _ in range(15)] for __ in range(15)])
sage: M.set_immutable()
sage: %timeit n = hash(M)
# With the new version
625 loops, best of 3: 750 ns per loop
# With the old version
625 loops, best of 3: 1.61 µs per loop
}}}
The doc test for the `__hash__` method should now be machine independent.
In order to provide an indirect test, I added a method that returns a
string that corresponds to the block of memory describing the matrix.
On my computer, all tests pass. Concerning the doctests marked "optional -
internet": Apparently they are run by the test suite, and they pass for me
as well - even though the group cohomology data base in the Sage cluster
is not available anymore. Fortunately, for the single purpose of testing
my package, I stored one cohomology ring at
sage.math.washington.edu/home/SimonKing/Cohomology/ - and that's enough
for the tests to work.
Back to "needs review", then!
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9894#comment:55>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.