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 Functions | |
(Note that these are not member functions.) | |
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:
Generated on Sat Jul 6 2013 10:54:30 for IT++ by Doxygen 1.8.2