#16553: Clean IncidenceStructure
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_work
Priority: major | Milestone: sage-6.3
Component: combinatorial | Resolution:
designs | Merged in:
Keywords: | Reviewers:
Authors: Nathann Cohen, | Work issues:
Vincent Delecroix | Commit:
Report Upstream: N/A | 428113c0bef095a97189239435c6fb4a92dbe099
Branch: public/16553 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
I adressed the issues you mentioned. I only answer to those for which
there was a problem
> - `_relabel_bibd(BalancedIncompleteBlockDesign(N,k).blocks(),N)` remove
`.blocks()`, avoids a copy
done. But it is not clear to me:
- are we allowed to modify the output of `blocks`?
- are we allowed to modify the output of `__iter__`?
If both answers are yes, then there are copy anyway (I did not implement
the copy=False idea).
> - Why remove `OA_to_projective_plane` ?
Sorry, I should have said this: it was *completely* broken!!
> - Why this ?
>
> {{{
> - A 3-design::
> -
> - sage: D =
IncidenceStructure(range(32),designs.steiner_quadruple_system(32))
> - sage: D.is_block_design()
> - (True, [3, 32, 4, 1])
> }}}
It has nothing to do here (in the doc of `AffineGeometryDesign`).
> - Why this ?
>
> {{{
> - sage: BD = designs.WittDesign(12) # optional - gap_packages
(design package)
> - sage: BD.is_block_design() # optional - gap_packages
(design package)
> - (True, [5, 12, 6, 1])
> }}}
The same test above is copied I guess 5 times all over the place.
> - What is the point of `__ne__` when you have `__eq__` ?
It is not automatically set up to `not __eq__`. You should learn your
python
{{{
sage: class A(object):
....: def __eq__(self, other):
....: return True
....:
sage: a = A()
sage: b = A()
sage: a == b
True
sage: a != b
True
}}}
> - `IncidenceStructure(matrix)` broken ?
It was. Now if the input is a matrix there is a check
> - replication_number -> degree ?
removed, it was equivalent to .degrees(1)
> - intersection_number -> needs a definition
> - intersection_number -> use itertools.combination
removed, it was equivalent to .degrees(2)
> - `replication_number`, `intersection_number`, `degrees` --> another
ticket. By
> the way, the implementation of `degrees` is ridiculous. Think of the
> algorithmics behind instead of using fancy "reduce" functions.
degrees can not be in another commit since it is used in `.is_t_design`. I
implemented a more reasonable version (but a bit ugly because of the
cached_method
over an iterator...)
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/16553#comment:38>
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.