libjmmcg  build_2783
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::factoring Namespace Reference

Typedefs

using collection_type = std::vector< unsigned long >
 

Functions

collection_type __fastcall division (const collection_type::value_type x) noexcept(false)
 Factoring by division. More...
 
collection_type __fastcall monte_carlo (const collection_type::value_type y) noexcept(false)
 Monte Carlo factorisation. More...
 

Typedef Documentation

◆ collection_type

using jmmcg::factoring::collection_type = typedef std::vector<unsigned long>

Definition at line 66 of file factoring.hpp.

Function Documentation

◆ division()

collection_type __fastcall jmmcg::factoring::division ( const collection_type::value_type  x)
inlinenoexcept

Factoring by division.

Parameters
xThe number to be factored. Must be greater than zero.
Returns
The array that has the factors placed in it.

Thanks to Knuth, et al for this routine. See his book "Seminumerical Algorithms. Vol 2".

See also
factoring::monte_carlo()

Definition at line 78 of file factoring.hpp.

◆ monte_carlo()

collection_type __fastcall jmmcg::factoring::monte_carlo ( const collection_type::value_type  y)
inlinenoexcept

Monte Carlo factorisation.

Todo:
FIXME
Parameters
yThe number to be factored.
Returns
The array that has the factors placed in it.

Thanks to Knuth, et al for this routine. See his book "Seminumerical Algorithms. Vol 2".

See also
factoring::division()

Definition at line 121 of file factoring.hpp.