GNU Radio Manual and C++ API Reference  3.8.1.0
The Free & Open Software Radio Ecosystem
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 
27 #include <gnuradio/trellis/fsm.h>
29 #include <cmath>
30 #include <vector>
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,
40  int S,
41  int O,
42  const std::vector<int>& NS,
43  const std::vector<int>& OS,
44  const std::vector<std::vector<int>>& PS,
45  const std::vector<std::vector<int>>& PI,
46  int K,
47  int S0,
48  int SK,
49  const float* in,
50  T* out);
51 
52 template <class Ti, class To>
54  int S,
55  int O,
56  const std::vector<int>& NS,
57  const std::vector<int>& OS,
58  const std::vector<std::vector<int>>& PS,
59  const std::vector<std::vector<int>>& PI,
60  int K,
61  int S0,
62  int SK,
63  int D,
64  const std::vector<Ti>& TABLE,
66  const Ti* in,
67  To* out);
68 
69 void siso_algorithm(int I,
70  int S,
71  int O,
72  const std::vector<int>& NS,
73  const std::vector<int>& OS,
74  const std::vector<std::vector<int>>& PS,
75  const std::vector<std::vector<int>>& PI,
76  int K,
77  int S0,
78  int SK,
79  bool POSTI,
80  bool POSTO,
81  float (*p2mymin)(float, float),
82  const float* priori,
83  const float* prioro,
84  float* post);
85 
86 template <class T>
87 void siso_algorithm_combined(int I,
88  int S,
89  int O,
90  const std::vector<int>& NS,
91  const std::vector<int>& OS,
92  const std::vector<std::vector<int>>& PS,
93  const std::vector<std::vector<int>>& PI,
94  int K,
95  int S0,
96  int SK,
97  bool POSTI,
98  bool POSTO,
99  float (*p2mymin)(float, float),
100  int D,
101  const std::vector<T>& TABLE,
103  const float* priori,
104  const T* observations,
105  float* post);
106 
107 template <class T>
108 void sccc_decoder(const fsm& FSMo,
109  int STo0,
110  int SToK,
111  const fsm& FSMi,
112  int STi0,
113  int STiK,
114  const interleaver& INTERLEAVER,
115  int blocklength,
116  int iterations,
117  float (*p2mymin)(float, float),
118  const float* iprioro,
119  T* data);
120 
121 template <class Ti, class To>
122 void sccc_decoder_combined(const fsm& FSMo,
123  int STo0,
124  int SToK,
125  const fsm& FSMi,
126  int STi0,
127  int STiK,
128  const interleaver& INTERLEAVER,
129  int blocklength,
130  int iterations,
131  float (*p2mymin)(float, float),
132  int D,
133  const std::vector<Ti>& TABLE,
134  digital::trellis_metric_type_t METRIC_TYPE,
135  float scaling,
136  const Ti* observations,
137  To* data);
138 
139 template <class T>
140 void pccc_decoder(const fsm& FSM1,
141  int ST10,
142  int ST1K,
143  const fsm& FSM2,
144  int ST20,
145  int ST2K,
146  const interleaver& INTERLEAVER,
147  int blocklength,
148  int iterations,
149  float (*p2mymin)(float, float),
150  const float* cprioro,
151  T* data);
152 
153 template <class Ti, class To>
154 void pccc_decoder_combined(const fsm& FSM1,
155  int ST10,
156  int ST1K,
157  const fsm& FSM2,
158  int ST20,
159  int ST2K,
160  const interleaver& INTERLEAVER,
161  int blocklength,
162  int iterations,
163  float (*p2mymin)(float, float),
164  int D,
165  const std::vector<Ti>& TABLE,
166  digital::trellis_metric_type_t METRIC_TYPE,
167  float scaling,
168  const Ti* observations,
169  To* data);
170 
171 } /* namespace trellis */
172 } /* namespace gr */
173 
174 #endif /* INCLUDED_CORE_ALGORITHMS_H */
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)
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
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)
float min_star(float a, float b)
GNU Radio logging wrapper for log4cpp library (C++ port of log4j)
Definition: basic_block.h:43
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(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 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)
#define S(x)
Definition: rpcserver_thrift.h:37