#19418: skew-Hadamard matrices and related srg's
-------------------------+-------------------------------------------------
       Reporter:         |        Owner:
  dimpase                |       Status:  needs_work
           Type:         |    Milestone:  sage-6.10
  enhancement            |   Resolution:
       Priority:  major  |    Merged in:
      Component:         |    Reviewers:  Nathann Cohen
  combinatorics          |  Work issues:
       Keywords:         |       Commit:
        Authors:  Dima   |  3503d6218c68b2d1f8e08ffe832daeb0c4b393d4
  Pasechnik              |     Stopgaps:
Report Upstream:  N/A    |
         Branch:         |
  public/19418           |
   Dependencies:         |
  #19309                 |
-------------------------+-------------------------------------------------

Comment (by dimpase):

 Replying to [comment:37 ncohen]:
 > - I don't think that you need to import functions at the top of every
 single
 >   '::' block. If you imported them in a previous doctest of the same
 function
 >   they are usually around. I say 'usually' because I don't think I read
 that
 >   anywhere, but it just works. If the order in which doctests are run
 can be
 >   'random', I think that it just shuffles the functions and not the
 doctests
 >   inside of a function.

 OK. Removed some of these...

 >
 > - docstring of zero_position: bad alignment of 'place it first'. Misses
 one
 >   space.
 >
 > - Same line: the sentence is not complete -- what about adding 'When it'
 at its
 >   beginning?
 >
 > - You did not doctest your new flag. Also, the code *looks* wrong.

 well, actually in this case the code is not doing what is advertised;
 without my flag the matrix for n=4k-1 is not symmetric w.r.t. the anti-
 diagonal; the submatrix obtained by removal of the 1st row and the 1st
 column is  symmetric w.r.t. the anti-diagonal.
 I changed the doc accordingly.
 And added a doctest.

 >
 > - Docstring of `williamson_goethals_seidel_skew_hadamard_matrix`. Things
 seem to
 >   miss from the first sentence of the paragraph. Or it's me being sick
 again.
 >   P.S.: syntactically, a ')' is missing at least.
 >
 fixed.

 > - Same function. The following doc should be in the function that
 actually
 >   returns those matrices:
 >   {{{
 >   +    Matrices for `n=36` and `52` are given in [GS70s]_. Matrices for
 `n=92` are given
 >   +    in [Wall71]_.
 >   }}}
 >
 moved

 > - `_GS_skew_hadamard` -- the name of that function is a bit too vague.
 What
 >   about `GS_skew_hadamard_smallcases`? You don't necessarily need to
 make it
 >   private, by the way. It lives in a module and does not appear in the
 global
 >   namespace, so only the interested guys will find it. And it's not
 technically
 >   complicated to use, the input/output is well defined and reliable. It
 can't be
 >   misused.
 >
 renamed as you proposed.


 > - private functions need doctests too. 'cdef' is the only situation in
 which you
 >   don't need them.

 OK, OK... added
 >
 > - `def pmtoZ(s):` could be defined in the only 'if' that requires it
 (not very
 >   important).

 well, if we added more data in +- - format, it would be at the right place
 as it is.
 >
 > - docstring of `skew_hadamard_matrix` -- in the block of doc about
 'existence',
 >   one reads 'but that design does not exist'. Could you replace 'design'
 by
 >   'matrix'?

 done

 >
 > - I don't see why the following doctest has a 'long' flag
 >   {{{
 >   sage: skew_hadamard_matrix(784,existence=True) # long time
 >   }}}
 >   If you actually built the matrix, however, that would be correct.
 >
 good catch - fixed


 > - I don't think that `check=False` is useful when `existence=True`
 >   {{{
 >   skew_hadamard_matrix(n//2,existence=True, check=False)
 >   }}}

 uh oh... fixed.

 >
 > - `if _GS_skew_hadamard(n, existence=True)` -- it hardly matters, but it
 would
 >   be 'cleaner' to call this (quick) function before checking the more
 >   complicated (recursive) constructions.

 Oh, well, if you feel like changing this, go ahead...

 >
 > - Shouldn't you also check that the matrix is 'skew-normalized', as we
 do with
 >   the regular normalization?
 >   {{{
 >   +    if skew_normalize:
 >   +        dd = diagonal_matrix(M[0])
 >   +        M = dd*M*dd
 >   +    if check:
 >   +        assert is_hadamard_matrix(M, normalized=False, skew=True)
 >   }}}

 added a check.

 >
 > - If you are too humble to do it yourself, I will change that to 'Return
 the
 >   Pasechnik graph of order n' `:-)`
 >   {{{
 >   +    Pseudo-`OA(2n-1,4n-1)`-graph from a skew Hadamard matrix of order
 `4n`
 >   }}}

 if you must...

 >
 > - Please add your new graphs to the `graphs.<tab>` constructor.
 actually, I removed them, but I'll add them again...

 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=fd7894aa1f32d08c0836d506f33e883d870a9bfc
 fd7894a]||{{{check that skew_normalize worked}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=3503d6218c68b2d1f8e08ffe832daeb0c4b393d4
 3503d62]||{{{rest of fixes for hadamard_matrix.py}}}||
 ----
 New commits:
 
||[http://git.sagemath.org/sage.git/commit/?id=fd7894aa1f32d08c0836d506f33e883d870a9bfc
 fd7894a]||{{{check that skew_normalize worked}}}||
 
||[http://git.sagemath.org/sage.git/commit/?id=3503d6218c68b2d1f8e08ffe832daeb0c4b393d4
 3503d62]||{{{rest of fixes for hadamard_matrix.py}}}||

--
Ticket URL: <http://trac.sagemath.org/ticket/19418#comment:40>
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.

Reply via email to