Binc::CodingVector Class Reference
[Binary Vectors]
#include <coding-vector.h>
List of all members.
Detailed Description
This class implements the coding vector of coded packets which are internally represented using vectors of unsigned int variables, each of which holds 8*sizeof(unsigned int) coefficients. The internal representation of the coding vector is designed to be memory-efficient for coding vectors whose non-zero entries are closely packed.
Constructor & Destructor Documentation
Binc::CodingVector::CodingVector |
( |
unsigned int |
position |
) |
|
Create a coding vector with a single bit set to one and all other bits set to zero
- Parameters:
-
| position | the position (bit number) of the bit set to one |
- Returns:
- the created coding vector
Binc::CodingVector::CodingVector |
( |
const std::vector< unsigned int > & |
v |
) |
|
Create a coding vector corresponding to the given vector of bitmasks
- Parameters:
-
Member Function Documentation
bool Binc::CodingVector::At |
( |
unsigned int |
position |
) |
const |
- Parameters:
-
| n | the index of the coefficient (bit) |
- Returns:
- the value of the coefficient (bit) with the given index
bool Binc::CodingVector::operator!= |
( |
const CodingVector & |
rhs |
) |
const |
- Parameters:
-
- Returns:
- true if the bit vectors are different in size or content, false otherwise
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:
-
- Returns:
- a reference to *this
bool Binc::CodingVector::operator== |
( |
const CodingVector & |
rhs |
) |
const |
- Parameters:
-
- Returns:
- true if the bit vectors are equal in size and content, false otherwise
void Binc::CodingVector::Print |
( |
std::ostream & |
os |
) |
const |
Print the CodingVector
- Parameters:
-
| os | the stream to be used for printing |
unsigned int Binc::CodingVector::Size |
( |
|
) |
const |
- Returns:
- the size in bits (not bytes!)
Friends And Related Function Documentation
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
The documentation for this class was generated from the following files: