[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #54399] function LuAminusSigmaB in eigs-base.c
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #54399] function LuAminusSigmaB in eigs-base.cc can be made faster for special case of sigma == 0 |
Date: |
Tue, 31 Jul 2018 12:28:40 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0 |
Follow-up Comment #19, bug #54399 (project octave):
There are several different templates for the function. In some of them,
sigma is a real value declared in C++ as a double. Here is one such example.
static bool
LuAminusSigmaB (const SparseMatrix& m, const SparseMatrix& b,
bool cholB, const ColumnVector& permB, double sigma,
SparseMatrix& L, SparseMatrix& U, octave_idx_type *P,
octave_idx_type *Q, ColumnVector &r)
In this case it is appropriate to compare sigma to 0.0.
In other cases sigma can be complex as in this prototype for the function
static bool
LuAminusSigmaB (const SparseComplexMatrix& m, const SparseComplexMatrix& b,
bool cholB, const ColumnVector& permB, Complex sigma,
SparseComplexMatrix& L, SparseComplexMatrix& U,
octave_idx_type *P, octave_idx_type *Q, ColumnVector &r)
{
In these cases you can use the C++ abs() function to get the magnitude of the
complex number so something like this
if (std::abs (sigma) != 0.0)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?54399>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #54399] test eigs fail, (continued)
- [Octave-bug-tracker] [bug #54399] test eigs fail, Dmitri A. Sergatskov, 2018/07/29
- [Octave-bug-tracker] [bug #54399] test eigs fail, Marco Caliari, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Dmitri A. Sergatskov, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Marco Caliari, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Rik, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Marco Caliari, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Dmitri A. Sergatskov, 2018/07/30
- [Octave-bug-tracker] [bug #54399] test eigs fail, Rik, 2018/07/30
- [Octave-bug-tracker] [bug #54399] function LuAminusSigmaB in eigs-base.cc can be made faster for special case of sigma == 0, Rik, 2018/07/30
- [Octave-bug-tracker] [bug #54399] function LuAminusSigmaB in eigs-base.cc can be made faster for special case of sigma == 0, Marco Caliari, 2018/07/31
- [Octave-bug-tracker] [bug #54399] function LuAminusSigmaB in eigs-base.cc can be made faster for special case of sigma == 0,
Rik <=