Effective implementation of algorithms (Master Thesis)
Effective and error-free implementation of algorithms
math::factorize::FactorizeNaive_< CountType > Class Template Reference

#include <factorize_naive.h>

List of all members.

Static Public Member Functions

template<typename T >
static std::vector< std::pair
< T, CountType > > 
factorize (T number)

Detailed Description

template<typename CountType>
class math::factorize::FactorizeNaive_< CountType >

Naive factorization method. Running time is O(m) , where m is greatest prime factor, or O(sqrt(n)) if the number is prime.


Member Function Documentation

template<typename CountType >
template<typename T >
static std::vector<std::pair<T, CountType> > math::factorize::FactorizeNaive_< CountType >::factorize ( number) [inline, static]

Factorize number.

T should be integral type

Parameters:
numberinteger to factorize, should be greater than 1
Returns:
factorization, factors in increasing order

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines