* [gentoo-commits] gentoo-x86 commit in sci-mathematics/octave/files: octave-3.4.3-pkgbuilddir.patch octave-3.6.3-rcond.patch
@ 2012-10-26 18:27 Sebastien Fabbro (bicatali)
0 siblings, 0 replies; only message in thread
From: Sebastien Fabbro (bicatali) @ 2012-10-26 18:27 UTC (permalink / raw
To: gentoo-commits
bicatali 12/10/26 18:27:13
Modified: octave-3.4.3-pkgbuilddir.patch
Added: octave-3.6.3-rcond.patch
Log:
Version bump
(Portage version: 2.2.01.21165-prefix/cvs/Linux x86_64)
Revision Changes Path
1.2 sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch?r1=1.1&r2=1.2
Index: octave-3.4.3-pkgbuilddir.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sci-mathematics/octave/files/octave-3.4.3-pkgbuilddir.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- octave-3.4.3-pkgbuilddir.patch 19 Jan 2012 15:06:57 -0000 1.1
+++ octave-3.4.3-pkgbuilddir.patch 26 Oct 2012 18:27:13 -0000 1.2
@@ -1,3 +1,6 @@
+Description: Allow installation of already extracted packages with pkg.m
+Forwarded: not-needed
+Author: Thomas Weber <tweber@debian.org>
--- scripts/pkg/pkg.m.orig 2011-02-08 03:00:51.000000000 -0700
+++ scripts/pkg/pkg.m 2011-03-18 09:31:24.670165643 -0600
@@ -644,7 +644,14 @@
1.1 sci-mathematics/octave/files/octave-3.6.3-rcond.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/octave/files/octave-3.6.3-rcond.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-mathematics/octave/files/octave-3.6.3-rcond.patch?rev=1.1&content-type=text/plain
Index: octave-3.6.3-rcond.patch
===================================================================
Description: Fix rcond function
Use new copy of data for full factorization if positive definite cholesky
factorization fails.
Origin: upstream, http://hg.savannah.gnu.org/hgweb/octave/rev/197774b411ec
Bug: http://savannah.gnu.org/bugs/?37336
Applied-Upstream: version, 3.6.4
Last-Update: 2012-09-14
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
diff --git a/liboctave/CMatrix.cc b/liboctave/CMatrix.cc
--- a/liboctave/CMatrix.cc
+++ b/liboctave/CMatrix.cc
@@ -1786,13 +1786,15 @@
else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
{
double anorm = -1.0;
- ComplexMatrix atmp = *this;
- Complex *tmp_data = atmp.fortran_vec ();
if (typ == MatrixType::Hermitian)
{
octave_idx_type info = 0;
char job = 'L';
+
+ ComplexMatrix atmp = *this;
+ Complex *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().
row(static_cast<octave_idx_type>(0)).max();
@@ -1829,6 +1831,9 @@
{
octave_idx_type info = 0;
+ ComplexMatrix atmp = *this;
+ Complex *tmp_data = atmp.fortran_vec ();
+
Array<octave_idx_type> ipvt (dim_vector (nr, 1));
octave_idx_type *pipvt = ipvt.fortran_vec ();
@@ -2098,8 +2103,10 @@
{
info = 0;
char job = 'L';
+
ComplexMatrix atmp = *this;
Complex *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
F77_XFCN (zpotrf, ZPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
diff --git a/liboctave/dMatrix.cc b/liboctave/dMatrix.cc
--- a/liboctave/dMatrix.cc
+++ b/liboctave/dMatrix.cc
@@ -1454,13 +1454,15 @@
else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
{
double anorm = -1.0;
- Matrix atmp = *this;
- double *tmp_data = atmp.fortran_vec ();
if (typ == MatrixType::Hermitian)
{
octave_idx_type info = 0;
char job = 'L';
+
+ Matrix atmp = *this;
+ double *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().
row(static_cast<octave_idx_type>(0)).max();
@@ -1495,6 +1497,9 @@
{
octave_idx_type info = 0;
+ Matrix atmp = *this;
+ double *tmp_data = atmp.fortran_vec ();
+
Array<octave_idx_type> ipvt (dim_vector (nr, 1));
octave_idx_type *pipvt = ipvt.fortran_vec ();
@@ -1760,8 +1765,10 @@
{
info = 0;
char job = 'L';
+
Matrix atmp = *this;
double *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
F77_XFCN (dpotrf, DPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
@@ -1838,6 +1845,7 @@
Matrix atmp = *this;
double *tmp_data = atmp.fortran_vec ();
+
if(anorm < 0.)
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
diff --git a/liboctave/fCMatrix.cc b/liboctave/fCMatrix.cc
--- a/liboctave/fCMatrix.cc
+++ b/liboctave/fCMatrix.cc
@@ -1782,13 +1782,15 @@
else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
{
float anorm = -1.0;
- FloatComplexMatrix atmp = *this;
- FloatComplex *tmp_data = atmp.fortran_vec ();
if (typ == MatrixType::Hermitian)
{
octave_idx_type info = 0;
char job = 'L';
+
+ FloatComplexMatrix atmp = *this;
+ FloatComplex *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().
row(static_cast<octave_idx_type>(0)).max();
@@ -1825,6 +1827,9 @@
{
octave_idx_type info = 0;
+ FloatComplexMatrix atmp = *this;
+ FloatComplex *tmp_data = atmp.fortran_vec ();
+
Array<octave_idx_type> ipvt (dim_vector (nr, 1));
octave_idx_type *pipvt = ipvt.fortran_vec ();
@@ -2094,8 +2099,10 @@
{
info = 0;
char job = 'L';
+
FloatComplexMatrix atmp = *this;
FloatComplex *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
F77_XFCN (cpotrf, CPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
diff --git a/liboctave/fMatrix.cc b/liboctave/fMatrix.cc
--- a/liboctave/fMatrix.cc
+++ b/liboctave/fMatrix.cc
@@ -1454,13 +1454,15 @@
else if (typ == MatrixType::Full || typ == MatrixType::Hermitian)
{
float anorm = -1.0;
- FloatMatrix atmp = *this;
- float *tmp_data = atmp.fortran_vec ();
if (typ == MatrixType::Hermitian)
{
octave_idx_type info = 0;
char job = 'L';
+
+ FloatMatrix atmp = *this;
+ float *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().
row(static_cast<octave_idx_type>(0)).max();
@@ -1495,6 +1497,9 @@
{
octave_idx_type info = 0;
+ FloatMatrix atmp = *this;
+ float *tmp_data = atmp.fortran_vec ();
+
Array<octave_idx_type> ipvt (dim_vector (nr, 1));
octave_idx_type *pipvt = ipvt.fortran_vec ();
@@ -1760,8 +1765,10 @@
{
info = 0;
char job = 'L';
+
FloatMatrix atmp = *this;
float *tmp_data = atmp.fortran_vec ();
+
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
F77_XFCN (spotrf, SPOTRF, (F77_CONST_CHAR_ARG2 (&job, 1), nr,
@@ -1838,6 +1845,7 @@
FloatMatrix atmp = *this;
float *tmp_data = atmp.fortran_vec ();
+
if(anorm < 0.)
anorm = atmp.abs().sum().row(static_cast<octave_idx_type>(0)).max();
diff --git a/src/DLD-FUNCTIONS/rcond.cc b/src/DLD-FUNCTIONS/rcond.cc
--- a/src/DLD-FUNCTIONS/rcond.cc
+++ b/src/DLD-FUNCTIONS/rcond.cc
@@ -93,4 +93,12 @@
%!assert( rcond ([1 1; 2 1]), 1/9)
%!assert( rcond (magic (4)), 0, eps)
+%!shared x, sx
+%! x = [-5.25, -2.25; -2.25, 1] * eps () + ones (2) / 2;
+%! sx = [-5.25, -2.25; -2.25, 1] * eps ("single") + ones (2) / 2;
+%!assert (rcond (x) < eps ());
+%!assert (rcond (sx) < eps ('single'));
+%!assert (rcond (x*i) < eps ());
+%!assert (rcond (sx*i) < eps ('single'));
+
*/
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2012-10-26 18:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-26 18:27 [gentoo-commits] gentoo-x86 commit in sci-mathematics/octave/files: octave-3.4.3-pkgbuilddir.patch octave-3.6.3-rcond.patch Sebastien Fabbro (bicatali)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox