jengelh-datetimespielwiese
Last change
on this file since c74d6a was
c74d6a,
checked in by Oleksandr Motsak <motsak@…>, 12 years ago
|
FIX/ADD: factory/singular wrappers for _HNF and _LLL (from NTL)
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[f291fcd] | 1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
| 2 | #ifndef CF_HNF_H |
---|
| 3 | #define CF_HNF_H |
---|
| 4 | |
---|
| 5 | /*BEGINPUBLIC*/ |
---|
| 6 | |
---|
[c74d6a] | 7 | #ifdef HAVE_NTL |
---|
| 8 | |
---|
[f291fcd] | 9 | /* $Id$ */ |
---|
| 10 | |
---|
| 11 | //{{{ docu |
---|
| 12 | // |
---|
| 13 | // The input matrix A is square matrix of integers |
---|
| 14 | // output: the Hermite Normal Form of A; that is, |
---|
| 15 | // the unique m x m matrix whose rows span L, such that |
---|
| 16 | // |
---|
| 17 | // - lower triangular, |
---|
| 18 | // - the diagonal entries are positive, |
---|
| 19 | // - any entry below the diagonal is a non-negative number |
---|
| 20 | // strictly less than the diagonal entry in its column. |
---|
| 21 | // |
---|
| 22 | // via NTL:HNF |
---|
| 23 | // |
---|
| 24 | //}}} |
---|
| 25 | |
---|
| 26 | CFMatrix* cf_HNF(CFMatrix& A); |
---|
| 27 | |
---|
[9c0b20a] | 28 | // performs LLL reduction. |
---|
| 29 | |
---|
| 30 | // B is an m x n matrix, viewed as m rows of n-vectors. m may be less |
---|
| 31 | // than, equal to, or greater than n, and the rows need not be |
---|
| 32 | // linearly independent. B is transformed into an LLL-reduced basis, |
---|
| 33 | // and the return value is the rank r of B. The first m-r rows of B |
---|
| 34 | // are zero. |
---|
| 35 | |
---|
| 36 | // More specifically, elementary row transformations are performed on |
---|
| 37 | // B so that the non-zero rows of new-B form an LLL-reduced basis |
---|
| 38 | // for the lattice spanned by the rows of old-B. |
---|
| 39 | // The default reduction parameter is delta=3/4, which means |
---|
| 40 | // that the squared length of the first non-zero basis vector |
---|
| 41 | // is no more than 2^{r-1} times that of the shortest vector in |
---|
| 42 | // the lattice. |
---|
| 43 | |
---|
| 44 | CFMatrix* cf_LLL(CFMatrix& A); |
---|
| 45 | |
---|
[c74d6a] | 46 | #endif |
---|
| 47 | |
---|
[f291fcd] | 48 | /*ENDPUBLIC*/ |
---|
| 49 | |
---|
| 50 | #endif |
---|
Note: See
TracBrowser
for help on using the repository browser.