Description
Lehmer's algorithm is a fast GCD algorithm, an improvement on the simpler but slower Euclidean algorithm. It is mainly used for big integers that have a representation as a string of digits relative to some chosen numeral system base, say β = 1000 or β = 232.
Now that we have our own Matrix type, we can create a sort of dynamic selector for the calculus of the GCD of numbers, so whenever the input data fits the optimal criteria for apply it, we can switch the implementation to the Lehmer's instead of the Euclidian.
Also, we can provide templated public API's, that takes non-type template parameters that directly let the user's choose between one or another.