Flint2-0.1.0.5: Haskell bindings for the flint library for number theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Number.Flint.NMod.MPoly.Factor

Synopsis

Factorisation of multivariate polynomials over integers mod n

Memory managment

nmod_mpoly_factor_init :: Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_init f ctx

Initialise f.

nmod_mpoly_factor_clear :: Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_clear f ctx

Clear f.

Basic manipulation

nmod_mpoly_factor_swap :: Ptr CNModMPolyFactor -> Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_swap f g ctx

Efficiently swap f and g.

nmod_mpoly_factor_length :: Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO CLong Source #

nmod_mpoly_factor_length f ctx

Return the length of the product in f.

nmod_mpoly_factor_get_constant_ui :: Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_get_constant_ui f ctx

Return the constant of f.

nmod_mpoly_factor_get_base :: Ptr CNModMPoly -> Ptr CNModMPolyFactor -> CLong -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_get_base p f i ctx

nmod_mpoly_factor_swap_base :: Ptr CNModMPoly -> Ptr CNModMPolyFactor -> CLong -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_swap_base p f i ctx

Set (resp. swap) B to (resp. with) the base of the term of index \(i\) in A.

nmod_mpoly_factor_get_exp_si :: Ptr CNModMPolyFactor -> CLong -> Ptr CNModMPolyCtx -> IO CLong Source #

nmod_mpoly_factor_get_exp_si f i ctx

Return the exponent of the term of index \(i\) in A. It is assumed to fit an slong.

nmod_mpoly_factor_sort :: Ptr CNModMPolyFactor -> Ptr CNModMPolyCtx -> IO () Source #

nmod_mpoly_factor_sort f ctx

Sort the product of f first by exponent and then by base.

Factorisation

nmod_mpoly_factor_squarefree :: Ptr CNModMPolyFactor -> Ptr CNModMPoly -> Ptr CNModMPolyCtx -> IO CInt Source #

nmod_mpoly_factor_squarefree f A ctx

Set f to a factorization of A where the bases are primitive and pairwise relatively prime. If the product of all irreducible factors with a given exponent is desired, it is recommended to call nmod_mpoly_factor_sort and then multiply the bases with the desired exponent.

nmod_mpoly_factor :: Ptr CNModMPolyFactor -> Ptr CNModMPoly -> Ptr CNModMPolyCtx -> IO CInt Source #

nmod_mpoly_factor f A ctx

Set f to a factorization of A where the bases are irreducible.