#16553: Clean IncidenceStructure
-------------------------------------+-------------------------------------
Reporter: vdelecroix | Owner:
Type: enhancement | Status: needs_review
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 | 9243ef16bf0e7ad800bca41fa6d5001042859d76
Branch: public/16553 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by ncohen):
First passe review:
- Deprecated argument for `BlockDesign(test=...)`
- `_relabel_bibd(BalancedIncompleteBlockDesign(N,k).blocks(),N)` remove
`.blocks()`, avoids a copy
- `is_block_design` -> `t_design_parameters` O_o ??? `is_t_design` ?
- Why remove `OA_to_projective_plane` ?
- 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])
}}}
- lines `t_design_parameters` with an optional flag ? Why ?
- 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])
}}}
- `IncidenceStructure(matrix)` broken ?
- function that builds *and* incidence structure from a matrix
- The doc of IncidenceStructure needs an INPUT block. It is useless to
have one
in `__init__`, nobody sees it and it does not appear in the html doc.
- "point -- the points" is not very informative. Especially when you
handle
integers or iterables.
- Instead of doing
{{{
+ for i in range(b):
+ for j in range(v):
+ if not M[j,i].is_zero():
+ blocks[i].append(j)
}}}
You can use matrix methods, like rows() columns() dans their
to_dictionary()
function (you get the nonzero entries easily)
- `self.points() == other.points() and self.blocks() == other.blocks()` :
compare private variables immediately, possibly avoids a copy
- What is the point of `__ne__` when you have `__eq__` ?
- `points()` and `blocks()` for the classes I am implementing I thought we
should make them COPY the data instead of return it immediately by
default,
otherwise the users can change what is inside of them. With a
`copy=False`
flag to prevent this. What do you think ?
- replication_number -> degree ?
- intersection_number -> needs a definition
- intersection_number -> use itertools.combination
- `Note that the dual of a block design may not be a block design.` --> ?
- `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.
- `is_t_design` and `t_design_parameters` should be the same function.
Let's
just have optional `t,v,k,l` parameters in `is_t_design`.
Nathann
--
Ticket URL: <http://trac.sagemath.org/ticket/16553#comment:35>
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.