Binc::BitVector Class Reference
[Binary Vectors]

#include <bit-vector.h>

Inheritance diagram for Binc::BitVector:
Inheritance graph
[legend]
Collaboration diagram for Binc::BitVector:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 BitVector (const std::vector< unsigned int > &v)
bool operator== (const BitVector &rhs) const
bool operator!= (const BitVector &rhs) const
BitVectoroperator+= (const BitVector &rhs)
unsigned int Size ()

Friends

BitVector operator+ (const BitVector &lhs, const BitVector &rhs)
std::ostream & operator<< (std::ostream &os, const BitVector &v)

Detailed Description

this class implements vectors of bits using vectors of uint (i.e., BitVectorUint_t).


Constructor & Destructor Documentation

Binc::BitVector::BitVector ( const std::vector< unsigned int > &  v  ) 
Parameters:
v 

Member Function Documentation

bool Binc::BitVector::operator!= ( const BitVector rhs  )  const
Parameters:
rhs the Right Hand Side
Returns:
true if the bit vectors are different in size or content, false otherwise
BitVector & Binc::BitVector::operator+= ( const BitVector rhs  ) 

Add the Right Hand Side of the operator to *this, bit by bit. Since we work over the GF2 (binary) field, this is equivalent to the bit by bit XOR operation.

Parameters:
rhs the Right Hand Side
Returns:
a reference to *this
bool Binc::BitVector::operator== ( const BitVector rhs  )  const
Parameters:
rhs the Right Hand Side
Returns:
true if the bit vectors are equal in size and content, false otherwise
unsigned int Binc::BitVector::Size (  ) 
Returns:
the size in bits (not bytes!)

Friends And Related Function Documentation

BitVector operator+ ( const BitVector lhs,
const BitVector rhs 
) [friend]

bitwise addition operator. Since we work over the GF2 (binary) field, this is equivalent to the bit by bit XOR operation.

Parameters:
lhs Left Hand Side of the operator
rhs Right Hand Side of the operator
Returns:
the value of lhs + rhs
std::ostream& operator<< ( std::ostream &  os,
const BitVector v 
) [friend]

print a BitVector

Parameters:
os the output stream
v the BitVector to be printed
Returns:
a reference to the output stream

The documentation for this class was generated from the following files:
 All Classes Functions Variables Friends
Generated on Sat Apr 30 23:15:46 2011 for libBiNC by  doxygen 1.6.3