helayers::CipherMatrix Class Reference
A class for holding a matrix of ciphertexts. More...
#include <CipherMatrix.h>
Public Member Functions | |
| CipherMatrix (HeContext &he) | |
| Construct an empty object. More... | |
| CipherMatrix (const CipherMatrix &src)=default | |
| Default copy constructor. | |
| CipherMatrix & | operator= (const CipherMatrix &src)=default |
| Default assignment operator. | |
| std::streamoff | save (std::ostream &stream) const |
| Save object to binary stream. More... | |
| std::streamoff | load (std::istream &stream) |
| Load object from binary stream. More... | |
| void | add (const CipherMatrix &other) |
| Elementwise add other matrix. More... | |
| CipherMatrix | getMatrixMultiply (const CipherMatrix &other) const |
| Returns a CipherMatrix containing the matrixmultiplication result. More... | |
| void | square () |
| Elementwise square. | |
| CipherMatrix | getSquare () const |
| Returns a copy of this matrix with elementwise square applied. | |
| void | relinearize () |
| Relinearize all ciphertexts. | |
| void | rescale () |
| Rescale all ciphertexts. | |
| int | getChainIndex () const |
| Returns the current chain index of ciphertexts. | |
Friends | |
| class | CipherMatrixEncoder |
Detailed Description
A class for holding a matrix of ciphertexts.
Constructor & Destructor Documentation
◆ CipherMatrix()
| helayers::CipherMatrix::CipherMatrix | ( | HeContext & | he | ) |
Construct an empty object.
- Parameters
-
[in] he the underlying context.
Member Function Documentation
◆ add()
| void helayers::CipherMatrix::add | ( | const CipherMatrix & | other | ) |
Elementwise add other matrix.
- Parameters
-
[in] other matrix to add to
◆ getMatrixMultiply()
| CipherMatrix helayers::CipherMatrix::getMatrixMultiply | ( | const CipherMatrix & | other | ) | const |
Returns a CipherMatrix containing the matrixmultiplication result.
- Parameters
-
[in] other matrix to multiply with
◆ load()
| streamoff helayers::CipherMatrix::load | ( | std::istream & | stream | ) |
Load object from binary stream.
- Parameters
-
[in] stream output stream to read from
◆ save()
| streamoff helayers::CipherMatrix::save | ( | std::ostream & | stream | ) | const |
Save object to binary stream.
- Parameters
-
[in] stream output stream to write to
The documentation for this class was generated from the following files:
- /opt/IBM/FHE-distro/ML-HElib/src/helayers/simple_nn/CipherMatrix.h
- /opt/IBM/FHE-distro/ML-HElib/src/helayers/simple_nn/CipherMatrix.cpp
1.8.17