|
IT++ 4.3.1
|
Binary arithmetic (boolean) class. More...
#include <itpp/base/binary.h>
Public Member Functions | |
| bin () | |
| Default constructor. | |
| bin (const int &value) | |
Set the binary object equal to value. Either "0" or "1". | |
| bin (const bin &inbin) | |
| Copy constructor. | |
| void | operator= (const int &value) |
| Assign a value. | |
| void | operator= (const bin &inbin) |
| Assign a value. | |
| void | operator/= (const bin &inbin) |
| OR. | |
| void | operator|= (const bin &inbin) |
| OR. | |
| bin | operator/ (const bin &inbin) const |
| OR. | |
| bin | operator| (const bin &inbin) const |
| OR. | |
| void | operator+= (const bin &inbin) |
| XOR. | |
| void | operator^= (const bin &inbin) |
| XOR. | |
| bin | operator+ (const bin &inbin) const |
| XOR. | |
| bin | operator^ (const bin &inbin) const |
| XOR. | |
| void | operator-= (const bin &inbin) |
| XOR. | |
| bin | operator- (const bin &inbin) const |
| XOR. | |
| bin | operator- () const |
| Dummy definition to be able to use vec<bin>. | |
| void | operator*= (const bin &inbin) |
| AND. | |
| void | operator&= (const bin &inbin) |
| AND. | |
| bin | operator* (const bin &inbin) const |
| AND. | |
| bin | operator& (const bin &inbin) const |
| AND. | |
| bin | operator! (void) const |
| NOT. | |
| bin | operator~ (void) const |
| NOT. | |
| bool | operator== (const bin &inbin) const |
| Check if equal. | |
| bool | operator== (const int &i) const |
| Check if equal. | |
| bool | operator!= (const bin &inbin) const |
| Check if not equal. | |
| bool | operator!= (const int &i) const |
| Check if not equal. | |
| bool | operator< (const bin &inbin) const |
| Less than (interpret the binary values {0,1} as integers). | |
| bool | operator<= (const bin &inbin) const |
| Less than equal (interpret the binary values {0,1} as integers). | |
| bool | operator> (const bin &inbin) const |
| Greater than (interpret the binary values {0,1} as integers). | |
| bool | operator>= (const bin &inbin) const |
| Greater than equal (interpret the binary values {0,1} as integers). | |
| operator short () const | |
Convert bin to short. | |
| operator int () const | |
Convert bin to int. | |
| operator bool () const | |
Convert bin to bool. | |
| operator float () const | |
Convert bin to float. | |
| operator double () const | |
Convert bin to double. | |
| char | value () const |
| Output the binary value of the object. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| ITPP_EXPORT std::ostream & | operator<< (std::ostream &output, const bin &inbin) |
| Output stream of bin. | |
| ITPP_EXPORT std::istream & | operator>> (std::istream &input, bin &outbin) |
| Input stream of bin. | |
| bin | abs (const bin &inbin) |
| absolute value of bin | |
| int | abs (const itpp::bin &inbin) |
| absolute value of bin | |
Binary arithmetic (boolean) class.
This class creates a binary arithmetic class, following the ordinary rules for binary (GF(2)) fields.
Examples:
|
inline |
Default constructor.
Definition at line 60 of file binary.h.
Referenced by abs(), bin(), itpp::Punctured_Turbo_Codec::calculate_punctured_size(), itpp::Modulator< T >::calculate_softbit_matrices(), itpp::Convolutional_Code::catastrophic(), itpp::Punctured_Turbo_Codec::decode(), itpp::Turbo_Codec::decode_block(), itpp::Turbo_Codec::decode_n3(), itpp::Punctured_Convolutional_Code::decode_tail(), itpp::Punctured_Convolutional_Code::decode_tailbite(), itpp::Punctured_Convolutional_Code::decode_trunc(), itpp::BPSK::demodulate_bits(), itpp::BPSK_c::demodulate_bits(), itpp::Punctured_Turbo_Codec::encode(), itpp::Punctured_Convolutional_Code::encode_tail(), itpp::Rec_Syst_Conv_Code::encode_tail(), itpp::Punctured_Convolutional_Code::encode_tailbite(), itpp::Punctured_Convolutional_Code::encode_trunc(), itpp::find(), itpp::GF2mat_sparse_alist::from_sparse(), itpp::Convolutional_Code::inverse_tail(), itpp::mxArray2bin(), itpp::mxArray2bmat(), itpp::mxArray2bvec(), operator!(), operator!=(), operator&(), operator&=(), itpp::BSC::operator()(), itpp::Vec< Num_T >::operator()(), operator*(), operator*=(), operator+(), operator+=(), operator-(), operator-(), operator-=(), operator/(), operator/=(), operator<(), operator<<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), operator>>(), operator^(), operator^=(), operator|(), operator|=(), operator~(), itpp::GF2mat_sparse_alist::to_sparse(), itpp::Punctured_Convolutional_Code::weight(), itpp::Punctured_Convolutional_Code::weight(), itpp::weight(), itpp::Punctured_Convolutional_Code::weight_reverse(), and itpp::Punctured_Convolutional_Code::weight_reverse().
|
inline |
Set the binary object equal to value. Either "0" or "1".
Definition at line 63 of file binary.h.
References it_assert_debug, and value().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Output the binary value of the object.
Definition at line 152 of file binary.h.
Referenced by bin(), itpp::it_file::low_level_write(), itpp::it_file_old::low_level_write(), and operator=().
|
Output stream of bin.
Definition at line 36 of file binary.cpp.
References bin(), and operator<<().
Referenced by operator<<().
|
Input stream of bin.
Definition at line 42 of file binary.cpp.
References bin(), it_assert, and operator>>().
Referenced by operator>>().