octave-maintainers
[Top][All Lists]
Advanced

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

Re: hess(rosser())


From: John W. Eaton
Subject: Re: hess(rosser())
Date: Wed, 4 Jul 2012 13:47:51 -0400

On  4-Jul-2012, Matyas Sustik wrote:

| What is not clear to me is how octave keeps track whether a matrix
| is symmetric or Hermitian.  For example rosser() returns a symmetric
| matrix, but I am not sure that it is "marked" as symmetric. 
| Checking every time that A= A' would be inefficient.
| 
| This improvement stems from the observation that hess(rosser()) returns a
| matrix that is (quite) not symmetric while rosser() is.

The MatrixType class is supposed to keep track of that info.  The type
is cached, so it should only have to be set once.  If the Matrix
object is modified, then the cached type info will be invalidated and
the check will have to be done again.

Note that the type info is stored with octave_value objects, not the
Matrix/Array objects themselves.  I didn't write this code and haven't
looked at it carefully so I'm not sure why that choice was made.

jwe


reply via email to

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