GNU Radio Manual and C++ API Reference  3.7.4
The Free & Open Software Radio Ecosystem
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
core_algorithms.h
Go to the documentation of this file.
1 /* -*- c++ -*- */
2 /*
3  * Copyright 2004,2012 Free Software Foundation, Inc.
4  *
5  * This file is part of GNU Radio
6  *
7  * GNU Radio is free software; you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation; either version 3, or (at your option)
10  * any later version.
11  *
12  * GNU Radio is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with GNU Radio; see the file COPYING. If not, write to
19  * the Free Software Foundation, Inc., 51 Franklin Street,
20  * Boston, MA 02110-1301, USA.
21  */
22 
23 #ifndef INCLUDED_CORE_ALGORITHMS_H
24 #define INCLUDED_CORE_ALGORITHMS_H
25 
26 #include <cmath>
27 #include <vector>
29 #include <gnuradio/trellis/fsm.h>
31 
32 namespace gr {
33  namespace trellis {
34 
35  float min(float a, float b);
36  float min_star(float a, float b);
37 
38  template <class T>
39  void viterbi_algorithm(int I, int S, int O,
40  const std::vector<int> &NS,
41  const std::vector<int> &OS,
42  const std::vector< std::vector<int> > &PS,
43  const std::vector< std::vector<int> > &PI,
44  int K,
45  int S0,int SK,
46  const float *in, T *out);
47 
48  template <class Ti, class To>
49  void viterbi_algorithm_combined(int I, int S, int O,
50  const std::vector<int> &NS,
51  const std::vector<int> &OS,
52  const std::vector< std::vector<int> > &PS,
53  const std::vector< std::vector<int> > &PI,
54  int K,
55  int S0,int SK,
56  int D,
57  const std::vector<Ti> &TABLE,
59  const Ti *in, To *out);
60 
61  void siso_algorithm(int I, int S, int O,
62  const std::vector<int> &NS,
63  const std::vector<int> &OS,
64  const std::vector< std::vector<int> > &PS,
65  const std::vector< std::vector<int> > &PI,
66  int K,
67  int S0,int SK,
68  bool POSTI, bool POSTO,
69  float (*p2mymin)(float,float),
70  const float *priori, const float *prioro, float *post);
71 
72  template <class T>
73  void siso_algorithm_combined(int I, int S, int O,
74  const std::vector<int> &NS,
75  const std::vector<int> &OS,
76  const std::vector< std::vector<int> > &PS,
77  const std::vector< std::vector<int> > &PI,
78  int K,
79  int S0,int SK,
80  bool POSTI, bool POSTO,
81  float (*p2mymin)(float,float),
82  int D,
83  const std::vector<T> &TABLE,
85  const float *priori, const T *observations, float *post);
86 
87  template<class T>
88  void sccc_decoder(const fsm &FSMo, int STo0, int SToK,
89  const fsm &FSMi, int STi0, int STiK,
90  const interleaver &INTERLEAVER, int blocklength, int iterations,
91  float (*p2mymin)(float,float),
92  const float *iprioro, T *data);
93 
94  template<class Ti, class To>
95  void sccc_decoder_combined(const fsm &FSMo, int STo0, int SToK,
96  const fsm &FSMi, int STi0, int STiK,
97  const interleaver &INTERLEAVER, int blocklength, int iterations,
98  float (*p2mymin)(float,float),
99  int D, const std::vector<Ti> &TABLE,
100  digital::trellis_metric_type_t METRIC_TYPE,
101  float scaling,
102  const Ti *observations, To *data);
103 
104  template<class T>
105  void pccc_decoder(const fsm &FSM1, int ST10, int ST1K,
106  const fsm &FSM2, int ST20, int ST2K,
107  const interleaver &INTERLEAVER, int blocklength, int iterations,
108  float (*p2mymin)(float,float),
109  const float *cprioro, T *data);
110 
111  template<class Ti, class To>
112  void pccc_decoder_combined(const fsm &FSM1, int ST10, int ST1K,
113  const fsm &FSM2, int ST20, int ST2K,
114  const interleaver &INTERLEAVER, int blocklength, int iterations,
115  float (*p2mymin)(float,float),
116  int D, const std::vector<Ti> &TABLE,
117  digital::trellis_metric_type_t METRIC_TYPE,
118  float scaling,
119  const Ti *observations, To *data);
120 
121  } /* namespace trellis */
122 } /* namespace gr */
123 
124 #endif /* INCLUDED_CORE_ALGORITHMS_H */
void viterbi_algorithm(int I, int S, int O, const std::vector< int > &NS, const std::vector< int > &OS, const std::vector< std::vector< int > > &PS, const std::vector< std::vector< int > > &PI, int K, int S0, int SK, const float *in, T *out)
void pccc_decoder_combined(const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, const interleaver &INTERLEAVER, int blocklength, int iterations, float(*p2mymin)(float, float), int D, const std::vector< Ti > &TABLE, digital::trellis_metric_type_t METRIC_TYPE, float scaling, const Ti *observations, To *data)
void sccc_decoder(const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, const interleaver &INTERLEAVER, int blocklength, int iterations, float(*p2mymin)(float, float), const float *iprioro, T *data)
void siso_algorithm_combined(int I, int S, int O, const std::vector< int > &NS, const std::vector< int > &OS, const std::vector< std::vector< int > > &PS, const std::vector< std::vector< int > > &PI, int K, int S0, int SK, bool POSTI, bool POSTO, float(*p2mymin)(float, float), int D, const std::vector< T > &TABLE, digital::trellis_metric_type_t TYPE, const float *priori, const T *observations, float *post)
float min(float a, float b)
void sccc_decoder_combined(const fsm &FSMo, int STo0, int SToK, const fsm &FSMi, int STi0, int STiK, const interleaver &INTERLEAVER, int blocklength, int iterations, float(*p2mymin)(float, float), int D, const std::vector< Ti > &TABLE, digital::trellis_metric_type_t METRIC_TYPE, float scaling, const Ti *observations, To *data)
void pccc_decoder(const fsm &FSM1, int ST10, int ST1K, const fsm &FSM2, int ST20, int ST2K, const interleaver &INTERLEAVER, int blocklength, int iterations, float(*p2mymin)(float, float), const float *cprioro, T *data)
trellis_metric_type_t
Definition: metric_type.h:29
float min_star(float a, float b)
void siso_algorithm(int I, int S, int O, const std::vector< int > &NS, const std::vector< int > &OS, const std::vector< std::vector< int > > &PS, const std::vector< std::vector< int > > &PI, int K, int S0, int SK, bool POSTI, bool POSTO, float(*p2mymin)(float, float), const float *priori, const float *prioro, float *post)
void viterbi_algorithm_combined(int I, int S, int O, const std::vector< int > &NS, const std::vector< int > &OS, const std::vector< std::vector< int > > &PS, const std::vector< std::vector< int > > &PI, int K, int S0, int SK, int D, const std::vector< Ti > &TABLE, digital::trellis_metric_type_t TYPE, const Ti *in, To *out)