nil::crypto3::zk::snark::sparse_vector< Type > Struct Template Reference
#include <sparse_vector.hpp>
Collaboration diagram for nil::crypto3::zk::snark::sparse_vector< Type >:
Public Types | |
using | group_type = Type |
Public Member Functions | |
template<typename InputBaseIterator > | |
std::pair< underlying_value_type, sparse_vector< Type > > | accumulate (InputBaseIterator it_begin, InputBaseIterator it_end, std::size_t offset) const |
std::size_t | domain_size () const |
bool | empty () const |
bool | is_valid () const |
sparse_vector< Type > & | operator= (const sparse_vector< Type > &other)=default |
sparse_vector< Type > & | operator= (sparse_vector< Type > &&other)=default |
bool | operator== (const sparse_vector< Type > &other) const |
bool | operator== (const std::vector< underlying_value_type > &other) const |
underlying_value_type | operator[] (const std::size_t idx) const |
std::size_t | size () const |
std::size_t | size_in_bits () const |
sparse_vector ()=default | |
sparse_vector (const sparse_vector< Type > &other)=default | |
sparse_vector (sparse_vector< Type > &&other)=default | |
sparse_vector (std::vector< underlying_value_type > &&v) | |
Public Attributes | |
std::size_t | domain_size_ |
std::vector< std::size_t > | indices |
std::vector< underlying_value_type > | values |
Detailed Description
template<typename Type>
struct nil::crypto3::zk::snark::sparse_vector< Type >
A sparse vector is a list of indices along with corresponding values. The indices are selected from the set {0,1,...,domain_size-1}.
Member Typedef Documentation
◆ group_type
template<typename Type >
using nil::crypto3::zk::snark::sparse_vector< Type >::group_type = Type |
Constructor & Destructor Documentation
◆ sparse_vector() [1/4]
template<typename Type >
|
default |
◆ sparse_vector() [2/4]
template<typename Type >
|
default |
◆ sparse_vector() [3/4]
template<typename Type >
|
default |
◆ sparse_vector() [4/4]
template<typename Type >
|
inline |
Member Function Documentation
◆ accumulate()
template<typename Type >
template<typename InputBaseIterator >
|
inline |
◆ domain_size()
template<typename Type >
|
inline |
◆ empty()
template<typename Type >
|
inline |
◆ is_valid()
template<typename Type >
|
inline |
◆ operator=() [1/2]
template<typename Type >
|
default |
◆ operator=() [2/2]
template<typename Type >
|
default |
◆ operator==() [1/2]
template<typename Type >
|
inline |
◆ operator==() [2/2]
template<typename Type >
|
inline |
◆ operator[]()
template<typename Type >
|
inline |
◆ size()
template<typename Type >
|
inline |
◆ size_in_bits()
template<typename Type >
|
inline |
Member Data Documentation
◆ domain_size_
template<typename Type >
std::size_t nil::crypto3::zk::snark::sparse_vector< Type >::domain_size_ |
◆ indices
template<typename Type >
std::vector<std::size_t> nil::crypto3::zk::snark::sparse_vector< Type >::indices |
◆ values
template<typename Type >
std::vector<underlying_value_type> nil::crypto3::zk::snark::sparse_vector< Type >::values |
The documentation for this struct was generated from the following file: