My Project
|
This file provides miscellaneous functionality. More...
#include "kernel/mod2.h"
#include "misc/sirandom.h"
#include "omalloc/omalloc.h"
#include "misc/mylimits.h"
#include "reporter/si_signals.h"
#include "factory/factory.h"
#include "coeffs/si_gmp.h"
#include "coeffs/coeffs.h"
#include "coeffs/flintcf_Q.h"
#include "coeffs/flintcf_Qrat.h"
#include "coeffs/flintcf_Zn.h"
#include "coeffs/rmodulon.h"
#include "polys/ext_fields/algext.h"
#include "polys/ext_fields/transext.h"
#include "polys/nc/gb_hack.h"
#include "Singular/links/simpleipc.h"
#include "misc_ip.h"
#include "ipid.h"
#include "feOpt.h"
#include "links/silink.h"
#include "mod_lib.h"
#include "misc/distrib.h"
#include "misc/options.h"
#include "misc/intvec.h"
#include "polys/monomials/ring.h"
#include "polys/templates/p_Procs.h"
#include "kernel/GBEngine/kstd1.h"
#include "kernel/oswrapper/timer.h"
#include "resources/feResource.h"
#include "kernel/oswrapper/feread.h"
#include "subexpr.h"
#include "cntrlc.h"
#include "ipshell.h"
#include "fehelp.h"
#include <NTL/version.h>
#include <flint/flint.h>
Go to the source code of this file.
Macros | |
#define | PLURAL_INTERNAL_DECLARATIONS 1 |
#define | SI_SHOW_BUILTIN_MODULE(name) StringAppend(" %s", #name); |
Functions | |
void | setListEntry (lists L, int index, mpz_t n) |
void | setListEntry_ui (lists L, int index, unsigned long ui) |
static int | factor_using_division (mpz_t t, unsigned int limit, lists primes, int *multiplicities, int &index, unsigned long bound) |
static void | factor_using_pollard_rho (mpz_t n, unsigned long a, lists primes, int *multiplicities, int &index) |
static void | factor_gmp (mpz_t t, lists primes, int *multiplicities, int &index, unsigned long bound) |
lists | primeFactorisation (const number n, const int pBound) |
Factorises a given bigint number n into its prime factors less than or equal to a given bound, with corresponding multiplicities. More... | |
void | singular_example (char *str) |
BOOLEAN | setOption (leftv res, leftv v) |
char * | showOption () |
char * | versionString () |
int | singular_fstat (int fd, struct stat *buf) |
void | m2_end (int i) |
void | omSingOutOfMemoryFunc () |
static BOOLEAN | ii_FlintZn_init (leftv res, leftv a) |
static BOOLEAN | ii_FlintQ_init (leftv res, leftv a) |
int | flint_mod_init (SModulFunctions *psModulFunctions) |
static BOOLEAN | iiFloat (leftv res, leftv pnn) |
static BOOLEAN | iiCrossProd (leftv res, leftv args) |
static void | callWerrorS (const char *s) |
void | siInit (char *name) |
Variables | |
STATIC_VAR unsigned | add [] = {4, 2, 4, 2, 4, 6, 2, 6} |
const struct soptionStruct | optionStruct [] |
const struct soptionStruct | verboseStruct [] |
volatile BOOLEAN | m2_end_called = FALSE |
STATIC_VAR n_coeffType | n_FlintZn =n_unknown |
STATIC_VAR n_coeffType | n_FlintQ =n_unknown |
This file provides miscellaneous functionality.
For more general information, see the documentation in misc_ip.h.
Definition in file misc_ip.cc.
#define PLURAL_INTERNAL_DECLARATIONS 1 |
Definition at line 14 of file misc_ip.cc.
#define SI_SHOW_BUILTIN_MODULE | ( | name | ) | StringAppend(" %s", #name); |
|
static |
Definition at line 1369 of file misc_ip.cc.
|
static |
Definition at line 327 of file misc_ip.cc.
|
static |
Definition at line 109 of file misc_ip.cc.
|
static |
Definition at line 204 of file misc_ip.cc.
int flint_mod_init | ( | SModulFunctions * | psModulFunctions | ) |
Definition at line 1281 of file misc_ip.cc.
Definition at line 1236 of file misc_ip.cc.
Definition at line 1222 of file misc_ip.cc.
Definition at line 1306 of file misc_ip.cc.
void m2_end | ( | int | i | ) |
Definition at line 1097 of file misc_ip.cc.
void omSingOutOfMemoryFunc | ( | ) |
Definition at line 1208 of file misc_ip.cc.
Factorises a given bigint number n into its prime factors less than or equal to a given bound, with corresponding multiplicities.
The method finds all prime factors with multiplicities. If a positive bound is given, then only the prime factors <= pBound are being found. In this case, there may remain an unfactored portion m of n. Also, when n is negative, m will contain the sign. If n is zero, m will be zero. The method returns a list L filled with three entries: L[1] a list; L[1][i] contains the i-th prime factor of |n| as int or bigint (sorted in ascending order), L[2] a list; L[2][i] contains the multiplicity of L[1, i] in |n| as int L[3] contains the remainder m as int or bigint, depending on the size,
We thus have: n = L[1][1]^L[2][1] * ... * L[1][k]^L[2][k] * L[3], where k is the number of mutually distinct prime factors (<= a provided non- zero bound). Note that for n = 0, L[1] and L[2] will be emtpy lists and L[3] will be zero.
[in] | n | the bigint > 0 to be factorised |
[in] | pBound | bound on the prime factors seeked |
Definition at line 357 of file misc_ip.cc.
void setListEntry | ( | lists | L, |
int | index, | ||
mpz_t | n | ||
) |
Definition at line 74 of file misc_ip.cc.
void setListEntry_ui | ( | lists | L, |
int | index, | ||
unsigned long | ui | ||
) |
Definition at line 91 of file misc_ip.cc.
Definition at line 568 of file misc_ip.cc.
char * showOption | ( | ) |
Definition at line 709 of file misc_ip.cc.
void siInit | ( | char * | name | ) |
Definition at line 1370 of file misc_ip.cc.
void singular_example | ( | char * | str | ) |
Definition at line 430 of file misc_ip.cc.
int singular_fstat | ( | int | fd, |
struct stat * | buf | ||
) |
Definition at line 1082 of file misc_ip.cc.
char * versionString | ( | ) |
Definition at line 770 of file misc_ip.cc.
STATIC_VAR unsigned add[] = {4, 2, 4, 2, 4, 6, 2, 6} |
Definition at line 107 of file misc_ip.cc.
Definition at line 1095 of file misc_ip.cc.
STATIC_VAR n_coeffType n_FlintQ =n_unknown |
Definition at line 1220 of file misc_ip.cc.
STATIC_VAR n_coeffType n_FlintZn =n_unknown |
Definition at line 1219 of file misc_ip.cc.
const struct soptionStruct optionStruct[] |
Definition at line 507 of file misc_ip.cc.
const struct soptionStruct verboseStruct[] |
Definition at line 538 of file misc_ip.cc.