#include <memory_resource>#include <utility>#include <nk/value/value.hpp>Go to the source code of this file.
Functions | |
| Value | nk::comm::bit2int (const Value &b, int n, bool msbfirst=true, std::pmr::memory_resource *mr=nullptr) |
| Pack a bit vector into integers — y = bit2int(b, n). | |
| Value | nk::comm::int2bit (const Value &d, int n, bool msbfirst=true, std::pmr::memory_resource *mr=nullptr) |
| Unpack integers into a bit matrix — b = int2bit(d, n). | |
| Value | nk::comm::bi2de (const Value &b, int base=2, bool msbfirst=false, std::pmr::memory_resource *mr=nullptr) |
| Convert digit-rows to decimal — d = bi2de(b) (legacy). | |
| Value | nk::comm::de2bi (const Value &d, int n=-1, int base=2, bool msbfirst=false, std::pmr::memory_resource *mr=nullptr) |
| Convert integers to digit-rows — b = de2bi(d) (legacy). | |
| std::pair< Value, int > | nk::comm::vec2mat (const Value &v, int n, double padval=0.0, std::pmr::memory_resource *mr=nullptr) |
| Reshape a vector into an N-column matrix with padding — [m, pad] = vec2mat(v, n). | |