Template Function ADS::freivalds

Function Documentation

template<class T, class R>
bool ADS::freivalds(const std::vector<std::vector<T>> &A, const std::vector<std::vector<T>> &B, const std::vector<std::vector<T>> &C, int K, R &rng)

whether A B = C, by K runs of O( n^2 )

Pre:

A, B and C are n x n and K >= 0