ZZ_mat< ZT > Class Template Reference

#include <matrix.h>

Public Types

typedef Z_NR< ZT > T
 

Public Member Functions

 ZZ_mat ()
 
 ZZ_mat (int rows, int cols)
 
void gen_zero (int d, int n)
 
void gen_identity (int d)
 
void gen_intrel (int bits)
 
void gen_simdioph (int bits, int bits2)
 
void gen_uniform (int bits)
 
void gen_ntrulike (int bits)
 
void gen_ntrulike_withq (int q)
 
void gen_ntrulike2 (int bits)
 
void gen_ntrulike2_withq (int q)
 
void gen_qary (int k, Z_NR< ZT > &q)
 
void gen_qary (int k, int bits)
 
void gen_qary_withq (int k, int q)
 
void gen_qary_prime (int k, int bits)
 
void gen_trg (double alpha)
 
void gen_trg2 (FP_NR< mpfr_t > *w)
 
- Public Member Functions inherited from Matrix< Z_NR< ZT > >
 Matrix ()
 
 Matrix (int rows, int cols)
 
void clear ()
 
bool empty () const
 
void resize (int rows, int cols)
 
void set_rows (int rows)
 
void set_cols (int cols)
 
void fill (U value)
 
void swap (Matrix< Z_NR< ZT > > &m)
 
int get_rows () const
 
int get_cols () const
 
Z_NR< ZT > & operator() (int i, int j)
 
const Z_NR< ZT > & operator() (int i, int j) const
 
MatrixRow< Z_NR< ZT > > operator[] (int i)
 
const MatrixRow< Z_NR< ZT > > operator[] (int i) const
 
void swap_rows (int r1, int r2)
 
void rotate_left (int first, int last)
 
void rotate_right (int first, int last)
 
void rotate (int first, int middle, int last)
 
void rotate_gram_left (int first, int last, int n_valid_rows)
 
void rotate_gram_right (int first, int last, int n_valid_rows)
 
void transpose ()
 
Z_NR< ZT > get_max ()
 
long get_max_exp ()
 
void print (ostream &os, int nrows=-1, int ncols=-1) const
 
void read (istream &is)
 
ostream & print_comma (ostream &os) const
 

Additional Inherited Members

- Static Public Member Functions inherited from Matrix< Z_NR< ZT > >
static int set_print_mode (int new_print_mode)
 
- Protected Attributes inherited from Matrix< Z_NR< ZT > >
int r
 
int c
 
vector< NumVect< Z_NR< ZT > > > matrix
 
- Static Protected Attributes inherited from Matrix< Z_NR< ZT > >
static int print_mode
 

Detailed Description

template<class ZT>
class ZZ_mat< ZT >

ZZ_mat is a matrix of integers.

Member Typedef Documentation

◆ T

template<class ZT >
typedef Z_NR<ZT> ZZ_mat< ZT >::T

Constructor & Destructor Documentation

◆ ZZ_mat() [1/2]

template<class ZT >
ZZ_mat< ZT >::ZZ_mat ( )
inline

Creates an empty matrix (0 x 0).

◆ ZZ_mat() [2/2]

template<class ZT >
ZZ_mat< ZT >::ZZ_mat ( int  rows,
int  cols 
)
inline

Creates a matrix of dimensions rows x cols. All elements are initialized with the default constructor of Z_NR<T>.

Member Function Documentation

◆ gen_identity()

template<class ZT >
void ZZ_mat< ZT >::gen_identity ( int  d)
inline

Generate an identity matrix

◆ gen_intrel()

template<class ZT >
void ZZ_mat< ZT >::gen_intrel ( int  bits)
inline

Generate an augmented matrix of random coefficients for the first column

◆ gen_ntrulike()

template<class ZT >
void ZZ_mat< ZT >::gen_ntrulike ( int  bits)
inline

Construct a matrix [[I,H],[0,qI]] where H is constructed from rotations of a vector h.

Note
The constructed matrix will not come with a guarantee of unusually short vectors.

◆ gen_ntrulike2()

template<class ZT >
void ZZ_mat< ZT >::gen_ntrulike2 ( int  bits)
inline

Construct a matrix [[qI,0],[H,I]] where H is constructed from rotations of a vector h.

Note
The constructed matrix will not come with a guarantee of unusually short vectors.

◆ gen_ntrulike2_withq()

template<class ZT >
void ZZ_mat< ZT >::gen_ntrulike2_withq ( int  q)
inline

◆ gen_ntrulike_withq()

template<class ZT >
void ZZ_mat< ZT >::gen_ntrulike_withq ( int  q)
inline

◆ gen_qary() [1/2]

template<class ZT >
void ZZ_mat< ZT >::gen_qary ( int  k,
int  bits 
)
inline

◆ gen_qary() [2/2]

template<class ZT >
void ZZ_mat< ZT >::gen_qary ( int  k,
Z_NR< ZT > &  q 
)
inline

Construct a matrix [[I,H],[0,Iq]] where H is uniform mod q, of dimensions (n-k) x k.

◆ gen_qary_prime()

template<class ZT >
void ZZ_mat< ZT >::gen_qary_prime ( int  k,
int  bits 
)
inline

◆ gen_qary_withq()

template<class ZT >
void ZZ_mat< ZT >::gen_qary_withq ( int  k,
int  q 
)
inline

◆ gen_simdioph()

template<class ZT >
void ZZ_mat< ZT >::gen_simdioph ( int  bits,
int  bits2 
)
inline

Generate a matrix with coefficients of the first row and the diagonal

◆ gen_trg()

template<class ZT >
void ZZ_mat< ZT >::gen_trg ( double  alpha)
inline

Construct a lower triangular matrices with specified diagonal coefficients and random sub-diagonal coefficients.

◆ gen_trg2()

template<class ZT >
void ZZ_mat< ZT >::gen_trg2 ( FP_NR< mpfr_t > *  w)
inline

◆ gen_uniform()

template<class ZT >
void ZZ_mat< ZT >::gen_uniform ( int  bits)
inline

Generate a random matrix of uniform distribution.

◆ gen_zero()

template<class ZT >
void ZZ_mat< ZT >::gen_zero ( int  d,
int  n 
)
inline

Generate a zero matrix


The documentation for this class was generated from the following files: