GNU Radio's GSM Package: SoftVector Class Reference

GNU Radio's GSM Package

Public Member Functions | List of all members
SoftVector Class Reference

`#include <BitVector.h>`

Inheritance diagram for SoftVector:

## Public Member Functions
| SoftVector (size_t wSize=0)
| SoftVector (const char *valString)
| SoftVector (const BitVector &source)
| SoftVector (float *wData, unsigned length)
| SoftVector (float *wData, float *wStart, float *wEnd)
| SoftVector (Vector< float > source)
float | getEnergy (float *low=0) const
float | getSNR () const
void | unknown ()
bool | bit (size_t index) const
BitVector | sliced () const
void | copyUnPunctured (SoftVector &dst, const unsigned *puncture, const size_t plth)
float | softbit (size_t index) const
void | settfb (size_t index, float value)
Casts and overrides of Vector operators.
SoftVector | segment (size_t start, size_t span)
SoftVector | alias ()
const SoftVector | segment (size_t start, size_t span) const
SoftVector | head (size_t span)
const SoftVector | head (size_t span) const
SoftVector | tail (size_t start)
const SoftVector | tail (size_t start) const
Public Member Functions inherited from Vector< float >
| Vector (size_t wSize=0)
| Vector (Vector< float > &other)
| Vector (const Vector< float > &other)
| Vector (float *wData, float *wStart, float *wEnd)
| Vector (float *wStart, size_t span)
| Vector (const Vector< float > &other1, const Vector< float > &other2)
void | operator= (Vector< float > &other)
void | operator= (const Vector< float > &other)
Vector< float > | segment (size_t start, size_t span)
const Vector< float > | segment (size_t start, size_t span) const
Vector< float > | head (size_t span)
const Vector< float > | head (size_t span) const
Vector< float > | tail (size_t start)
const Vector< float > | tail (size_t start) const
Public Member Functions inherited from VectorBase< float >
size_t | size () const
size_t | bytes () const
void | resize (size_t newElements)
void | clear ()
void | clone (const VectorBase< float > &other)
void | vConcat (const VectorBase< float > &other1, const VectorBase< float > &other2)
| ~VectorBase ()
bool | isOwner ()
std::string | inspect () const
void | copyToSegment (VectorBase< float > &other, size_t start, size_t span) const
void | copyToSegment (VectorBase< float > &other, size_t start=0) const
void | copyTo (VectorBase< float > &other) const
void | segmentCopyTo (VectorBase< float > &other, size_t start, size_t span) const
void | fill (const float &val)
void | fill (const float &val, unsigned start, unsigned length)
void | operator= (const VectorBase< float > &other)
float & | operator[] (size_t index)
const float & | operator[] (size_t index) const
const float * | begin () const
float * | begin ()
const float * | end () const
float * | end ()
const float * | getData () const

## Additional Inherited Members
Public Types inherited from Vector< float >
typedef float * | iterator
typedef const float * | const_iterator
Protected Types inherited from VectorBase< float >
typedef float * | VectorDataType
Protected Member Functions inherited from VectorBase< float >
void | vInit (size_t elements)
void | shiftMem (VectorBase< float > &other)
void | makeAlias (const VectorBase< float > &other)
| VectorBase ()
| VectorBase (VectorDataType wData, float *wStart, float *wEnd)
Protected Attributes inherited from VectorBase< float >
VectorDataType | mData
| allocated data block. More...
float * | mStart
| start of useful data More...
float * | mEnd
| end of useful data + 1 More...

## Detailed Description

The SoftVector class is used to represent a soft-decision signal. Values 0..1 represent probabilities that a bit is "true".

## Constructor & Destructor Documentation

## ◆ SoftVector() [1/6]

SoftVector::SoftVector | ( | size_t | wSize = `0` | ) |
| inline

Build a SoftVector of a given length.

## ◆ SoftVector() [2/6]

SoftVector::SoftVector | ( | const char * | valString | ) |

Construct a SoftVector from a C string of "0", "1", and "X".

## ◆ SoftVector() [3/6]

SoftVector::SoftVector | ( | const BitVector & | source | ) |

Construct a SoftVector from a BitVector.

## ◆ SoftVector() [4/6]

SoftVector::SoftVector | ( | float * | wData,
|  | unsigned | length
| ) |  |
| inline

Wrap a SoftVector around a block of floats. The block will be delete[]ed upon desctuction.

## ◆ SoftVector() [5/6]

SoftVector::SoftVector | ( | float * | wData,
|  | float * | wStart,
|  | float * | wEnd
| ) |  |
| inline

## ◆ SoftVector() [6/6]

SoftVector::SoftVector | ( | Vector< float > | source | ) |
| inline

Casting from a Vector<float>. Note that this is NOT pass-by-reference.

## Member Function Documentation

## ◆ alias()

SoftVector SoftVector::alias | ( |  | ) |
| inline

References Generator::size().

## ◆ bit()

bool SoftVector::bit | ( | size_t | index | ) | const
| inline

Return a hard bit value from a given index by slicing.

## ◆ copyUnPunctured()

void SoftVector::copyUnPunctured | ( | SoftVector & | dst,
|  | const unsigned * | puncture,
|  | const size_t | plth
| ) |  |

Copy to dst, adding in 0.5 for those indexed in puncture.

## ◆ getEnergy()

float SoftVector::getEnergy | ( | float * | low = `0` | ) | const

## ◆ getSNR()

float SoftVector::getSNR | ( |  | ) | const

## ◆ head() [1/2]

SoftVector SoftVector::head | ( | size_t | span | ) |
| inline

## ◆ head() [2/2]

const SoftVector SoftVector::head | ( | size_t | span | ) | const
| inline

## ◆ segment() [1/2]

SoftVector SoftVector::segment | ( | size_t | start,
|  | size_t | span
| ) |  |
| inline

## ◆ segment() [2/2]

const SoftVector SoftVector::segment | ( | size_t | start,
|  | size_t | span
| ) |  | const
| inline

References Vector< T >::segment().

## ◆ settfb()

void SoftVector::settfb | ( | size_t | index,
|  | float | value
| ) |  |
| inline

Set a soft bit

References operator<<().

## ◆ sliced()

BitVector SoftVector::sliced | ( |  | ) | const

Slice the whole signal into bits.

## ◆ softbit()

float SoftVector::softbit | ( | size_t | index | ) | const
| inline

Return a soft bit.

## ◆ tail() [1/2]

SoftVector SoftVector::tail | ( | size_t | start | ) |
| inline

References Generator::size().

## ◆ tail() [2/2]

const SoftVector SoftVector::tail | ( | size_t | start | ) | const
| inline

References Generator::size().

## ◆ unknown()

void SoftVector::unknown | ( |  | ) |
| inline

Fill with "unknown" values.

The documentation for this class was generated from the following file:

- BitVector.h