FAQ

  1. What is the difference between MatrixLib and using the MATLAB compiler?
  2. What is the difference between a member and non-member functions?
  3. Does MatrixLib use LAPACK?
  4. Will MatrixLib work with complex numbers?
  5. Should I buy the source code or a binary license?

  1. What is the difference between MatrixLib and using the MATLAB compiler?

    The MATLAB compiler automatically takes .m files and converts them into C++ files. MatrixLib is a programming library which aid in the conversion of MATLAB code. MATLAB is a procedural language and the conversion results in C++ functions that are also procedural in nature. The procedure for using MatrixLib is to write a C++ class and use MatrixLib to replicate the MATLAB code the performs the computation. This allows the user to take advantage of the object oriented features of C++. For example, the user would typically write a constructor to initialize the object, an initialization member to read in data and initialize the object, and then a member function that would contain the C++ code the does the computation. This results in a cleaner, more expandable code base in C++.

  2. What is the difference between a member and non-member functions?

    Member functions act on the object and change the object. For example

    ml_matrix r(3,1); ml_matrix t(3,1); ml_matrix z = r/(r.transpose()*r);
    ends up with a 1 by 3 matrix since the member function ml_matrix::transpose() converts r into a 1 by 3 matrix. To get a 3 by 1 matrix use
    ml_matrix r(3,1); ml_matrix t(3,1); ml_matrix z = r/(transpose(r)*r);

  3. Does MatrixLib use LAPACK?

    Yes, as of version 3.0, MatrixLib internally uses LAPACK (and the BLAS) where appropriate and available. In addition, functions are provided which enable the caller to retrieve internal data from a matrix object in order to call LAPACK/BLAS functions which are not directly represented in the MatrixLib API. These functions are ml_matrix::raw_data and ml_matrix::data_stride.

  4. Will MatrixLib work with complex numbers?

    No. Although this functionality is present in both LAPACK and MATLAB, MatrixLib does not currently offer an interface that handles complex numbers. There is not currently any plan to add this functionality to MatrixLib, so if it is something you require you have several options:

  5. Should I buy the source code or a binary license?

    Most customers should purchase MatrixLib binaries, which are sufficient for the majority of projects. Exceptions include applications that require MatrixLib on a platform for which binaries are not available (see http://www.psatellite.com/products/matrixlib.php for a list of currently supported platforms) of projects in which you have a need to modify the internal functionality of MatrixLib.