Clearmatics Libsnark  0.1
C++ library for zkSNARK proofs
Public Member Functions | List of all members
gadgetlib2::MultiPackedWord Class Reference

#include <variable.hpp>

Inheritance diagram for gadgetlib2::MultiPackedWord:
Inheritance graph
[legend]
Collaboration diagram for gadgetlib2::MultiPackedWord:
Collaboration graph
[legend]

Public Member Functions

 MultiPackedWord (const FieldType &fieldType=AGNOSTIC)
 
 MultiPackedWord (const size_t numBits, const FieldType &fieldType, const ::std::string &name)
 
void resize (const size_t numBits)
 
::std::string name () const
 
- Public Member Functions inherited from gadgetlib2::VariableArray
 VariableArray (const ::std::string &name="")
 
 VariableArray (const int size, const ::std::string &name="")
 
 VariableArray (const size_t size, const ::std::string &name="")
 
 VariableArray (const size_t size, const Variable &contents)
 
::std::string name () const
 

Detailed Description

Holds variables whose purpose is to be populated with the packed form of some word. word representation can be larger than a single field element in small enough fields

Definition at line 404 of file variable.hpp.

Constructor & Destructor Documentation

◆ MultiPackedWord() [1/2]

gadgetlib2::MultiPackedWord::MultiPackedWord ( const FieldType fieldType = AGNOSTIC)

Definition at line 383 of file variable.cpp.

384  : VariableArray(), numBits_(0), fieldType_(fieldType)
385 {
386 }

◆ MultiPackedWord() [2/2]

gadgetlib2::MultiPackedWord::MultiPackedWord ( const size_t  numBits,
const FieldType fieldType,
const ::std::string &  name 
)

Definition at line 388 of file variable.cpp.

390  : VariableArray(), numBits_(numBits), fieldType_(fieldType)
391 {
392  size_t packedSize = getMultipackedSize();
393  VariableArray varArray(packedSize, name);
394  VariableArray::swap(varArray);
395 }
Here is the call graph for this function:

Member Function Documentation

◆ name()

::std::string gadgetlib2::MultiPackedWord::name ( ) const
inline

Definition at line 418 of file variable.hpp.

418 { return VariableArray::name(); }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ resize()

void gadgetlib2::MultiPackedWord::resize ( const size_t  numBits)

Definition at line 397 of file variable.cpp.

398 {
399  numBits_ = numBits;
400  size_t packedSize = getMultipackedSize();
401  VariableArray::resize(packedSize);
402 }
Here is the caller graph for this function:

The documentation for this class was generated from the following files:
gadgetlib2::VariableArray::name
::std::string name() const
Definition: variable.cpp:353
gadgetlib2::MultiPackedWord::name
::std::string name() const
Definition: variable.hpp:418
gadgetlib2::VariableArray::VariableArray
VariableArray(const ::std::string &name="")