GNU Radio 3.7.1-34 C++ API
gr::digital::constellation_calcdist Class Reference

Calculate Euclidian distance for any constellationConstellation which calculates the distance to each point in the constellation for decision making. Inefficient for large constellations. More...

#include <constellation.h>

Inheritance diagram for gr::digital::constellation_calcdist:
gr::digital::constellation

List of all members.

Public Types

typedef boost::shared_ptr
< constellation_calcdist
sptr

Public Member Functions

unsigned int decision_maker (const gr_complex *sample)
 Returns the constellation point that matches best.
- Public Member Functions inherited from gr::digital::constellation
 constellation (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality)
 constellation ()
virtual ~constellation ()
void map_to_points (unsigned int value, gr_complex *points)
 Returns the constellation points for a symbol value.
std::vector< gr_complexmap_to_points_v (unsigned int value)
unsigned int decision_maker_v (std::vector< gr_complex > sample)
 Takes a vector rather than a pointer. Better for SWIG wrapping.
unsigned int decision_maker_pe (const gr_complex *sample, float *phase_error)
 Also calculates the phase error.
virtual void calc_metric (const gr_complex *sample, float *metric, gr::digital::trellis_metric_type_t type)
 Calculates distance.
virtual void calc_euclidean_metric (const gr_complex *sample, float *metric)
virtual void calc_hard_symbol_metric (const gr_complex *sample, float *metric)
std::vector< gr_complexpoints ()
 Returns the set of points in this constellation.
std::vector< gr_complexs_points ()
 Returns the vector of points in this constellation. Raise error if dimensionality is not one.
std::vector< std::vector
< gr_complex > > 
v_points ()
 Returns a vector of vectors of points.
bool apply_pre_diff_code ()
 Whether to apply an encoding before doing differential encoding. (e.g. gray coding)
void set_pre_diff_code (bool a)
 Whether to apply an encoding before doing differential encoding. (e.g. gray coding)
std::vector< int > pre_diff_code ()
 Returns the encoding to apply before differential encoding.
unsigned int rotational_symmetry ()
 Returns the order of rotational symmetry.
unsigned int dimensionality ()
 Returns the number of complex numbers in a single symbol.
unsigned int bits_per_symbol ()
unsigned int arity ()
constellation_sptr base ()

Static Public Member Functions

static sptr make (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality)

Protected Member Functions

 constellation_calcdist (std::vector< gr_complex > constell, std::vector< int > pre_diff_code, unsigned int rotational_symmetry, unsigned int dimensionality)
- Protected Member Functions inherited from gr::digital::constellation
float get_distance (unsigned int index, const gr_complex *sample)
unsigned int get_closest_point (const gr_complex *sample)
void calc_arity ()

Additional Inherited Members

- Protected Attributes inherited from gr::digital::constellation
std::vector< gr_complexd_constellation
std::vector< int > d_pre_diff_code
bool d_apply_pre_diff_code
unsigned int d_rotational_symmetry
unsigned int d_dimensionality
unsigned int d_arity
float d_scalefactor
 The factor by which the user given constellation points were scaled by to achieve an average amplitude of 1.

Detailed Description

Calculate Euclidian distance for any constellation

Constellation which calculates the distance to each point in the constellation for decision making. Inefficient for large constellations.


Member Typedef Documentation


Constructor & Destructor Documentation

gr::digital::constellation_calcdist::constellation_calcdist ( std::vector< gr_complex constell,
std::vector< int >  pre_diff_code,
unsigned int  rotational_symmetry,
unsigned int  dimensionality 
)
protected

Member Function Documentation

unsigned int gr::digital::constellation_calcdist::decision_maker ( const gr_complex sample)
virtual

Returns the constellation point that matches best.

Implements gr::digital::constellation.

static sptr gr::digital::constellation_calcdist::make ( std::vector< gr_complex constell,
std::vector< int >  pre_diff_code,
unsigned int  rotational_symmetry,
unsigned int  dimensionality 
)
static

Make a general constellation object that calculates the Euclidean distance for hard decisions.

Parameters:
constellList of constellation points (order of list matches pre_diff_code)
pre_diff_codeList of alphabet symbols (before applying any differential coding) (order of list matches constell)
rotational_symmetryNumber of rotations around unit circle that have the same representation.
dimensionalityNumber of dimensions to the constellation.

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