MOORe Tools

MOORe Tools is an attempt to create an object oriented toolbox for Matlab similar to the Regularization Tools package by Professor Per Christian Hansen. The name is an abbreviation for Modular Object Oriented Regularization Tools.

Furthermore, the toolbox extends the number of test problems and the emphasis is now more on iterative methods. This and the object oriented approach as opposed to the usual matrix/vector approach gives the user the possibility to work with larger problems.

The code was originally developed by PhD Michael Jacobsen, and further developed by PhD Toke Koldborg Jensen. A similar project aimed at image restoration, which also uses object oriented principles is the RestoreTools package by Professor James G. Nagy. The two packages have been created in cooporation and have some overlapping but different aims.

License

The software is provided as is. No guarantees of any kind is given. The software is free for non-commercial use.

Install instructions

The files come in a "tar.gz"-file. To install the package into Matlab perform the following steps:

  1. Create a directory for the package. When we refer to the directory we mean this directory.
  2. Download the software package ( latest update: October 27, 2006 ).
  3. Extract the files into your new directory. On Windows systems use Winzip or a similar tool to extract your files.
  4. Add the new directory to your Matlab path. This adds the class hierarchy
  5. Also add the subdirectories Algorithms and TestProblems. This adds to the path the auxiliary functions that do not belong to any specific class as well as the example test problems. Alternatively run the routine "setupdirs" to add these directories to the path.
  6. This step is only necessary if you want to use the least squares solver LSQRPRE or the test problem Interpolate. LSQRPRE uses "mex" files to interface to LAPACK routines and Interpolate uses a "mex" file for fast matrix-vector multiplication. These "mex" files must be compiled.
    1. Make sure your mex enviroment is properly setup (mex -setup).
    2. Then go to your new directory and run
      regmex
      
      The command will compile the needed mex-files for use with LSQRPRE and the test problem Interpolate. Note: This step can be troublesome. We have also precompiled these files for a few different operating systems - see the files section below.

Files

The software and documentation is placed in two packages.

For your convenience, we have precompiled the mex files in the package for some operating systems. Put them in the Algorithms/private directory. Your success may vary!

Mini Tutorial

The following lines show how to create a small problem and do 40 iterations with Conjugate Gradient Least Squares (CGLS) and the first 40 Truncated SVD (TSVD) solutions:

>> setupdirs    % Add Algorithms and TestExamples dir
>> [A,b,x] = blur(128, 3, 20);    % Create a Gauss blur prob.
>> bn = b + randn(size(b))*1e-3*norm(b);   % Add noise to problem
>> [Xcg, extcg] = cgls(A,bn, regset('Iter',1:40));
>> [Xt,  extt] = tsvd(A,bn, regset('RegPar', 1:40));

The solutions are stored as "columns" in Xcg and Xt. They can be displayed by e.g.,

>> show(Xcg(:,10)); % Show 10th cg result
>> show(Xt(:,15)); % Show tsvd solution with truncation parameter 15

It can be usefull to see the types of the entities we have created

>> whos
  Name        Size           Bytes  Class

  A       16384x16384       263864  KroneckerProduct2D object
  Xcg     16384x40         5267232  VectorCollection object
  Xt      16384x40         5267232  VectorCollection object
  b         128x128         131576  Vector2D object
  bn        128x128         131576  Vector2D object
  extcg       1x1             1332  struct array
  extt        1x1             1332  struct array
  x         128x128         131576  Vector2D object

Grand total is 1393413 elements using 11195720 bytes
Notice how the size of A is not reflected in the number of bytes.

Bugs, features, etc.

MOORe Tools does NOT run properly under Matlab 7 -> Matlab 7 SP2. A bug that caused an error in transposing an operator has been fixed, and MOORe Tools should again work with Matlab 7 SP3. There are no problems with e.g., Matlab 6.5.