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)
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)
| 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< T >
size_t | size () const
size_t | bytes () const
void | resize (size_t newElements)
void | clear ()
void | clone (const VectorBase< T > &other)
void | vConcat (const VectorBase< T > &other1, const VectorBase< T > &other2)
| ~VectorBase ()
bool | isOwner ()
std::string | inspect () const
void | copyToSegment (VectorBase< T > &other, size_t start, size_t span) const
void | copyToSegment (VectorBase< T > &other, size_t start=0) const
void | copyTo (VectorBase< T > &other) const
void | segmentCopyTo (VectorBase< T > &other, size_t start, size_t span) const
void | fill (const T &val)
void | fill (const T &val, unsigned start, unsigned length)
void | operator= (const VectorBase< T > &other)
T & | operator[] (size_t index)
const T & | operator[] (size_t index) const
const T * | begin () const
T * | begin ()
const T * | end () const
T * | end ()
const T * | getData () const

## Additional Inherited Members

Public Types inherited from Vector< float >
typedef float * | iterator
typedef const float * | const_iterator
Protected Types inherited from VectorBase< T >
typedef T * | VectorDataType
Protected Member Functions inherited from VectorBase< T >
void | vInit (size_t elements)
void | shiftMem (VectorBase< T > &other)
void | makeAlias (const VectorBase< T > &other)
| VectorBase ()
| VectorBase (VectorDataType wData, T *wStart, T *wEnd)
Protected Attributes inherited from VectorBase< T >
VectorDataType | mData
| allocated data block.
T * | mStart
| start of useful data
T * | 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.

## 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 segment(), and VectorBase< T >::size().

## bit()

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

inline

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

References VectorBase< T >::mEnd, and VectorBase< T >::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.

## 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().

## head() [2/2]

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

inline

References segment().

## segment() [1/2]

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

inline

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

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

## 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 VectorBase< T >::mEnd, and VectorBase< T >::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< T >::mEnd, and VectorBase< T >::mStart.

## tail() [1/2]

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

inline

References segment(), and VectorBase< T >::size().

## tail() [2/2]

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

inline

References segment(), and VectorBase< T >::size().

## unknown()

void SoftVector::unknown | ( |  | ) |

inline

Fill with "unknown" values.

References VectorBase< T >::fill().

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

- BitVector.h