octave-maintainers
[Top][All Lists]
Advanced

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

Expm small patches


From: John W. Eaton
Subject: Expm small patches
Date: Fri, 14 Dec 2007 13:29:52 -0500

On 14-Dec-2007, Marco Caliari wrote:

| I have two small patches for expm in liboctave/dMatrix.cc and 
| liboctave/CMatrix.cc. They essentially substitute elem with fortran_vec 
| everywhere.

It seems your patch does a little more than just that:

| --- liboctave/dMatrix.cc.orig 2007-12-14 10:06:10.000000000 +0100
| +++ liboctave/dMatrix.cc      2007-12-14 10:07:33.000000000 +0100

| @@ -2479,32 +2481,31 @@
|    
|    // Now powers a^8 ... a^1.
|    
| -  octave_idx_type minus_one_j = -1;
| +  octave_idx_type minus_one_j = 1;
|    for (octave_idx_type j = 7; j >= 0; j--)
|      {
|        for (octave_idx_type i = 0; i < nc; i++)

| --- liboctave/CMatrix.cc.orig 2007-12-14 10:06:18.000000000 +0100
| +++ liboctave/CMatrix.cc      2007-12-14 10:08:06.000000000 +0100

| @@ -2859,32 +2864,31 @@
|  
|    // Now powers a^8 ... a^1.
|  
| -  int minus_one_j = -1;
| +  octave_idx_type minus_one_j = 1;
|    for (octave_idx_type j = 7; j >= 0; j--)
|      {
|        for (octave_idx_type i = 0; i < nc; i++)

Why did you make these changes?

Also, there are other arrays that use "operator() (int)" for indexing,
which ultimately calls elem.

I'm not sure this change is necessary, and in any case I think it can
wait until after 3.0.

jwe


reply via email to

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