topenum.h
Go to the documentation of this file.
1/* Copyright (C) 2008-2011 Xavier Pujol.
2
3 This file is part of fplll. fplll is free software: you
4 can redistribute it and/or modify it under the terms of the GNU Lesser
5 General Public License as published by the Free Software Foundation,
6 either version 2.1 of the License, or (at your option) any later version.
7
8 fplll is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU Lesser General Public License for more details.
12
13 You should have received a copy of the GNU Lesser General Public License
14 along with fplll. If not, see <http://www.gnu.org/licenses/>. */
15
16#ifndef FPLLL_TOP_ENUM_H
17#define FPLLL_TOP_ENUM_H
18
19#include "../util.h"
20
22
23const double ENUM_MAX_VOLUME = 20000000;
24const int ENUM_MIN_LEVEL = 20;
25
27{
28public:
29 Enumerator(int d, const Matrix<FP_NR<mpfr_t>> &mu, const Matrix<FP_NR<mpfr_t>> &r,
30 double max_volume = ENUM_MAX_VOLUME, int min_level = ENUM_MIN_LEVEL);
31 bool enum_next(const FP_NR<mpfr_t> &max_sqr_length);
32 inline const vector<enumxt> &get_sub_tree() { return sub_tree; }
33
34private:
35 const Matrix<FP_NR<mpfr_t>> &mu;
36 const Matrix<FP_NR<mpfr_t>> &r;
37 int k, kmin, kmax, d;
38 vector<FP_NR<mpfr_t>> center, dist;
39 vector<FP_NR<mpfr_t>> x, dx, ddx;
40 // vector<FP_NR<mpfr_t>> sub_tree;
41 vector<enumxt> sub_tree;
42 FP_NR<mpfr_t> max_volume;
43 bool svp_init_needed;
44};
45
47
48#endif
Definition: topenum.h:27
bool enum_next(const FP_NR< mpfr_t > &max_sqr_length)
Definition: topenum.cpp:33
const vector< enumxt > & get_sub_tree()
Definition: topenum.h:32
Enumerator(int d, const Matrix< FP_NR< mpfr_t > > &mu, const Matrix< FP_NR< mpfr_t > > &r, double max_volume=ENUM_MAX_VOLUME, int min_level=ENUM_MIN_LEVEL)
Definition: topenum.cpp:20
Definition: matrix.h:118
#define FPLLL_END_NAMESPACE
Definition: defs.h:117
#define FPLLL_BEGIN_NAMESPACE
Definition: defs.h:114
const int ENUM_MIN_LEVEL
Definition: topenum.h:24
FPLLL_BEGIN_NAMESPACE const double ENUM_MAX_VOLUME
Definition: topenum.h:23