00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00032 #if !defined(_TIFA_LINDEP_H_)
00033
00037 #define _TIFA_LINDEP_H_
00038
00039 #ifdef __cplusplus
00040 extern "C" {
00041 #endif
00042
00043 #include <inttypes.h>
00044
00045 #include "array.h"
00046 #include "x_array_list.h"
00047 #include "matrix.h"
00048 #include "exit_codes.h"
00049
00058 enum linalg_method_enum {
00065 SMART_GAUSS_ELIM = 0
00066 };
00067
00072 typedef enum linalg_method_enum linalg_method_t;
00073
00078 static const char* const linalg_method_to_str[1] = {
00079 "smart gaussian elimination"
00080 };
00081
00108 void fill_matrix_trial_div(
00109 binary_matrix_t* const matrix,
00110 mpz_array_t* const partially_factored,
00111 const mpz_array_t* const to_factor,
00112 const uint32_array_t* const factor_base
00113 );
00114
00148 void fill_trial_div_decomp(
00149 binary_matrix_t* const matrix,
00150 byte_matrix_t* const decomp_matrix,
00151 mpz_array_t* const partially_factored,
00152 const mpz_array_t* const to_factor,
00153 const uint32_array_t* const factor_base
00154 );
00155
00185 void fill_matrix_from_list(
00186 binary_matrix_t* const matrix,
00187 const mpz_array_t* const smooth_array,
00188 const uint32_array_list_t* const list,
00189 const uint32_array_t* const factor_base
00190 );
00191
00228 void fill_matrix_from_list_decomp(
00229 binary_matrix_t* const matrix,
00230 byte_matrix_t* const decomp_matrix,
00231 const mpz_array_t* const smooth_array,
00232 const uint32_array_list_t* const list,
00233 const uint32_array_t* const factor_base
00234 );
00235
00249 uint32_array_list_t* find_dependencies(
00250 binary_matrix_t* const matrix,
00251 linalg_method_t method
00252 );
00253
00281 ecode_t find_factors(
00282 mpz_array_t* const factors,
00283 const mpz_t n,
00284 const mpz_array_t* const xi_array,
00285 const mpz_array_t* const yi_array,
00286 const uint32_array_list_t* const dependencies
00287 );
00288
00325 ecode_t find_factors_decomp(
00326 mpz_array_t* const factors,
00327 const mpz_t n,
00328 const mpz_array_t* const xi_array,
00329 const byte_matrix_t* const yi_decomp_matrix,
00330 const uint32_array_list_t* const dependencies,
00331 const uint32_array_t* const factor_base
00332 );
00333
00334 #ifdef __cplusplus
00335 }
00336 #endif
00337
00338 #endif