Functions | |
| template<class T > | |
| bvec | itpp::to_bvec (const Vec< T > &v) |
| Converts a Vec<T> to bvec. | |
| template<class T > | |
| svec | itpp::to_svec (const Vec< T > &v) |
| Converts a Vec<T> to svec. | |
| template<class T > | |
| ivec | itpp::to_ivec (const Vec< T > &v) |
| Converts a Vec<T> to ivec. | |
| template<class T > | |
| vec | itpp::to_vec (const Vec< T > &v) |
| Converts a Vec<T> to vec. | |
| template<class T > | |
| cvec | itpp::to_cvec (const Vec< T > &v) |
| Converts a Vec<T> to cvec. | |
| template<class T > | |
| cvec | itpp::to_cvec (const Vec< T > &real, const Vec< T > &imag) |
| Converts real and imaginary Vec<T> to cvec. | |
| ivec | itpp::to_ivec (int s) |
| Converts an int to ivec. | |
| vec | itpp::to_vec (double s) |
| Converts an double to vec. | |
| cvec | itpp::to_cvec (double real, double imag) |
| Converts real and imaginary double to cvec. | |
| template<class T > | |
| bmat | itpp::to_bmat (const Mat< T > &m) |
| Converts a Mat<T> to bmat. | |
| template<class T > | |
| smat | itpp::to_smat (const Mat< T > &m) |
| Converts a Mat<T> to smat. | |
| template<class T > | |
| imat | itpp::to_imat (const Mat< T > &m) |
| Converts a Mat<T> to imat. | |
| template<class T > | |
| mat | itpp::to_mat (const Mat< T > &m) |
| Converts a Mat<T> to mat. | |
| template<class T > | |
| cmat | itpp::to_cmat (const Mat< T > &m) |
| Converts a Mat<T> to cmat. | |
| template<class T > | |
| cmat | itpp::to_cmat (const Mat< T > &real, const Mat< T > &imag) |
| Converts real and imaginary Mat<T> to cmat. | |
| bvec | itpp::dec2bin (int length, int index) |
| Convert a decimal int index to bvec using length bits in the representation. | |
| void | itpp::dec2bin (int index, bvec &v) |
| Convert a decimal int index to bvec. Value returned in v. | |
| bvec | itpp::dec2bin (int index, bool msb_first=true) |
| Convert a decimal int index to bvec with the first bit as MSB if msb_first == true. | |
| int | itpp::bin2dec (const bvec &inbvec, bool msb_first=true) |
| Convert a bvec to decimal int with the first bit as MSB if msb_first == true. | |
| bvec | itpp::oct2bin (const ivec &octalindex, short keepzeros=0) |
| Convert ivec of octal form to bvec. | |
| ivec | itpp::bin2oct (const bvec &inbits) |
| Convert bvec to octal ivec. | |
| ivec | itpp::bin2pol (const bvec &inbvec) |
| Convert bvec to polar binary representation as ivec. | |
| bvec | itpp::pol2bin (const ivec &inpol) |
| Convert binary polar ivec to bvec. | |
| double | itpp::rad_to_deg (double x) |
| Convert radians to degrees. | |
| double | itpp::deg_to_rad (double x) |
| Convert degrees to radians. | |
| double | itpp::round (double x) |
| Round to nearest integer, return result in double. | |
| vec | itpp::round (const vec &x) |
| Round to nearest integer. | |
| mat | itpp::round (const mat &x) |
| Round to nearest integer. | |
| int | itpp::round_i (double x) |
| Round to nearest integer. | |
| ivec | itpp::round_i (const vec &x) |
| Round to nearest integer and return ivec. | |
| imat | itpp::round_i (const mat &x) |
| Round to nearest integer and return imat. | |
| vec | itpp::ceil (const vec &x) |
| Round to nearest upper integer. | |
| mat | itpp::ceil (const mat &x) |
| Round to nearest upper integer. | |
| int | itpp::ceil_i (double x) |
| The nearest larger integer. | |
| ivec | itpp::ceil_i (const vec &x) |
| Round to nearest upper integer. | |
| imat | itpp::ceil_i (const mat &x) |
| Round to nearest upper integer. | |
| vec | itpp::floor (const vec &x) |
| Round to nearest lower integer. | |
| mat | itpp::floor (const mat &x) |
| Round to nearest lower integer. | |
| int | itpp::floor_i (double x) |
| The nearest smaller integer. | |
| ivec | itpp::floor_i (const vec &x) |
| Round to nearest lower integer. | |
| imat | itpp::floor_i (const mat &x) |
| Round to nearest lower integer. | |
| double | itpp::round_to_zero (double x, double threshold=1e-14) |
| Round x to zero if abs(x) is smaller than threshold. | |
| std::complex< double > | itpp::round_to_zero (const std::complex< double > &x, double threshold=1e-14) |
| Round each part of x smaller than threshold to zero. | |
| vec | itpp::round_to_zero (const vec &x, double threshold=1e-14) |
| Round each element to zero if element < threshold. | |
| mat | itpp::round_to_zero (const mat &x, double threshold=1e-14) |
| Round each element to zero if element < threshold. | |
| cvec | itpp::round_to_zero (const cvec &x, double threshold=1e-14) |
| Round each element to zero if element < threshold. | |
| cmat | itpp::round_to_zero (const cmat &x, double threshold=1e-14) |
| Round each element to zero if element < threshold. | |
| int | itpp::gray_code (int x) |
| Convert to Gray Code. | |
| template<typename T > | |
| std::string | itpp::to_str (const T &i) |
| Convert anything to string. | |
| std::string | itpp::to_str (const double &i, const int precision) |
| Convert double to string. | |
| template<class T > | |
| bvec | itpp::Vec::to_bvec (const Vec< T > &v) |
| Converts a Vec<T> to bvec. | |
| template<class T > | |
| svec | itpp::Vec::to_svec (const Vec< T > &v) |
| Converts a Vec<T> to svec. | |
| template<class T > | |
| ivec | itpp::Vec::to_ivec (const Vec< T > &v) |
| Converts a Vec<T> to ivec. | |
| template<class T > | |
| vec | itpp::Vec::to_vec (const Vec< T > &v) |
| Converts a Vec<T> to vec. | |
| template<class T > | |
| cvec | itpp::Vec::to_cvec (const Vec< T > &v) |
| Converts a Vec<T> to cvec. | |
| template<class T > | |
| cvec | itpp::Vec::to_cvec (const Vec< T > &real, const Vec< T > &imag) |
| Converts real and imaginary Vec<T> to cvec. | |
| ivec | itpp::Vec::to_ivec (int s) |
| Converts an int to ivec. | |
| vec | itpp::Vec::to_vec (double s) |
| Converts an double to vec. | |
| cvec | itpp::Vec::to_cvec (double real, double imag) |
| Converts real and imaginary double to cvec. | |
| template<class T > | |
| bmat | itpp::Mat::to_bmat (const Mat< T > &m) |
| Converts a Mat<T> to bmat. | |
| template<class T > | |
| smat | itpp::Mat::to_smat (const Mat< T > &m) |
| Converts a Mat<T> to smat. | |
| template<class T > | |
| imat | itpp::Mat::to_imat (const Mat< T > &m) |
| Converts a Mat<T> to imat. | |
| template<class T > | |
| mat | itpp::Mat::to_mat (const Mat< T > &m) |
| Converts a Mat<T> to mat. | |
| template<class T > | |
| cmat | itpp::Mat::to_cmat (const Mat< T > &m) |
| Converts a Mat<T> to cmat. | |
| template<class T > | |
| cmat | itpp::Mat::to_cmat (const Mat< T > &real, const Mat< T > &imag) |
| Converts real and imaginary Mat<T> to cmat. | |
Convert bvec to octal ivec.
Converts from bvec containing {0,1} to ivec containing {0,1,2,...,7}. Adds zeros to the left if inbits.length() is not a factor of 3. Example: bin2oct("1 1 1 0 1 1 0 1 0 0 1") returns {3 5 5 1}.
Convert ivec of octal form to bvec.
Converts from ivec containing {0,1,2,...,7} to bvec containing {0,1}. Removes zeros to the left if keepzeros = 0 (default). Example: oct2bin("3 5 5 1") returns {1 1 1 0 1 1 0 1 0 0 1}.
Referenced by itpp::BCH::BCH(), itpp::LFSR::set_connections(), and itpp::LFSR::set_state().
| std::string itpp::to_str | ( | const double & | i, | |
| const int | precision | |||
| ) |
Convert double to string.
| [in] | i | The value to be converted to a string |
| [in] | precision | The number of digits used to represent the fractional part |
Referenced by itpp::assert_fixshift(), itpp::TCP_Segment::set_begin(), and itpp::TCP_Segment::set_end().
| std::string itpp::to_str | ( | const T & | i | ) | [inline] |
Convert anything to string.
| i | (Input) The value to be converted to a string |
1.5.8