octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #61762] qp should check positive definiteness


From: Olaf Till
Subject: [Octave-bug-tracker] [bug #61762] qp should check positive definiteness
Date: Tue, 4 Jan 2022 02:54:45 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0

URL:
  <https://savannah.gnu.org/bugs/?61762>

                 Summary: qp should check positive definiteness
                 Project: GNU Octave
            Submitted by: i7tiol
            Submitted on: Tue 04 Jan 2022 07:54:43 AM UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Missed Error or Warning
                  Status: None
             Assigned to: None
         Originator Name: Olaf Till
        Originator Email: 
             Open/Closed: Open
                 Release: dev
         Discussion Lock: Any
        Operating System: Any

    _______________________________________________________

Details:


qp ([], [21, 30, 39; 30, 45, 60; 39, 60, 81], [-40; -65; -90])
error: __qp__: operator *: nonconformant arguments (op1 is 2x2, op2 is 3x1)
error: called from
    qp at line 409 column 25


Running under gdb shows the exception is thrown by the last of the following
lines of __qp__.cc (lines 200--213):

              // Inverting the Hessian.  Using the Cholesky
              // factorization since the Hessian is positive
              // definite.

              math::chol<Matrix> cholH (H);

              R = cholH.chol_matrix ();

              Matrix Hinv = math::chol2inv (R);

              // Computing the unconstrained step.
              // p = -Hinv * g;

              p = -Hinv * g;


So H, given as an argument to __qp__, is required to be positive
definite. qp.m should check H to be positive definite before passing it to
__qp__. If the check fails, a suitable error flag should be returned. A patch
will be submitted as soon as a number is assigned to this bug report.





    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?61762>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]