source: git/factory/FLINTconvert.h @ c2aeb9

spielwiese
Last change on this file since c2aeb9 was d3d3168, checked in by Martin Lee <martinlee84@…>, 12 years ago
chg: added docu for conversion to FLINT and back
  • Property mode set to 100644
File size: 3.7 KB
Line 
1/*****************************************************************************\
2 * Computer Algebra System SINGULAR
3\*****************************************************************************/
4/** @file FLINTconvert.h
5 *
6 * This file defines functions for conversion to FLINT (www.flintlib.org)
7 * and back.
8 *
9 * @author Martin Lee
10 *
11 **/
12/*****************************************************************************/
13
14#ifndef FLINT_CONVERT_H
15#define FLINT_CONVERT_H
16
17#include <config.h>
18#include "canonicalform.h"
19
20#ifdef HAVE_FLINT
21#ifdef __cplusplus
22extern "C"
23{
24#endif
25#include <fmpz.h>
26#include <fmpq.h>
27#include <fmpz_poly.h>
28#include <fmpq_poly.h>
29#include <nmod_poly.h>
30#ifdef __cplusplus
31}
32#endif
33
34/// conversion of a factory integer to fmpz_t
35void
36convertCF2Fmpz (fmpz_t result,         ///< [in,out] an fmpz_t
37                const CanonicalForm& f ///< [in] a CanonicalForm wrapping an
38                                       ///< integer
39               );
40
41/// conversion of a factory univariate polynomial over Z to a fmpz_poly_t
42void
43convertFacCF2Fmpz_poly_t (fmpz_poly_t result,    ///< [in,out] an fmpz_poly_t
44                          const CanonicalForm& f ///< [in] univariate poly over
45                                                 ///< Z
46                         );
47
48/// conversion of a FLINT integer to CanonicalForm
49CanonicalForm
50convertFmpz2CF (fmpz_t coefficient ///< [in] a FLINT integer
51               );
52
53/// conversion of a FLINT poly over Z to CanonicalForm
54CanonicalForm
55convertFmpz_poly_t2FacCF (fmpz_poly_t poly, ///< [in] an fmpz_poly_t
56                          const Variable& x ///< [in] variable the result should
57                                            ///< have
58                         );
59
60/// conversion of a factory univariate polynomials over Z/p (for word size p)
61/// to nmod_poly_t
62void
63convertFacCF2nmod_poly_t (nmod_poly_t result,    ///< [in, out] a nmod_poly_t
64                          const CanonicalForm& f ///< [in] univariate poly over
65                                                 ///< Z/p
66                         );
67
68/// conversion of a FLINT poly over Z/p to CanonicalForm
69CanonicalForm
70convertnmod_poly_t2FacCF (nmod_poly_t poly, ///< [in] a nmod_poly_t
71                          const Variable& x ///< [in] variable the result should
72                                            ///< have
73                         );
74
75/// conversion of a factory rationals to fmpq_t
76void
77convertCF2Fmpq (fmpq_t result,         ///< [in,out] an fmpq_t
78                const CanonicalForm& f ///< [in] a CanonicalForm wrapping a
79                                       ///< rational
80               );
81
82/// conversion of a factory univariate polynomials over Q to fmpq_poly_t
83void
84convertFacCF2Fmpq_poly_t (fmpq_poly_t result,    ///< [in,out] an fmpq_poly_t
85                          const CanonicalForm& f ///< [in] univariate poly over
86                                                 ///< Q
87                         );
88
89/// conversion of a FLINT poly over Q to CanonicalForm
90CanonicalForm
91convertFmpq_poly_t2FacCF (fmpq_poly_t p,    ///< [in] an fmpq_poly_t
92                          const Variable& x ///< [in] variable the result should
93                                            ///< have
94                         );
95
96/// conversion of a FLINT factorization over Z/p (for word size p) to a
97/// CFFList
98CFFList
99convertFLINTnmod_poly_factor2FacCFFList (
100                   nmod_poly_factor_t fac, ///< [in] a nmod_poly_factor_t
101                   mp_limb_t leadingCoeff, ///< [in] leading coefficient
102                   const Variable& x       ///< [in] variable the result should
103                                           ///< have
104                                        );
105
106#endif
107#endif
Note: See TracBrowser for help on using the repository browser.