#include <stdbool.h>
#include <gmp.h>
#include "array.h"
#include "exit_codes.h"
Go to the source code of this file.
Data Structures | |
struct | struct_factoring_machine |
Defines a structure to represent the logic behind all factorization algorithms. More... | |
Defines | |
#define | _TIFA_FACTORING_MACHINE_H_ |
Typedefs | |
typedef enum factoring_mode_enum | factoring_mode_t |
Equivalent to struct factoring_mode_enum . | |
typedef struct struct_factoring_machine | factoring_machine_t |
Equivalent to struct_factoring_machine . | |
Enumerations | |
enum | factoring_mode_enum { SINGLE_RUN, FIND_SOME_FACTORS, FIND_SOME_COPRIME_FACTORS, FIND_SOME_PRIME_FACTORS, FIND_COMPLETE_FACTORIZATION } |
Functions | |
ecode_t | run_machine (factoring_machine_t *machine) |
Attempt to factor an integer. | |
Variables | |
static const int | mode_to_outcome [5] |
Definition in file factoring_machine.h.
#define _TIFA_FACTORING_MACHINE_H_ |
Standard include guard.
Definition at line 35 of file factoring_machine.h.
enum factoring_mode_enum |
An enumeration of the factoring mode available to the implemented factorization algorithm.
Definition at line 53 of file factoring_machine.h.
ecode_t run_machine | ( | factoring_machine_t * | machine | ) |
Attempt to factor an integer.
Attempt to factor an integer with all parameters given by machine
.
machine | A pointer to the factoring_machine_t to use. |
const int mode_to_outcome[5] [static] |
Initial value:
{ SOME_FACTORS_FOUND, SOME_FACTORS_FOUND, SOME_COPRIME_FACTORS_FOUND, SOME_PRIME_FACTORS_FOUND, COMPLETE_FACTORIZATION_FOUND }
Definition at line 96 of file factoring_machine.h.