#19112: Add a function "isometry" to the quadratic forms package.
-------------------------------------+-------------------------------------
       Reporter:  tgaona             |        Owner:
           Type:  enhancement        |       Status:  needs_review
       Priority:  minor              |    Milestone:  sage-6.10
      Component:  quadratic forms    |   Resolution:
       Keywords:  isometry           |    Merged in:
        Authors:  Tyler Gaona        |    Reviewers:
Report Upstream:  N/A                |  Work issues:
         Branch:                     |       Commit:
  u/tgaona/ticket/19112              |  d2b3dde11edb22ba199d4666b99ad753865c5322
   Dependencies:                     |     Stopgaps:
-------------------------------------+-------------------------------------

Comment (by jdemeyer):

 Can you explain this block of code:
 {{{
 #!diff
 +            # Find a vector w such that Q(v) = F(w) where v = [1, ..., 0]
 +            # v, w = vectors_of_common_length_dev(Q, F, q_basis, f_basis,
 i)
 +            v = vector([0] * (n - i))
 +            index = 0;
 +            while True:
 +                v[index] = v[index] + 1
 +                index = (index + 1) % (n - i)
 +                c = Q(v)
 +                try:
 +                    w = F.solve(c)
 +                    #print("Find vectors {0} and {1} such that Q(v) =
 F(w)".format(v, w))
 +                    if not zero_row(f_basis, w, i) and not
 zero_row(q_basis, v, i):
 +                        break
 +                except ArithmeticError:
 +                    # No solution found, try another vector.
 +                    pass
 }}}

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