File: LLL.h

package info (click to toggle)
singular 1%3A4.0.3-p3%2Bds-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 33,040 kB
  • ctags: 19,347
  • sloc: cpp: 271,589; ansic: 13,500; lisp: 4,242; yacc: 1,656; lex: 1,377; makefile: 1,264; perl: 632; sh: 467; python: 233; xml: 182
file content (39 lines) | stat: -rw-r--r-- 1,698 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// LLL.h

// This file contains the implementation of two special variants of the
// LLL-algorithm.
// For further explainations see the book of Henri Cohen, A Course in
// Computational Algebraic Number Theory.

// When performing the LLL-algorithm, some coefficients grow very fast.
// Therefore one should use a  data type for arbitrary long integers
// (called "BigInt" in the code).
// If no such data type is specified, BigInt is defined to be a long
// (cf. globals.h).

#ifndef LLL_H
#define LLL_H

#include "globals.h"

extern short relations(BigInt** b, const short& number_of_vectors,
                       const short& vector_dimension, BigInt**& H);
// Computes the relations of the input vectors stored in b and returns the
// dimension r of the lattice spanned by these relations.
// The return value -1 indicates that an error has occurred.
// A LLL-reduced basis of the relations is written into the two-dimensional
// array H. Memory allocation for this array is done in the routine;
// when leaving the routine, the dimension will be vector_columns x r.
// This routine corresponds to algorithm 2.7.2 in Cohen's book.

extern short integral_LLL(BigInt **b, const short& number_of_vectors,
                          const short& vector_dimension);
// Reduces the input vectors stored in b (in the sense of an LLL-reduction).
// The input vectors have to be linearly independent.
// ATTENTION: The input vectors are modified during this algorithm. For
// efficiency reasons in our application, we do NOT store a transformation
// matrix!
// The return value is -1 if an error has occurred, 0 else.
// This routine corresponds to algorithm 2.6.7 in Cohen's book.

#endif  // LLL_H