#include <householder.h>
Public Member Functions | |
MatHouseholder (Matrix< ZT > &arg_b, Matrix< ZT > &arg_u, Matrix< ZT > &arg_uinv_t, int flags) | |
~MatHouseholder () | |
void | get_R (FT &f, int i, int j, long &expo) |
void | get_R (FT &f, int i, int j) |
MatrixRow< FT > | get_R (int i, long &expo) |
const Matrix< FT > & | get_R (vector< long > &expo) |
MatrixRow< ZT > | get_b (int i) |
const Matrix< ZT > & | get_b () |
void | update_R (int i, bool last_j) |
void | update_R (int i) |
void | update_R_last (int i) |
void | update_R () |
int | get_d () |
int | get_n () |
void | norm_square_b_row (FT &f, int k, long &expo) |
void | norm_square_R_row (FT &f, int k, int beg, int end, long &expo) |
void | norm_R_row (FT &f, int k, int beg, int end, long &expo) |
bool | size_reduce (int k, int size_reduction_end, int size_reduction_start=0) |
void | swap (int i, int j) |
void | invalidate_row (int k) |
bool | is_enable_row_expo () |
bool | get_updated_R () |
void | set_updated_R_false () |
FT | get_R_inverse_diag (int i) |
void | recover_R (int i) |
long | get_row_expo (int i) |
bool | is_row_op_force_long () |
void | refresh_R_bf (int i) |
void | refresh_R_bf () |
void | refresh_R (int i) |
void | refresh_R () |
void | get_norm_square_b (FT &f, int i, long &expo) |
void | update_R_naively () |
void | update_R_naively (int i) |
void | get_R_naively (FT &f, int i, int j, long &expo) |
void | norm_square_b_row_naively (FT &f, int k, long &expo) |
void | norm_square_R_row_naively (FT &f, int k, int end, long &expo) |
Detailed Description
class MatHouseholder< ZT, FT >
MatHouseholder provides an interface for performing elementary operations on a basis and computing its R matrix using Householder transformations.
Constructor & Destructor Documentation
◆ MatHouseholder()
|
inline |
Constructor. The precision of FT must be defined before creating an instance of the class and must remain the same until the object is destroyed (or no longer needed).
- Parameters
-
b The matrix on which row operations are performed. It must not be empty. enable_row_expo If true, each row of b is normalized by a power of 2 before doing conversion to floating-point, which hopefully avoids some overflows. This option cannot be enabled if enable_int_gram=true and works only with FT=double and FT=long double. It is useless and MUST NOT be used for FT=dpe or FT=mpfr_t. enable_transform Compute u u If u is not empty, operations on b are also done on u (in this case both must have the same number of rows). If u is initially the identity matrix, multiplying transform by the initial basis gives the current basis. enable_inverse_transform Compute u_inv_t u_inv_t Inverse transform (should be empty, which disables the computation, or initialized with identity matrix). It works only if u is not empty. enable_op_force_long Affects the behaviour of row_addmul(_we). See the documentation of row_addmul.
◆ ~MatHouseholder()
|
inline |
Member Function Documentation
◆ get_b() [1/2]
|
inline |
Returns the b matrix
◆ get_b() [2/2]
MatrixRow< ZT > MatHouseholder< ZT, FT >::get_b | ( | int | i | ) |
Returns b[i].
◆ get_d()
|
inline |
Retun the dimensions of the lattice
◆ get_n()
|
inline |
◆ get_norm_square_b()
|
inline |
Set in f the precomputed squared norm of b[i] and in expo the exponent such that ||b[i]||^2 = f
- 2^{expo}
◆ get_R() [1/4]
|
inline |
Returns f (* 2^expo if enable_row_expo) = R(i, j).
Returns reference to f
.
◆ get_R() [2/4]
|
inline |
Returns f (* 2^expo if enable_row_expo) = R(i, j).
Returns reference to f
and expo.
◆ get_R() [3/4]
|
inline |
Returns R[i].
◆ get_R() [4/4]
|
inline |
Returns the R matrix expo is set to row_expo
◆ get_R_inverse_diag()
|
inline |
Get the precomputation of R(i, i)
◆ get_R_naively()
|
inline |
Return R_naively(i, j) = f (* 2^expo, if enable_row_expo)
◆ get_row_expo()
|
inline |
Return row_expo[i]
◆ get_updated_R()
|
inline |
Return value of updated_R
◆ invalidate_row()
|
inline |
Update n_known_rows to k.
◆ is_enable_row_expo()
|
inline |
Return values enable_row_expo
◆ is_row_op_force_long()
|
inline |
Returns the value of row_op_force_long
◆ norm_R_row()
|
inline |
Truncated norm of R[k], with coefficients of R[k][beg..end-1].
◆ norm_square_b_row()
|
inline |
Compute the squared norm of b[k].
◆ norm_square_b_row_naively()
|
inline |
Squared norm of b[k]. Use row_expo_naively if enable_row_expo is used. f * 2^expo = ||b[i]||^2
◆ norm_square_R_row()
|
inline |
Truncated squared norm of R[k], with coefficients of R[k][beg..end-1].
◆ norm_square_R_row_naively()
|
inline |
Truncated norm square of R_naively[k], with coefficients of R_naively[k][0..end-1].
◆ recover_R()
|
inline |
◆ refresh_R() [1/2]
|
inline |
Set R to b.
◆ refresh_R() [2/2]
void MatHouseholder< ZT, FT >::refresh_R | ( | int | i | ) |
Set R[i] to b[i].
◆ refresh_R_bf() [1/2]
|
inline |
Set bf and R to b. Precompute squared norm of all the vectors of b
◆ refresh_R_bf() [2/2]
void MatHouseholder< ZT, FT >::refresh_R_bf | ( | int | i | ) |
Set bf[i] and R[i] to b[i]. Precompute square norm of b[i].
◆ set_updated_R_false()
|
inline |
Set updated_R to false updated_R is set to true in recover_R
◆ size_reduce()
bool MatHouseholder< ZT, FT >::size_reduce | ( | int | k, |
int | size_reduction_end, | ||
int | size_reduction_start = 0 |
||
) |
◆ swap()
void MatHouseholder< ZT, FT >::swap | ( | int | i, |
int | j | ||
) |
Swap row i and j of b, bf, R, V, u and u_inv_t Swap element i and j in sigma, row_expo, norm_square_b, expo_norm_square_b, init_row_size and R_history.
◆ update_R() [1/3]
|
inline |
Full computation of the matrix R.
◆ update_R() [2/3]
|
inline |
Apply Householder transformation on row i.
◆ update_R() [3/3]
void MatHouseholder< ZT, FT >::update_R | ( | int | i, |
bool | last_j | ||
) |
Apply Householder transformation on row i for columns [0, i). If last_j, apply Householder transformation on row i, from cols [0, i].
◆ update_R_last()
FPLLL_BEGIN_NAMESPACE void MatHouseholder< ZT, FT >::update_R_last | ( | int | i | ) |
Finalize Householder transformation on row i (especially after update_R(i, false))
◆ update_R_naively() [1/2]
|
inline |
Full computation of the matrix R.
◆ update_R_naively() [2/2]
void MatHouseholder< ZT, FT >::update_R_naively | ( | int | i | ) |
Apply Householder transformation on row i.
The documentation for this class was generated from the following files:
- fplll/householder.h
- fplll/householder.cpp