struct_factoring_machine Struct Reference

Defines a structure to represent the logic behind all factorization algorithms. More...

#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_tfactors
uint32_array_tmultis
bool success


Detailed Description

Defines a structure to represent the logic behind all factorization algorithms.

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.


Field Documentation

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.

A pointer to a function initializing the algorithm context.

Parameters:
(unnamed) A pointer to the factoring_machine_t used by the actual algorithm implementation.

A pointer to a function performing the actual factorization stage of the factorization algorithm (by opposition to the initialization stage for example).

Parameters:
(unnamed) A pointer to the factoring_machine_t used by the actual algorithm implementation.

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?).

Parameters:
(unnamed) A pointer to the factoring_machine_t used by the actual algorithm implementation.

A pointer to a function clearing all memory space used by the context.

Parameters:
(unnamed) A pointer to the factoring_machine_t used by the actual algorithm implementation.

A pointer to the function to use to perform recursive factorization (i.e. factorization of the non-prime factors found).

Parameters:
(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.

Note:
The notion of success is given by the factoring_mode_t mode used and not on whether or not some factors are found.

Definition at line 204 of file factoring_machine.h.


The documentation for this struct was generated from the following file:

Generated on Fri Jun 17 11:10:12 2011 for TIFA by Doxygen 1.5.5