struct_factoring_program Struct Reference

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

#include <factoring_program.h>


Data Fields

int argc
char ** argv
mpz_t n
factoring_mode_t mode
int verbose
int timing
uint32_t nprimes_tdiv
uint32_t nfactors
char * algo_name
void * params
void(* print_usage_func )(struct struct_factoring_program *const)
void(* print_params_func )(struct struct_factoring_program *const)
void(* process_args_func )(struct struct_factoring_program *const)
ecode_t(* factoring_algo_func )(mpz_array_t *const factors, uint32_array_t *const multis, const mpz_t n, const void *const params, factoring_mode_t mode)
void(* set_params_to_default_func )(struct struct_factoring_program *const)


Detailed Description

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

tools/include/factoring_program.h

This structure defines a set of data and functions to represent the logic behind all factorization programs. The idea is to be able to write down the actual factoring process once and for all so that actual factorization program can use such a structure by merely "filling-in" the gaps.

Definition at line 58 of file factoring_program.h.


Field Documentation

Argument count as given by the "main" function.

Definition at line 62 of file factoring_program.h.

Argument values as given by the "main" function.

Definition at line 66 of file factoring_program.h.

Integer to factor.

Definition at line 70 of file factoring_program.h.

Factoring mode to use.

Definition at line 74 of file factoring_program.h.

Verbosity option. Should be either 1 (be verbose) or 0 (stay laconic).

Definition at line 78 of file factoring_program.h.

Timing option. Should be either 1 (proceed with timings) or 0 (do not perform timings).

Definition at line 83 of file factoring_program.h.

Number of primes used in the trial division of the number to factor.

Definition at line 87 of file factoring_program.h.

The maximum number of factors to collect (excluding the factors found in the trial division stage).

Definition at line 92 of file factoring_program.h.

Name of the factoring algorithm to use (preferably a short acronym).

Definition at line 96 of file factoring_program.h.

A pointer to the parameters of the factoring algorithm to use.

Definition at line 100 of file factoring_program.h.

A pointer to a function printing the usage of the factoring program.

Parameters:
A pointer to the factoring_program_t used by the actual factoring program.

A pointer to a function printing the values of the parameters used by the actual factoring program.

Parameters:
A pointer to the factoring_program_t used by the actual factoring program.

A pointer to a function reading arguments on the command line and setting the parameters of the actual factoring program.

Parameters:
A pointer to the factoring_program_t used by the actual factoring program.

ecode_t(* struct_factoring_program::factoring_algo_func)(mpz_array_t *const factors, uint32_array_t *const multis, const mpz_t n, const void *const params, factoring_mode_t mode)

A pointer to a function implementing the factorization algorithm to use.

Parameters:
factors An mpz_array_t to hold the found factors.
factors A uint32_array_t to hold the found multiplicities.
n The integer to factor.
params A pointer to the parameters to be used in the factorization algorithm.
mode The factorization mode to use.

A pointer to a function setting the algorithm's parameters to some default values.

Parameters:
A pointer to the factoring_program_t used by the actual factoring program.


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