PALISADE Lattice Crypto Library
1.11.9
A lattice crypto library for software engineers by software engineers.
|
Public Types | |
typedef vector< vector< Element > > | data_t |
typedef vector< Element > | lineardata_t |
typedef vector< Element >::iterator | it_lineardata_t |
typedef std::function< Element(void)> | alloc_func |
Public Member Functions | |
MatrixStrassen (alloc_func allocZero, size_t rows, size_t cols) | |
MatrixStrassen (alloc_func allocZero, size_t rows, size_t cols, alloc_func allocGen) | |
MatrixStrassen (alloc_func allocZero) | |
void | SetSize (size_t rows, size_t cols) |
MatrixStrassen (const MatrixStrassen< Element > &other) | |
MatrixStrassen< Element > & | operator= (const MatrixStrassen< Element > &other) |
MatrixStrassen< Element > & | Ones () |
MatrixStrassen< Element > & | Fill (const Element &val) |
MatrixStrassen< Element > & | Identity () |
MatrixStrassen< Element > | GadgetVector (int32_t base=2) const |
double | Norm () const |
MatrixStrassen< Element > | operator* (MatrixStrassen< Element > const &other) const |
MatrixStrassen< Element > | ScalarMult (Element const &other) const |
MatrixStrassen< Element > | operator* (Element const &other) const |
bool | Equal (MatrixStrassen< Element > const &other) const |
bool | operator== (MatrixStrassen< Element > const &other) const |
bool | operator!= (MatrixStrassen< Element > const &other) const |
const data_t & | GetData () const |
size_t | GetRows () const |
size_t | GetCols () const |
alloc_func | GetAllocator () const |
void | SetFormat (Format format) |
MatrixStrassen< Element > | Add (MatrixStrassen< Element > const &other) const |
MatrixStrassen< Element > | operator+ (MatrixStrassen< Element > const &other) const |
MatrixStrassen< Element > & | operator+= (MatrixStrassen< Element > const &other) |
MatrixStrassen< Element > | Sub (MatrixStrassen< Element > const &other) const |
MatrixStrassen< Element > | operator- (MatrixStrassen< Element > const &other) const |
MatrixStrassen< Element > & | operator-= (MatrixStrassen< Element > const &other) |
MatrixStrassen< Element > | Transpose () const |
void | Determinant (Element *result) const |
MatrixStrassen< Element > | CofactorMatrixStrassen () const |
MatrixStrassen< Element > & | VStack (MatrixStrassen< Element > const &other) |
MatrixStrassen< Element > & | HStack (MatrixStrassen< Element > const &other) |
Element & | operator() (size_t row, size_t col) |
Element const & | operator() (size_t row, size_t col) const |
MatrixStrassen< Element > | ExtractRow (size_t row) const |
void | SwitchFormat () |
MatrixStrassen< Element > | Mult (const MatrixStrassen< Element > &other, int nrec=0, int pad=-1) const |
MatrixStrassen< Element > | MultByUnityVector () const |
MatrixStrassen< Element > | MultByRandomVector (std::vector< int > ranvec) const |
|
inline |
Constructor that initializes matrix values using a zero allocator
&allocZero | lambda function for zero initialization. |
&rows | number of rows. |
&rows | number of columns. |
lbcrypto::MatrixStrassen< Element >::MatrixStrassen | ( | alloc_func | allocZero, |
size_t | rows, | ||
size_t | cols, | ||
alloc_func | allocGen | ||
) |
Constructor that initializes matrix values using a distribution generation allocator
&allocZero | lambda function for zero initialization (used for initializing derived matrix objects) |
&rows | number of rows. |
&rows | number of columns. |
&allocGen | lambda function for intialization using a distribution generator. |
|
inlineexplicit |
Constructor of an empty matrix; SetSize must be called on this matrix to use it Basically this exists to support deserializing
&allocZero | lambda function for zero initialization. |
|
inline |
Copy constructor
&other | the matrix object to be copied |
|
inline |
|
inline |
Cofactor matrix - the matrix of determinants of the minors A_{ij} multiplied by -1^{i+j}
|
inline |
MatrixStrassen determinant - found using Laplace formula with complexity O(d!), where d is the dimension
*result | where the result is stored |
|
inline |
Equality check
&other | the matrix object to compare to |
|
inline |
|
inline |
Fill matrix using the same element
&val | the element the matrix is filled by |
|
inline |
Sets the first row to be powers of two
|
inline |
Get property to access the zero allocator for the matrix
|
inline |
Get property to access the number of columns in the matrix
|
inline |
Get property to access the data as a vector of vectors
|
inline |
Get property to access the number of rows in the matrix
|
inline |
Add columns the right of the matrix
&other | the matrix to be added to the right of current matrix |
|
inline |
In-place change of the current matrix to Identity matrix
MatrixStrassen< Element > lbcrypto::MatrixStrassen< Element >::Mult | ( | const MatrixStrassen< Element > & | other, |
int | nrec = 0 , |
||
int | pad = -1 |
||
) | const |
MatrixStrassen multiplication
&other | the multiplier matrix |
|
inline |
Computes the infinity norm
|
inline |
In-place change of the current matrix to a matrix of all ones
|
inline |
Operator for non-equality check
&other | the matrix object to compare to |
|
inline |
MatrixStrassen indexing operator - writeable instance of the element
&row | row index |
&col | column index |
|
inline |
MatrixStrassen indexing operator - read-only instance of the element
&row | row index |
&col | column index |
|
inline |
Operator for matrix multiplication
&other | the multiplier matrix |
|
inline |
Operator for scalar multiplication
&other | the multiplier element |
|
inline |
Operator for matrix addition
&other | the matrix to be added |
|
inline |
Operator for in-place addition
&other | the matrix to be added |
|
inline |
Operator for matrix substraction
&other | the matrix to be substracted |
|
inline |
Operator for in-place matrix substraction
&other | the matrix to be substracted |
|
inline |
Assignment operator
&other | the matrix object whose values are to be copied |
|
inline |
Operator for equality check
&other | the matrix object to compare to |
|
inline |
Multiplication of matrix by a scalar
&other | the multiplier element |
void lbcrypto::MatrixStrassen< Element >::SetFormat | ( | Format | format | ) |
Sets the evaluation or coefficient representation for all ring elements that support the SetFormat method
&format | the enum value corresponding to coefficient or evaluation representation |
|
inline |
MatrixStrassen substraction
&other | the matrix to be substracted |
|
inline |
Call switch format for each (ring) element
|
inline |
MatrixStrassen transposition
|
inline |
Add rows to bottom of the matrix
&other | the matrix to be added to the bottom of current matrix |