#include <factoring_machine.h>
Data Fields | |
mpz_t | n |
factoring_mode_t | mode |
void * | context |
void * | params |
ecode_t(* | init_context_func )(struct struct_factoring_machine *const) |
ecode_t(* | perform_algo_func )(struct struct_factoring_machine *const) |
ecode_t(* | update_context_func )(struct struct_factoring_machine *const) |
ecode_t(* | clear_context_func )(struct struct_factoring_machine *const) |
ecode_t(* | recurse_func )(mpz_array_t *const, uint32_array_t *const, const mpz_t, factoring_mode_t) |
mpz_array_t * | factors |
uint32_array_t * | multis |
bool | success |
tools/include/factoring_machine.h
This structure defines a set of data and functions to represent the logic behind all factorization algorithms. The idea is to be able to write down the factoring process' boilerplate once and for all so that actual factorization algorithm can use such a structure by merely "filling-in" the gaps.
Definition at line 118 of file factoring_machine.h.
The integer to factor.
Definition at line 122 of file factoring_machine.h.
The factoring mode to use.
Definition at line 126 of file factoring_machine.h.
The context of the factorization algorithm. This is a pointer to an algorithm implementation dependant structure holding all variables, data, and functions needed by the implementation.
Definition at line 132 of file factoring_machine.h.
The parameters used by the factorization algorithm. This is a pointer to an algorithm implementation dependant structure holding the algorithm parameters needed by the implementation.
Definition at line 138 of file factoring_machine.h.
ecode_t(* struct_factoring_machine::init_context_func)(struct struct_factoring_machine *const) |
A pointer to a function initializing the algorithm context.
(unnamed) | A pointer to the factoring_machine_t used by the actual algorithm implementation. |
ecode_t(* struct_factoring_machine::perform_algo_func)(struct struct_factoring_machine *const) |
A pointer to a function performing the actual factorization stage of the factorization algorithm (by opposition to the initialization stage for example).
(unnamed) | A pointer to the factoring_machine_t used by the actual algorithm implementation. |
ecode_t(* struct_factoring_machine::update_context_func)(struct struct_factoring_machine *const) |
A pointer to a function updating the context of the factorization algorithm. This function is responsible of the definition of the factorization strategy should something bad happens (e.g. what to do if no factors are found after the first run?).
(unnamed) | A pointer to the factoring_machine_t used by the actual algorithm implementation. |
ecode_t(* struct_factoring_machine::clear_context_func)(struct struct_factoring_machine *const) |
A pointer to a function clearing all memory space used by the context.
(unnamed) | A pointer to the factoring_machine_t used by the actual algorithm implementation. |
ecode_t(* struct_factoring_machine::recurse_func)(mpz_array_t *const, uint32_array_t *const, const mpz_t, factoring_mode_t) |
A pointer to the function to use to perform recursive factorization (i.e. factorization of the non-prime factors found).
(unnamed) | A pointer to an mpz_array_t to hold the found factors. | |
(unnamed) | A pointer to an uint32_array_t to hold the multiplicities. | |
(unnamed) | The non-prime factor to factorize. | |
(unnamed) | The factoring_mode_t to use. |
A pointer to a mpz_array_t
to hold the found factors.
Definition at line 191 of file factoring_machine.h.
A pointer to a uint32_array_t
to hold the multiplicities of the found factors.
Definition at line 196 of file factoring_machine.h.
true if the algorithm succeeds. false otherwise.
factoring_mode_t
mode used and not on whether or not some factors are found. Definition at line 204 of file factoring_machine.h.