GNU Radio's GSM Package
SoftVector Class Reference

#include <BitVector.h>

Inheritance diagram for SoftVector:
[legend]

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)
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
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)
Public Member Functions inherited from Vector< float >
 Vector (size_t wSize=0)
void operator= (Vector< float > &other)
Vector< float > segment (size_t start, size_t span)
Vector< float > head (size_t span)
Vector< float > tail (size_t start)
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 copyTo (VectorBase< float > &other) const
void segmentCopyTo (VectorBase< float > &other, size_t start, size_t span) const
void fill (const float &val)
void operator= (const VectorBase< float > &other)
float & operator[] (size_t index)
const float * begin () const
const float * end () const
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 ()
Protected Attributes inherited from VectorBase< float >
VectorDataType mData
 allocated data block.
float * mStart
 start of useful data
float * mEnd
 end of useful data + 1

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.

References Vector< float >::Vector().

Referenced by alias(), copyUnPunctured(), head(), head(), segment(), segment(), tail(), and tail().

◆ 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.

References Vector< float >::Vector().

◆ 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.

References Vector< float >::Vector().

Member Function Documentation

◆ alias()

SoftVector SoftVector::alias ( )
inline

◆ bit()

bool SoftVector::bit ( size_t index) const
inline

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

References VectorBase< float >::mEnd, and VectorBase< float >::mStart.

◆ 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.

References SoftVector().

◆ getEnergy()

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

◆ getSNR()

float SoftVector::getSNR ( ) const

◆ head() [1/2]

SoftVector SoftVector::head ( size_t span)
inline

References segment(), and SoftVector().

◆ head() [2/2]

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

References segment(), and SoftVector().

◆ 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

◆ settfb()

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

Set a soft bit

References VectorBase< float >::mEnd, and VectorBase< float >::mStart.

◆ sliced()

BitVector SoftVector::sliced ( ) const

Slice the whole signal into bits.

◆ softbit()

float SoftVector::softbit ( size_t index) const
inline

Return a soft bit.

References VectorBase< float >::mEnd, and VectorBase< float >::mStart.

◆ tail() [1/2]

SoftVector SoftVector::tail ( size_t start)
inline

◆ tail() [2/2]

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

◆ unknown()

void SoftVector::unknown ( )
inline

Fill with "unknown" values.

References VectorBase< float >::fill().


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