#17042: Improvement to subsets_with_hereditary_property
-------------------------+-------------------------------------------------
Reporter: | Owner:
ncohen | Status: needs_work
Type: | Milestone: sage-6.4
enhancement | Resolution:
Priority: major | Merged in:
Component: | Reviewers:
combinatorics | Work issues:
Keywords: | Commit:
Authors: | 381cfeff4c3661aa71d46514f231f6926d0b7d40
Nathann Cohen | Stopgaps:
Report Upstream: N/A |
Branch: |
u/ncohen/17042 |
Dependencies: |
#16994 |
-------------------------+-------------------------------------------------
Comment (by ncohen):
Fixed
{{{
sage: l=map(Set, designs.ProjectiveGeometryDesign(2,1,GF(4,name='a')))
sage: f = lambda S: not any(len(set(S).intersection(x))>2 for x in l)
sage: %time SimplicialComplex(from_characteristic_function=(f, range(21)))
CPU times: user 584 ms, sys: 4 ms, total: 588 ms
Wall time: 587 ms
Simplicial complex with 21 vertices and 168 facets
}}}
It is like everybody has gave up thinking of algorithms.
Maybe I should change my job. I would be more useful to the world going
over other people's loops.
Anyway, the constructor is now faster. It could be made faster, but at the
cost of trying to understand why there is a `sort_faces` flag in this
constructor, and I am convinced that it would make me angry.
Just to illustrate the speedup:
Before
{{{
sage: S=list(Subsets(range(13)))
sage: %time SimplicialComplex(S)
CPU times: user 6.72 s, sys: 64 ms, total: 6.79 s
Wall time: 6.72 s
Simplicial complex with 13 vertices and facets {(0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12)}
}}}
After
{{{
sage: %time SimplicialComplex(S)
CPU times: user 172 ms, sys: 12 ms, total: 184 ms
Wall time: 172 ms
Simplicial complex with 13 vertices and facets {(0, 1, 2, 3, 4, 5, 6, 7,
8, 9, 10, 11, 12)}
}}}
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/17042#comment:13>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.