Skip to content

Releases: jewettaij/jacobi_pd

updated test code

28 Nov 07:00
Compare
Choose a tag to compare

I updated "test_jacobi.hpp" to correctly test for code coverage, and the README.md documentation file. No changes were made to the library code ("jacobi_pd.hpp" or "matrix_alloc_jpd.hpp").

many small changes that could break backward compatibility

28 Nov 06:08
Compare
Choose a tag to compare
  1. I changed "matrix_alloc" to "matrix_alloc_jpd" everywhere to reduce the chance of future naming collisions.
    (This should not effect most users unless they were explicitly using "#include<matrix_alloc.hpp>", in their code. In that case they will have to change that line to "#include<matrix_alloc_jpd.hpp>". However there is no reason I can think of that most users would want to include this header file in their code, so hopefully this small change won't effect many people.)
  2. Jacobi::Diagonalize() now returns number of iterations (ie. the number of off-diagonal pivots considered, which is always > 0), or 0 when convergence failed. (In the past, it used to return the number of sweeps, where each "sweep" corresponds to n(n-1)/2 iterations.) Now it's much easier to tell if it converged or not, simply by checking whether the return value is 0. (Note: If you were not checking for convergence, then this change to jacobi_pd should not break compatibility with your code.)
  3. This code now runs on 1x1 matrices without crashing.
  4. "include<cassert>" was removed. (I also commented out all of the assert() statements. I left them in the code because I think they improve code readability.)

I don't anticipate making any future modifications which will break backward compatibility.

renamed files and added a missing #include

05 Sep 07:32
Compare
Choose a tag to compare

renamed:
-jacobi.hpp -> jacobi_pd.h
-jacobi_public_doman -> jacobi_pd

added:

#include <algorithm>

corrected a typo in the C++11 move constructor

01 Sep 23:25
Compare
Choose a tag to compare

I discovered that in some 3rd-party code which uses the Jacobi class, that typo was causing compile failures. I also improved the automated tests using examples containing const vector<vector>, const array<array>, and const fixed-size arrays.

automated tests should be more robust now

31 Aug 04:10
Compare
Choose a tag to compare

In previous releases, the tests run by travis (tests/test_jacobi.cpp) only work if the arguments supplied are chosen to avoid large differences in eigenvalue magnitudes. Due to numeric underflow, it is normal for significant errors to appear in low-magnitude eigenvalues (and corresponding eigenvectors) whenever the difference between the magnitudes of the smallest and largest eigenvalues exceed 1.0e10. This is normal even if the algorithm is working correctly. To be fair, huge differences in eigenvalue magnitudes like this are not usually encountered. However such matrices would cause the automated tests to fail. Now, the automated tests are smart enough to avoid concluding that the test has failed in these cases.

A new argument (eps) was also introduced allowing the tolerance to be set by the caller (instead of a constant). (It is 1.0e-06 by default.)

simplified matrix_alloc.hpp

15 Feb 02:26
Compare
Choose a tag to compare

matrix_alloc.hpp is shorter.
(One or two outdated irrelevant crufty comments were removed.)

added a default template argument and simplified examples

12 Feb 21:14
Compare
Choose a tag to compare

Creating a new instance of Jacobi currently only requires a minimum of 3 template arguments. This was used to simplify the example in the README.md file. (In the past, 4 template arguments were rewuired.) Several other small changes were also made.

added a default constructor and a set function (Jacobi::SetSize())

10 Feb 03:18
Compare
Choose a tag to compare

Added a default constructor and made "Jacobi::SetSize()" public. (It is conceivable that some use cases may require a default constructor.) This way, the size of the matrices to be analyzed by Jacobi::Diagonalized() can be specified later after an instance of Jacobi is created.

coverage and benchmark tests added

04 Feb 00:24
Compare
Choose a tag to compare

A couple small changes in jacobi.hpp were to make it easier to perform code coverage tests. In addition, some small changes were made to "test_jacobi.cpp" (formerly "test.cpp") to make it easier to do benchmarking tests. (Code-coverage and benchmark results were also added to the README.md file.)

now also works with C arrays of fixed size

31 Jan 16:52
Compare
Choose a tag to compare

unit tests also test for compatibility with fixed size C arrays (in addition to several other array types that were tested earlier). Only the testing code was effected. The jacobi.hpp file remains unchanged from the v1.1.0 release.