octave-maintainers
[Top][All Lists]
Advanced

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

some unapplied patches


From: David Bateman
Subject: some unapplied patches
Date: Tue, 12 Feb 2008 13:13:33 +0100
User-agent: Thunderbird 2.0.0.6 (X11/20070914)

Here are two patches that haven't been applied yet.. What was the status
on them. I modified the lwork calculation for xGELSD such that the value
is only set for overdetermined matrices, limiting the effect of this
change..

D.

-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary

# HG changeset patch
# User Kostas Poulios
# Date 1202487113 -3600
# Node ID f9c0a40f7048dca6bdf5777f142414a5d376a9be
# Parent  319aa1108506816ba99f6b146829de0c61b7ef58
Fixes for quiver3

diff -r 319aa1108506 -r f9c0a40f7048 scripts/ChangeLog
--- a/scripts/ChangeLog Fri Feb 08 17:08:56 2008 +0100
+++ b/scripts/ChangeLog Fri Feb 08 17:11:53 2008 +0100
@@ -1,3 +1,8 @@ 2008-02-08  David Bateman  <address@hidden
+2008-02-08  Kostas Poulios <address@hidden>
+
+       * plot/__quiver__.m: make arrow head be in z-plane of the arrow
+       body. Allow the linespec to specify the arrow color.
+
 2008-02-08  David Bateman  <address@hidden
 
        * plot/__contour__.m: Respect the graphic handle options that are
diff -r 319aa1108506 -r f9c0a40f7048 scripts/plot/__quiver__.m
--- a/scripts/plot/__quiver__.m Fri Feb 08 17:08:56 2008 +0100
+++ b/scripts/plot/__quiver__.m Fri Feb 08 17:11:53 2008 +0100
@@ -133,11 +133,13 @@ function hlist = __quiver__ (varargin)
        h1 = plot3 ([x.'; xend.'; NaN(1, length (x))](:),
                    [y.'; yend.'; NaN(1, length (y))](:),
                    [z.'; zend.'; NaN(1, length (z))](:),
-                   "linestyle", linespec.linestyle);
+                   "linestyle", linespec.linestyle, 
+                   "color", linespec.color);
       else
        h1 = plot ([x.'; xend.'; NaN(1, length (x))](:),
                   [y.'; yend.'; NaN(1, length (y))](:),
-                  "linestyle", linespec.linestyle);
+                  "linestyle", linespec.linestyle, 
+                   "color", linespec.color);
       endif
     else
       if (is3d)
@@ -158,7 +160,7 @@ function hlist = __quiver__ (varargin)
     yarrw1 = ytmp - (x - xend) * arrowsize / 3;
     yarrw2 = ytmp + (x - xend) * arrowsize / 3;
     if (is3d)
-      zarrw1 = zarrw2 = zend - w(:) * arrowsize / 3;
+      zarrw1 = zarrw2 = zend - w(:) * arrowsize;
     endif
 
     if (have_line_spec)
@@ -179,11 +181,13 @@ function hlist = __quiver__ (varargin)
          h2 = plot3 ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:),
                      [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:),
                      [zarrw1.'; zend.'; zarrw2.'; NaN(1, length (z))](:),
-                     "linestyle", linespec.linestyle);
+                     "linestyle", linespec.linestyle,
+                     "color", linespec.color);
        else
          h2 = plot ([xarrw1.'; xend.'; xarrw2.'; NaN(1, length (x))](:),
                     [yarrw1.'; yend.'; yarrw2.'; NaN(1, length (y))](:),
-                    "linestyle", linespec.linestyle);
+                    "linestyle", linespec.linestyle,
+                     "color", linespec.color);
        endif
       endif
     elseif (is3d)
# HG changeset patch
# User David Bateman
# Date 1202487189 -3600
# Node ID 594eddf38b599d0e393d7cd7e062f510b887e48c
# Parent  f9c0a40f7048dca6bdf5777f142414a5d376a9be
Workaround lwork calculation issue in lapack xGELSD function

diff -r f9c0a40f7048 -r 594eddf38b59 liboctave/CMatrix.cc
--- a/liboctave/CMatrix.cc      Fri Feb 08 17:11:53 2008 +0100
+++ b/liboctave/CMatrix.cc      Fri Feb 08 17:13:09 2008 +0100
@@ -2532,6 +2532,15 @@ ComplexMatrix::lssolve (const ComplexMat
       else
        {
          lwork = static_cast<octave_idx_type> (std::real (work(0)));
+         // Workaround issue in current lapack calculation of lwork
+           if (n > 1.6 * static_cast<double> ( m < n ? m : n))
+           {
+             octave_idx_type path2a = 4*m + m*m +(m < 2*m-4 ? 2*m-4 : 
+                                                  (m < nrhs ? nrhs : 
+                                                   (m < n-3*m ? n-3*m : m)));
+             if (lwork < path2a)
+               lwork = path2a;
+           }
          work.resize (lwork);
 
          F77_XFCN (zgelsd, ZGELSD, (m, n, nrhs, tmp_data, m, pretval,
@@ -2704,6 +2713,15 @@ ComplexMatrix::lssolve (const ComplexCol
       else
        {
          lwork = static_cast<octave_idx_type> (std::real (work(0)));
+         // Workaround issue in current lapack calculation of lwork
+           if (n > 1.6 * static_cast<double> ( m < n ? m : n))
+           {
+             octave_idx_type path2a = 4*m + m*m +(m < 2*m-4 ? 2*m-4 : 
+                                                  (m < nrhs ? nrhs : 
+                                                   (m < n-3*m ? n-3*m : m)));
+             if (lwork < path2a)
+               lwork = path2a;
+           }
          work.resize (lwork);
          rwork.resize (static_cast<octave_idx_type> (rwork(0)));
          iwork.resize (iwork(0));
diff -r f9c0a40f7048 -r 594eddf38b59 liboctave/ChangeLog
--- a/liboctave/ChangeLog       Fri Feb 08 17:11:53 2008 +0100
+++ b/liboctave/ChangeLog       Fri Feb 08 17:13:09 2008 +0100
@@ -1,3 +1,9 @@ 2008-02-07  John W. Eaton  <address@hidden
+2008-02-08  David Bateman  <address@hidden>
+
+       * dMatrix.cc, CMatrix.cc (lssolve): Workaround error in
+       calculation of lwork in current implementations of lapacks xGELSD
+       functions.
+
 2008-02-07  John W. Eaton  <address@hidden>
 
        * Range.cc (Range::sort_internal): Rename from sort.  New arg,
diff -r f9c0a40f7048 -r 594eddf38b59 liboctave/dMatrix.cc
--- a/liboctave/dMatrix.cc      Fri Feb 08 17:11:53 2008 +0100
+++ b/liboctave/dMatrix.cc      Fri Feb 08 17:13:09 2008 +0100
@@ -2135,6 +2135,15 @@ Matrix::lssolve (const Matrix& b, octave
       else
        {
          lwork = static_cast<octave_idx_type> (work(0));
+         // Workaround issue in current lapack calculation of lwork
+           if (n > 1.6 * static_cast<double> ( m < n ? m : n))
+           {
+             octave_idx_type path2a = 4*m + m*m +(m < 2*m-4 ? 2*m-4 : 
+                                                  (m < nrhs ? nrhs : 
+                                                   (m < n-3*m ? n-3*m : m)));
+             if (lwork < path2a)
+               lwork = path2a;
+           }
          work.resize (lwork);
 
          F77_XFCN (dgelsd, DGELSD, (m, n, nrhs, tmp_data, m, pretval,
@@ -2300,6 +2309,15 @@ Matrix::lssolve (const ColumnVector& b, 
       else
        {
          lwork = static_cast<octave_idx_type> (work(0));
+         // Workaround issue in current lapack calculation of lwork
+           if (n > 1.6 * static_cast<double> ( m < n ? m : n))
+           {
+             octave_idx_type path2a = 4*m + m*m +(m < 2*m-4 ? 2*m-4 : 
+                                                  (m < nrhs ? nrhs : 
+                                                   (m < n-3*m ? n-3*m : m)));
+             if (lwork < path2a)
+               lwork = path2a;
+           }
          work.resize (lwork);
 
          F77_XFCN (dgelsd, DGELSD, (m, n, nrhs, tmp_data, m, pretval,

reply via email to

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