#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:         |  c5a7eee39d4c6dce006d1f6f8fd7a23383d540b7
Report Upstream:  N/A    |     Stopgaps:
         Branch:         |
  public/19418           |
   Dependencies:         |
-------------------------+-------------------------------------------------

Comment (by dimpase):

 Replying to [comment:14 ncohen]:

 > First-pass review:
 thanks, and apologies for sloppy code (back to Oxford with huge jetlag)
 >
 > - Why don't you call `normalise_hadamard` instead of adding a keyword
 inside of
 >   `hadamard_matrix_paleyI` (without changing `hadamard_matrix_paleyII`)?
 Those
 >   two functions are not directly available to the users, who are meant
 to call
 >   `hadamard_matrix` directly.

 `normalize_hadamard` does not do what I need; I need a different type of
 normalization, in fact, where the matrix has the 1st row consisting of 1s,
 and still H+H.T==2*I,
 i.e. the 1st column of H is all -1 (with exception of the top left entry)

 Should I perhaps introduce `skew_normalize_hadamard`,
 that can only be applied to skew Hadamard matrices?
 (I'd have uses for it in graph constructions, too)

 >
 > - `is_hadamard_martrix` -- could you move 'skew=False' to before
 'verbose=False'
 >   ? Usually the verbosity/check flags are the last ones to appear as
 they do not
 >   change the behaviour of the functon.

 right. I forgot that keyword args can be positional, too...

 >
 > - Call `is_skew_symmetric` instead of doing it yourself. In theory you
 shouldn't
 >   have to create two copies of the matrix in memory in order to check
 that.
 >
 > - `zero_position=1` -- you have to write documentation for private
 functions
 >   too. Does [the paraeter that you add] appear in the lemma cited in the
 >   docstring?
 >
 > - `zero_position=1` -- if you meant `True`, write `True`.
 >
 > - `_circulant_matrix` -- if it does not exist yet, this constructor
 should be
 >   added in the matrix/ code and be available through `matrix.<tab>`

 OK

 >
 > - `mod(j-i,n)` is `(j-i)%n`. One day you will have to accept that you
 write
 >   Python code.
 >
 > - Instead of a `_GS_skew_hadamard` function that encodes 4 matrices, why
 don't
 >   you reserve cases `if n == 36' (and others) in the main function
 >   `skew_hadamard_matrix`? That would also solve the problem that this
 function
 >   has no documentation whatsoever.
 I'd rather add documentation, thanks for reminding.
 I find `skew_hadamard_matrix` already hard to read, and
 it would positively turn ugly if I start adding that explicit data for
 matrices there.

 >
 > - 'and' (see wikipedia:
 https://en.wikipedia.org/wiki/Bitwise_operation#AND) is
 >   a useful operator in computer science. E.g.:
 >
 > {{{
 > +    if M is None: # try Williamson-Goethals-Seidel construction
 > +        if _GS_skew_hadamard(n, existence=True):
 > }}}
 >   becomes
 > {{{
 > +    if M is None and_GS_skew_hadamard(n, existence=True):
 > }}}
 oops - there is an extra `if` there that should go...

 >
 > - `switch_skewhad_pow2` -- please respect the current standard for the
 names in
 >   `graphs.<tab>`. Upper case, no underscore, ends with `Graph`.
 Actually, it
 >   could be named 'SwitchSkewhadGraph` and only mention the `pow2` part
 in the
 >   docstring.
 >
 > - `graphs.Pseudo_L_2n_4n_m_1`? Seriously? If you cannot give it a clear
 and
 >   meaningful name easily, then take it as a sign that this function
 should not
 >   be exposed to the users directly.

 How about we have a `PseudoLatinSquaresGraph(m,n)` or
 `PseudoOrthogonalArrayBlockGraph(m,n)` ? (I'd prefer the former name; or
 maybe we can have both?)

 It would include `Pseudo_L_2n_4n_m_1` and `OrthogonalArrayBlockGraph` as
 subcases.
 (Perhaps there are more subcases, in fact, but we don't have to worry
 about it now).


 >
 > - `_L_g_n_params` -- yes, please remove this function if you do not use
 it.
 sure.

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