Loading...
Searching...
No Matches
metrics.h
Go to the documentation of this file.
/* -*- c++ -*- */
/*
* Copyright 2004,2012,2018 Free Software Foundation, Inc.
*
* This file is part of GNU Radio
*
* SPDX-License-Identifier: GPL-3.0-or-later
*
*/
#ifndef METRICS_H
#define METRICS_H
#include <gnuradio/block.h>
#include <gnuradio/trellis/api.h>
#include <gnuradio/trellis/calc_metric.h>
#include <cstdint>
namespace gr {
namespace trellis {
/*!
* \brief Evaluate metrics for use by the Viterbi algorithm.
* \ingroup trellis_coding_blk
*/
template <class T>
class TRELLIS_API metrics : virtual public block
{
public:
// gr::trellis::metrics::sptr
typedef std::shared_ptr<metrics<T>> sptr;
static sptr
make(int O, int D, const std::vector<T>& TABLE, digital::trellis_metric_type_t TYPE);
virtual int O() const = 0;
virtual int D() const = 0;
virtual digital::trellis_metric_type_t TYPE() const = 0;
virtual std::vector<T> TABLE() const = 0;
virtual void set_O(int O) = 0;
virtual void set_D(int D) = 0;
virtual void set_TYPE(digital::trellis_metric_type_t type) = 0;
virtual void set_TABLE(const std::vector<T>& table) = 0;
};
typedef metrics<std::int16_t> metrics_s;
typedef metrics<std::int32_t> metrics_i;
typedef metrics<float> metrics_f;
typedef metrics<gr_complex> metrics_c;
} /* namespace trellis */
} /* namespace gr */
#endif /* METRICS_H */
calc_metric.h
gr::block::block
block(void)
Definition gnuradio-runtime/include/gnuradio/block.h:806
gr::trellis::metrics
Evaluate metrics for use by the Viterbi algorithm.
Definition metrics.h:29
gr::trellis::metrics::set_TYPE
virtual void set_TYPE(digital::trellis_metric_type_t type)=0
gr::trellis::metrics< std::int16_t >::TABLE
virtual std::vector< std::int16_t > TABLE() const=0
gr::trellis::metrics< std::int16_t >::D
virtual int D() const=0
gr::trellis::metrics< std::int16_t >::TYPE
virtual digital::trellis_metric_type_t TYPE() const=0
gr::trellis::metrics< std::int16_t >::O
virtual int O() const=0
gr::trellis::metrics::make
static sptr make(int O, int D, const std::vector< T > &TABLE, digital::trellis_metric_type_t TYPE)
gr::trellis::metrics::set_TABLE
virtual void set_TABLE(const std::vector< T > &table)=0
gr::trellis::metrics::sptr
std::shared_ptr< metrics< T > > sptr
Definition metrics.h:32
gr::trellis::metrics::set_D
virtual void set_D(int D)=0
gr::trellis::metrics::set_O
virtual void set_O(int O)=0
block.h
api.h
TRELLIS_API
#define TRELLIS_API
Definition gr-trellis/include/gnuradio/trellis/api.h:18
gr::digital::trellis_metric_type_t
trellis_metric_type_t
Definition metric_type.h:17
gr::trellis
Definition base.h:17
gr::trellis::metrics_c
metrics< gr_complex > metrics_c
Definition metrics.h:52
gr::trellis::metrics_s
metrics< std::int16_t > metrics_s
Definition metrics.h:49
gr::trellis::metrics_f
metrics< float > metrics_f
Definition metrics.h:51
gr::trellis::metrics_i
metrics< std::int32_t > metrics_i
Definition metrics.h:50
gr
GNU Radio logging wrapper.
Definition basic_block.h:29