Exercise "QR-decomposition"

To work with vectors and matrices you can use For QR-factorization you have the following choices:
  1. (6 points)
  2. (3 points)

    Hint: the total number of CPU-seconds used by a program my_prog can be determined by the POSIX time utility. The command

    
    \time --format "time = %U" --append --output=time.txt ./my_prog > /dev/null 
    
    or, in short
    
    \time -f "%U" -ao time.txt ./my_prog > /dev/null 
    
    runs the program (disregarding the standard output) and appends the number of consumed CPU-seconds to the file time.txt. Without the --append option (or, in short, -a) the file time.txt gets overwritten. Backslash here is needed to run the actual utility rather than built-in bash command (with similar possibilities, actually).

    An example of the usage of time can be found here (see the makefile).

  3. (1 points)

    Implement LU-decomposition, back-substitution, and inverse.

  4. (0 point)

    Implement a garbage-collected version of the vector/matrix library and compare the memory consumption of the two versions. The garbage collector is installed in the proper place on molveno and in /usr/users/fedorov/include, /usr/users/fedorov/lib on lifa.