Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
|
#include <factorize_naive.h>
Static Public Member Functions | |
template<typename T > | |
static std::vector< std::pair < T, CountType > > | factorize (T number) |
Naive factorization method. Running time is O(m) , where m is greatest prime factor, or O(sqrt(n)) if the number is prime.
static std::vector<std::pair<T, CountType> > math::factorize::FactorizeNaive_< CountType >::factorize | ( | T | number | ) | [inline, static] |
Factorize number.
T should be integral type
number | integer to factorize, should be greater than 1 |