|
MOTION
0.01
Framework for mixed-protocol multi-party computation
|
#include <bit_matrix.h>
Public Member Functions | |
| BitMatrix ()=default | |
| BitMatrix (std::size_t rows, std::size_t columns, bool value=false) | |
Construct a rows x columns BitMatrix with all bits set to value. More... | |
| BitMatrix (std::vector< AlignedBitVector > &&vectors) | |
| Construct a BitMatrix by moving a vector of AlignedBitVectors. More... | |
| BitMatrix (const std::vector< AlignedBitVector > &vectors) | |
| Construct a BitMatrix by copying a vector of AlignedBitVectors. More... | |
| BitMatrix (const BitMatrix &other) | |
| BitMatrix (BitMatrix &&other) | |
| void | operator= (const BitMatrix &other) |
| void | operator= (BitMatrix &&other) |
| const AlignedBitVector & | GetRow (std::size_t i) const |
Returns a const AlignedBitVector reference to row i of the matrix. More... | |
| AlignedBitVector & | GetMutableRow (std::size_t i) |
Returns a mutable AlignedBitVector reference to row i of the matrix. More... | |
| bool | Get (std::size_t row_i, std::size_t column_i) const |
| Get Bit at input position. More... | |
| void | Set (std::size_t row_i, std::size_t column_i, bool value) |
| Set or unset bit at input position. More... | |
| void | AppendRow (const AlignedBitVector &bit_vector) |
| Appends a new row by copying the input bit_vector to the matrix. More... | |
| void | AppendRow (AlignedBitVector &&bit_vector) |
| Appends a new row by moving the input bit_vector to the matrix. More... | |
| void | AppendColumn (const AlignedBitVector &bit_vector) |
| Appends a new column by copying the input bit_vector to the matrix. More... | |
| void | AppendColumn (AlignedBitVector &&bit_vector) |
| Appends a new column by moving the input bit_vector to the matrix. More... | |
| std::string | AsString () const |
| Return a string representation of the BitMatrix. More... | |
| void | ForceSetNumColumns (std::size_t n) |
Force the number of columns to be equal to n. More... | |
| void | Transpose () |
| Transposes the matrix inplace. More... | |
| void | Transpose128Rows () |
| Transposes a matrix with exactly 128 rows (faster). More... | |
| bool | operator== (const BitMatrix &other) const |
| Compare with another BitMatrix for equality. More... | |
| bool | operator!= (const BitMatrix &other) const |
| Compare with another BitMatrix for inequality. More... | |
| auto | GetNumRows () const noexcept |
| Get number of rows in the BitMatrix. More... | |
| auto | GetNumColumns () const noexcept |
| Get number of columns in the BitMatrix. More... | |
Static Public Member Functions | |
| static void | Transpose128RowsInplace (std::array< std::byte *, 128 > &matrix, std::size_t number_of_columns) |
| Transposes a matrix of 128 rows and arbitrary column size inplace. More... | |
| static void | TransposeUsingBitSlicing (std::array< std::byte *, 128 > &matrix, std::size_t number_of_columns) |
| Transposes a matrix of 128 rows and arbitrary column size inplace using BitSlicing. More... | |
| static void | SenderTransposeAndEncrypt (const std::array< const std::byte *, 128 > &matrix, std::vector< BitVector<>> &y0, std::vector< BitVector<>> &y1, const BitVector<> choices, primitives::Prg &prg_fixed_key, const std::size_t number_of_columns, const std::vector< std::size_t > &bitlengths) |
| Transposes a matrix of 128 rows and arbitrary column size and encrypts it for the sender role. More... | |
| static void | ReceiverTransposeAndEncrypt (const std::array< const std::byte *, 128 > &matrix, std::vector< BitVector<>> &output, primitives::Prg &prg_fixed_key, const std::size_t number_of_columns, const std::vector< std::size_t > &bitlengths) |
| Transposes a matrix of 128 rows and arbitrary column size and encrypts it for the recepient role. More... | |
|
default |
|
inline |
Construct a rows x columns BitMatrix with all bits set to value.
| rows | |
| columns | |
| value |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Appends a new column by moving the input bit_vector to the matrix.
| bit_vector | The new column. |
bit_vector must be equal to the number of rows in the matrix. 

| void encrypto::motion::BitMatrix::AppendColumn | ( | const AlignedBitVector & | bit_vector | ) |
Appends a new column by copying the input bit_vector to the matrix.
| bit_vector | The new column. |
bit_vector must be equal to the number of rows in the matrix. 
| void encrypto::motion::BitMatrix::AppendRow | ( | AlignedBitVector && | bit_vector | ) |
Appends a new row by moving the input bit_vector to the matrix.
| bit_vector | The new row. |
bit_vector must be equal to the number of columns in the matrix. | void encrypto::motion::BitMatrix::AppendRow | ( | const AlignedBitVector & | bit_vector | ) |
Appends a new row by copying the input bit_vector to the matrix.
| bit_vector | The new row. |
bit_vector must be equal to the number of columns in the matrix. 
| std::string encrypto::motion::BitMatrix::AsString | ( | ) | const |
Return a string representation of the BitMatrix.
|
inline |
Force the number of columns to be equal to n.
| n |
|
inline |
Get Bit at input position.
| row_i | |
| column_i |
|
inline |
|
inlinenoexcept |
Get number of columns in the BitMatrix.
|
inlinenoexcept |
Get number of rows in the BitMatrix.
|
inline |
Returns a const AlignedBitVector reference to row i of the matrix.
| i |
|
inline |
Compare with another BitMatrix for inequality.
| other |
|
inline |
|
inline |
| bool encrypto::motion::BitMatrix::operator== | ( | const BitMatrix & | other | ) | const |
Compare with another BitMatrix for equality.
| other |
|
static |
Transposes a matrix of 128 rows and arbitrary column size and encrypts it for the recepient role.
| matrix |


|
static |
Transposes a matrix of 128 rows and arbitrary column size and encrypts it for the sender role.
| matrix |


|
inline |
Set or unset bit at input position.
| row_i | |
| column_i | |
| value |
| void encrypto::motion::BitMatrix::Transpose | ( | ) |
Transposes the matrix inplace.
| void encrypto::motion::BitMatrix::Transpose128Rows | ( | ) |
Transposes a matrix with exactly 128 rows (faster).
|
static |
Transposes a matrix of 128 rows and arbitrary column size inplace.
| matrix | |
| number_of_columns |
|
static |
Transposes a matrix of 128 rows and arbitrary column size inplace using BitSlicing.
| matrix | |
| number_of_columns |
1.8.17