checkTriangularize alg
This function tests that the method triangularize works properly using a given algorithm.
The object checkTriangularize is a function closure.