Macaulay2 Engine
Loading...
Searching...
No Matches
ntl-interface.hpp
Go to the documentation of this file.
1#ifndef _ntl_interface_hpp_
2#define _ntl_interface_hpp_
3
37
38#include <stddef.h>
39#include <M2/math-include.h>
40
41#pragma GCC diagnostic push
42#pragma GCC diagnostic ignored "-Wconversion"
43#include <NTL/ZZ.h>
44#include <NTL/mat_ZZ.h>
45#include <NTL/LLL.h>
46#pragma GCC diagnostic pop
47
48// NTL_USE_NNS
49
50class MutableMatrix;
51extern NTL::mat_ZZ *makeNTLMatrixZZ(int nrows, int ncols);
52void mat_ZZ_set_entry(NTL::mat_ZZ *A, long i, long j, mpz_srcptr a);
53void mat_ZZ_get_entry(const NTL::mat_ZZ *A, long i, long j, mpz_t result);
54
55extern void ntl_ZZ_to_mpz(mpz_t result, const NTL::ZZ &a);
56extern NTL::ZZ ntl_ZZ_from_mpz(mpz_srcptr a);
57
58void dntl_matZZ(const NTL::mat_ZZ *A);
59void dntl_ZZ(const NTL::ZZ *f);
60NTL::mat_ZZ *mutableMatrix_to_NTL_mat_ZZ(const MutableMatrix *M);
61bool ntl_LLL(MutableMatrix *M, MutableMatrix *U, long a, long b, int strategy);
62// U can be NULL. If it is not, it will be set to the transform matrix
63// the threshold is a/b. strategy is explained for rawLLL in engine.h
64#endif
65
66// Local Variables:
67// compile-command: "make -C $M2BUILDDIR/Macaulay2/e "
68// indent-tabs-mode: nil
69// End:
Abstract base class for mutable matrices over an arbitrary engine Ring, the in-place counterpart of t...
Definition mat.hpp:79
VALGRIND_MAKE_MEM_DEFINED & result(result)
NTL::ZZ ntl_ZZ_from_mpz(mpz_srcptr a)
void mat_ZZ_get_entry(const NTL::mat_ZZ *A, long i, long j, mpz_t result)
void mat_ZZ_set_entry(NTL::mat_ZZ *A, long i, long j, mpz_srcptr a)
NTL::mat_ZZ * makeNTLMatrixZZ(int nrows, int ncols)
NTL::mat_ZZ * mutableMatrix_to_NTL_mat_ZZ(const MutableMatrix *M)
void dntl_ZZ(const NTL::ZZ *f)
void ntl_ZZ_to_mpz(mpz_t result, const NTL::ZZ &a)
bool ntl_LLL(MutableMatrix *M, MutableMatrix *U, long a, long b, int strategy)
void dntl_matZZ(const NTL::mat_ZZ *A)