diff options
author | anastas | 2006-09-03 20:27:42 +0000 |
---|---|---|
committer | anastas | 2006-09-03 20:27:42 +0000 |
commit | d4697a07812be9e1f91a03b0a2dd61b1948f9925 (patch) | |
tree | 28a75b0693f92d044d8d33284da7e8cc0708fc62 /gr-trellis | |
parent | 21abdfb3f1ba6520a7911a0787adab664d9a790f (diff) | |
download | gnuradio-d4697a07812be9e1f91a03b0a2dd61b1948f9925.tar.gz gnuradio-d4697a07812be9e1f91a03b0a2dd61b1948f9925.tar.bz2 gnuradio-d4697a07812be9e1f91a03b0a2dd61b1948f9925.zip |
Refactored some common functions for metric calculations. Updated the documentation.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@3469 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gr-trellis')
-rw-r--r-- | gr-trellis/doc/gr-trellis.xml | 119 | ||||
-rw-r--r-- | gr-trellis/doc/test_tcm.py | 2 | ||||
-rw-r--r-- | gr-trellis/doc/test_tcm.py.xml | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/interleaver.cc | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_calc_metric.cc | 55 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_calc_metric.h | 12 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_metrics_X.cc.t | 3 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_metrics_c.cc | 3 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_metrics_f.cc | 3 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_metrics_i.cc | 3 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_metrics_s.cc | 3 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_siso_combined_f.cc | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_viterbi_combined_b.cc | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_viterbi_combined_i.cc | 2 | ||||
-rw-r--r-- | gr-trellis/src/lib/trellis_viterbi_combined_s.cc | 2 |
16 files changed, 184 insertions, 33 deletions
diff --git a/gr-trellis/doc/gr-trellis.xml b/gr-trellis/doc/gr-trellis.xml index f65b95356..e33a94a2d 100644 --- a/gr-trellis/doc/gr-trellis.xml +++ b/gr-trellis/doc/gr-trellis.xml @@ -341,26 +341,113 @@ In this section we give a brief description of the basic blocks implemented that <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <sect2 id="encoder"><title>Trellis Encoder</title> - <para> The trellis.encoder_XX(FSM, ST) block instantiates an FSM encoder corresponding to the fsm FSM and having initial state ST. The input and output is a sequence of bytes, shorts or integers. </para> - </sect2> <!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> <sect2 id="decoder"><title>Viterbi Decoder</title> +<para> +The trellis.viterbi_X(FSM, K, S0, SK) block instantiates a Viterbi decoder +for a sequence of K trellis steps generated by the given FSM and with initial and final states set to S0 and SK, respectively (S0 and/or SK are set to -1 +if the corresponding states are not fixed/known at the receiver side). +The output of this block is a sequence of K bytes, shorts or integers representing the estimated input (i.e., uncoded) sequence. +The input is a sequence of K x FSM.O( ) floats, where the k x K + i +float represents the cost associated with the k-th +step in the trellis and the i-th FSM output. +Observe that these inputs are generated externally and thus the Viterbi block is not informed of their meaning (they can be genarated as soft or hard inputs, etc); the only requirement is that they represent additive costs. +</para> +</sect2> + +<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> +<sect2 id="metrics"><title>Metrics Calculator</title> +<para> +The trellis.metrics_X(O,D,TABLE,TYPE) block is responsible for +transforming the channel output to the stream of metrics appropriate as +inputs to the Viterbi block described above. For each D input bytes/shorts/integers/floats/complexes it produces O output floats + +</para> <para> -The trellis.viterbi_X(FSM, K, S0, SK) block instantiates a Viterbi decoder -for an underlying ... + +The parameter TYPE dictates how these metrics are generated: + +<itemizedlist> +<listitem><para> +TRELLIS_EUCLIDEAN: for each D-dimensional vector +r<subscript>k</subscript>= +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +evaluates +</para> +<para> +||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = sum<subscript>j=1</subscript><superscript>D</superscript> |r<subscript>k,j</subscript>-c<subscript>i,j</subscript>|<superscript>2</superscript> </para> +<para> +for each of the O hypothesized ouput +symbols c<subscript>i</subscript> = (c<subscript>i,1</subscript>,c<subscript>i,2</subscript>,...,c<subscript>i,D</subscript>) defined in the vector TABLE, +where TABLE[i * D + j] = c<subscript>i,j</subscript>. +</para></listitem> + +<listitem><para> +TRELLIS_HARD_SYMBOL: for each D-dimensional vector +r<subscript>k</subscript>= +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +evaluates +</para> +<para> +i<subscript>0</subscript>= argmax<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = +argmax<subscript>i</subscript> sum<subscript>j=1</subscript><superscript>D</superscript> |r<subscript>k,j</subscript>-c<subscript>i,j</subscript>|<superscript>2</superscript> +</para> +<para> +and outputs a sequence of O floats of the form (0,...,0,1,0,...,0), where the +i<subscript>0</subscript> position is set to 1. This corresponds to generating hard inputs (based on the symbol-wise Hamming distance) to the Viterbi algorithm. +</para></listitem> + + +<listitem><para> +TRELLIS_HARD_BIT (not yet implemented): for each D-dimensional vector +r<subscript>k</subscript>= +(r<subscript>k,1</subscript>,r<subscript>k,2</subscript>,...,r<subscript>k,D</subscript>) +evaluates +</para> +<para> +i<subscript>0</subscript>= argmax<subscript>i</subscript> ||r<subscript>k</subscript>-c<subscript>i</subscript>||<superscript>2</superscript> = +argmax<subscript>i</subscript> sum<subscript>j=1</subscript><superscript>D</superscript> (r<subscript>k,j</subscript>-c<subscript>i,j</subscript>)<superscript>2</superscript> +</para> +<para> +and outputs a sequence of O floats of the form (d<subscript>1</subscript>,d<subscript>2</subscript>,...,d<subscript>O</subscript>), where the +d<subscript>i</subscript> is the bitwise Hamming distance between i and i<subscript>0</subscript>. This corresponds to generating hard inputs (based on the bit-wise Hamming distance) to the Viterbi algorithm. +</para></listitem> + + +</itemizedlist> + + +</para> </sect2> +<!-- %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% --> +<sect2 id="viterbi_combined"><title>Combined Metrics Calculator and Viterbi Decoder</title> +<para> +Although the separation of metric calculation and Viterbi algorithm blocks +is consistent with our goal of providing general blocks that can be easily +reused, this separation might result in large input/output buffer sizes +betwen blocks. Indeed for an FSM with a large output alphabet, the +output of the metric block/input of the Viterbi block is FSM.O( ) floats for +each trellis step. Sometimes this results in buffer overflow even for +moderate sequence lengths. +To overcome this problem we provide a block that incorporates the metric calculation and Viterbi algorithm into a single GNU Radio block, namely +trellis.viterbi_combined_X( FSM, K, S0, SK, D, TABLE, TYPE) where the arguments are exactly those used in the aforementioned two blocks. +</para> +</sect2> + + + </sect1> @@ -400,7 +487,7 @@ error rate. The FSM is first intantiated in "main" by </para> <programlisting> - 62 f=trellis.fsm(fname) # get the FSM specification from a file (will hopefully be automated in the future...) + 62 f=trellis.fsm(fname) # get the FSM specification from a file </programlisting> @@ -426,11 +513,11 @@ symbols that will drive the FSM encoder. <para> -The FSM will produce K output symbols (remeber the FSM produces always one output symbol for each input symbol). Each of these symbols needs to be modulated. Since we are simulating the communication system, we need not simulate the actual waveforms. An M-ary, N-dimensional -modulation is completely specified by a set of M, N-dimensional real vectors. In "fsm_utils.py" file we give a number of useful modulations with the following format: modulation = (N,constellation), where -constellation=[c11,c12,...,c1N,c21,c22,...,c2N,...,cM1,cM2,...cMN]. +The FSM will produce K output symbols (remeber the FSM produces always one output symbol for each input symbol). Each of these symbols needs to be modulated. Since we are simulating the communication system, we need not simulate the actual waveforms. An M-ary, D-dimensional +modulation is completely specified by a set of M, D-dimensional real vectors. In "fsm_utils.py" file we give a number of useful modulations with the following format: modulation = (D,constellation), where +constellation=[c11,c12,...,c1D,c21,c22,...,c2D,...,cM1,cM2,...cMD]. The meaning of the above is that every constellation point c_i -is an N-dimnsional vector c_i=(ci1,ci2,...,ciN) +is an D-dimnsional vector c_i=(ci1,ci2,...,ciD) For instance, 4-ary PAM is represented as (1,[-3, -1, 1, 3]), while QPSK is represented as (2,[1, 0, 0, 1, 0, -1, -1, 0]). In our example we choose QPSK modulation. @@ -487,7 +574,7 @@ and an initial state (which is set to 0 in this example). We now need to modulate the FSM output symbols. The "chunks_to_symbols_sf" is essentially a memoryless mapper which for each input symbol y_k -outputs a sequence of N numbers ci1,ci2,...,ciN representing the +outputs a sequence of D numbers ci1,ci2,...,ciD representing the coordianates of the constellation symbol c_i with i=y_k. </para> <programlisting> @@ -496,8 +583,8 @@ coordianates of the constellation symbol c_i with i=y_k. <para> The channel is AWGN with appropriate noise variance. -For each transmitted symbol c_k=(ck1,ck2,...,ckN) we receive a noisy version -r_k=(rk1,rk2,...,rkN). +For each transmitted symbol c_k=(ck1,ck2,...,ckD) we receive a noisy version +r_k=(rk1,rk2,...,rkD). </para> <programlisting> 22 # CHANNEL @@ -522,10 +609,10 @@ This means that for each time period we need to evaluate O such numbers (one for each possible output symbol y_k). This is done in "metrics_f". In particular, metrics_f is a memoryless device -taking N inputs at a time and producing O outputs. The N inputs are -rk1,rk2,...,rkN. +taking D inputs at a time and producing O outputs. The D inputs are +rk1,rk2,...,rkD. The O outputs -are the costs associated with observations rk1,rk2,...,rkN and +are the costs associated with observations rk1,rk2,...,rkD and hypothesized output symbols c_1,c_2,...,c_M. For instance, if we choose to perform soft-input VA, we need to evaluate the Euclidean distance between r_k and each of c_1,c_2,...,c_M, @@ -592,7 +679,7 @@ automate fsm generation from rational functions <listitem> <para> -Optimize the VA code. +Optimize the VA code if possible. </para> </listitem> diff --git a/gr-trellis/doc/test_tcm.py b/gr-trellis/doc/test_tcm.py index bf93a421f..e2429b80c 100644 --- a/gr-trellis/doc/test_tcm.py +++ b/gr-trellis/doc/test_tcm.py @@ -59,7 +59,7 @@ def main(args): sys.exit (1) # system parameters - f=trellis.fsm(fname) # get the FSM specification from a file (will hopefully be automated in the future...) + f=trellis.fsm(fname) # get the FSM specification from a file Kb=1024*16 # packet size in bits (make it multiple of 16 so it can be packed in a short) bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol K=Kb/bitspersymbol # packet size in trellis steps diff --git a/gr-trellis/doc/test_tcm.py.xml b/gr-trellis/doc/test_tcm.py.xml index ff15f4476..c8d11d303 100644 --- a/gr-trellis/doc/test_tcm.py.xml +++ b/gr-trellis/doc/test_tcm.py.xml @@ -61,7 +61,7 @@ 59 sys.exit (1) 60 61 # system parameters - 62 f=trellis.fsm(fname) # get the FSM specification from a file (will hopefully be automated in the future...) + 62 f=trellis.fsm(fname) # get the FSM specification from a file 63 Kb=1024*16 # packet size in bits (make it multiple of 16 so it can be packed in a short) 64 bitspersymbol = int(round(math.log(f.I())/math.log(2))) # bits per FSM input symbol 65 K=Kb/bitspersymbol # packet size in trellis steps diff --git a/gr-trellis/src/lib/interleaver.cc b/gr-trellis/src/lib/interleaver.cc index b17fae54c..5e8a912d9 100644 --- a/gr-trellis/src/lib/interleaver.cc +++ b/gr-trellis/src/lib/interleaver.cc @@ -97,7 +97,7 @@ interleaver::interleaver(int K, unsigned int seed) d_INTER[i]=i; tmp[i] = rand(); } - //quicksort_index <int> (tmp,d_INTER,0,d_K-1); got to resolve this... + //quicksort_index <int> (tmp,d_INTER,0,d_K-1); //got to resolve this... quicksort_index1 (tmp,d_INTER,0,d_K-1); // generate DEINTER table diff --git a/gr-trellis/src/lib/trellis_calc_metric.cc b/gr-trellis/src/lib/trellis_calc_metric.cc index 5faa4b7c7..4c502b81b 100644 --- a/gr-trellis/src/lib/trellis_calc_metric.cc +++ b/gr-trellis/src/lib/trellis_calc_metric.cc @@ -24,7 +24,9 @@ #include <stdexcept> #include "trellis_calc_metric.h" -void calc_metric_s(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type) + + +void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type) { float minm = FLT_MAX; int minmi = 0; @@ -64,8 +66,7 @@ void calc_metric_s(int O, int D, const std::vector<short> &TABLE, const short *i } - -void calc_metric_i(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type) +void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type) { float minm = FLT_MAX; int minmi = 0; @@ -106,7 +107,7 @@ void calc_metric_i(int O, int D, const std::vector<int> &TABLE, const int *in, f -void calc_metric_f(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type) +void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type) { float minm = FLT_MAX; int minmi = 0; @@ -146,7 +147,7 @@ void calc_metric_f(int O, int D, const std::vector<float> &TABLE, const float *i } -void calc_metric_c(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type) +void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type) { float minm = FLT_MAX; int minmi = 0; @@ -183,3 +184,47 @@ void calc_metric_c(int O, int D, const std::vector<gr_complex> &TABLE, const gr_ throw std::runtime_error ("Invalid metric type."); } } + + +/* +template <class T> void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type) +{ + float minm = FLT_MAX; + int minmi = 0; + + switch (type){ + case TRELLIS_EUCLIDEAN: + for(int o=0;o<O;o++) { + metric[o]=0.0; + for (int m=0;m<D;m++) { + T s=in[m]-TABLE[o*D+m]; + gr_complex sc(1.0*s,0); + metric[o]+=(s*conj(s)).real(); + } + } + break; + case TRELLIS_HARD_SYMBOL: + for(int o=0;o<O;o++) { + metric[o]=0.0; + for (int m=0;m<D;m++) { + T s=in[m]-TABLE[o*D+m]; + gr_complex sc(1.0*s,0); + metric[o]+=(s*conj(s)).real(); + } + if(metric[o]<minm) { + minm=metric[o]; + minmi=o; + } + } + for(int o=0;o<O;o++) { + metric[o] = (o==minmi?0.0:1.0); + } + break; + case TRELLIS_HARD_BIT: + throw std::runtime_error ("Invalid metric type (not yet implemented)."); + break; + default: + throw std::runtime_error ("Invalid metric type."); + } +} +*/ diff --git a/gr-trellis/src/lib/trellis_calc_metric.h b/gr-trellis/src/lib/trellis_calc_metric.h index 0f66d82d8..4c090584b 100644 --- a/gr-trellis/src/lib/trellis_calc_metric.h +++ b/gr-trellis/src/lib/trellis_calc_metric.h @@ -27,12 +27,16 @@ #include <gr_complex.h> #include <trellis_metric_type.h> -void calc_metric_s(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type); -void calc_metric_i(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type); +void calc_metric(int O, int D, const std::vector<short> &TABLE, const short *in, float *metric, trellis_metric_type_t type); -void calc_metric_f(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type); +void calc_metric(int O, int D, const std::vector<int> &TABLE, const int *in, float *metric, trellis_metric_type_t type); -void calc_metric_c(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type); +void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in, float *metric, trellis_metric_type_t type); + +void calc_metric(int O, int D, const std::vector<gr_complex> &TABLE, const gr_complex *in, float *metric, trellis_metric_type_t type); + + +//template <class T> void calc_metric(int O, int D, const std::vector<T> &TABLE, const T *in, float *metric, trellis_metric_type_t type); #endif diff --git a/gr-trellis/src/lib/trellis_metrics_X.cc.t b/gr-trellis/src/lib/trellis_metrics_X.cc.t index 7ace0298a..cd11dc9c7 100644 --- a/gr-trellis/src/lib/trellis_metrics_X.cc.t +++ b/gr-trellis/src/lib/trellis_metrics_X.cc.t @@ -83,6 +83,7 @@ for (int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (int i = 0; i < noutput_items / d_O ; i++){ +/* #if @IS_SHORT@ calc_metric_s(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #elif @IS_INT@ @@ -92,6 +93,8 @@ for (int m=0;m<nstreams;m++) { #elif @IS_COMPLEX@ calc_metric_c(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #endif +*/ + calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); } } diff --git a/gr-trellis/src/lib/trellis_metrics_c.cc b/gr-trellis/src/lib/trellis_metrics_c.cc index d80f2e7d7..59d35bd6d 100644 --- a/gr-trellis/src/lib/trellis_metrics_c.cc +++ b/gr-trellis/src/lib/trellis_metrics_c.cc @@ -83,6 +83,7 @@ for (int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (int i = 0; i < noutput_items / d_O ; i++){ +/* #if 0 calc_metric_s(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #elif 0 @@ -92,6 +93,8 @@ for (int m=0;m<nstreams;m++) { #elif 1 calc_metric_c(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #endif +*/ + calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); } } diff --git a/gr-trellis/src/lib/trellis_metrics_f.cc b/gr-trellis/src/lib/trellis_metrics_f.cc index 69e4a99df..58d4d41c2 100644 --- a/gr-trellis/src/lib/trellis_metrics_f.cc +++ b/gr-trellis/src/lib/trellis_metrics_f.cc @@ -83,6 +83,7 @@ for (int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (int i = 0; i < noutput_items / d_O ; i++){ +/* #if 0 calc_metric_s(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #elif 0 @@ -92,6 +93,8 @@ for (int m=0;m<nstreams;m++) { #elif 0 calc_metric_c(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #endif +*/ + calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); } } diff --git a/gr-trellis/src/lib/trellis_metrics_i.cc b/gr-trellis/src/lib/trellis_metrics_i.cc index b0fa85fa0..edd628c0f 100644 --- a/gr-trellis/src/lib/trellis_metrics_i.cc +++ b/gr-trellis/src/lib/trellis_metrics_i.cc @@ -83,6 +83,7 @@ for (int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (int i = 0; i < noutput_items / d_O ; i++){ +/* #if 0 calc_metric_s(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #elif 1 @@ -92,6 +93,8 @@ for (int m=0;m<nstreams;m++) { #elif 0 calc_metric_c(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #endif +*/ + calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); } } diff --git a/gr-trellis/src/lib/trellis_metrics_s.cc b/gr-trellis/src/lib/trellis_metrics_s.cc index 07b409726..4c04169a5 100644 --- a/gr-trellis/src/lib/trellis_metrics_s.cc +++ b/gr-trellis/src/lib/trellis_metrics_s.cc @@ -83,6 +83,7 @@ for (int m=0;m<nstreams;m++) { float *out = (float *) output_items[m]; for (int i = 0; i < noutput_items / d_O ; i++){ +/* #if 1 calc_metric_s(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #elif 0 @@ -92,6 +93,8 @@ for (int m=0;m<nstreams;m++) { #elif 0 calc_metric_c(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); #endif +*/ + calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE); } } diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.cc b/gr-trellis/src/lib/trellis_siso_combined_f.cc index 61cf6f8bf..6d9c013a8 100644 --- a/gr-trellis/src/lib/trellis_siso_combined_f.cc +++ b/gr-trellis/src/lib/trellis_siso_combined_f.cc @@ -167,7 +167,7 @@ void siso_algorithm_combined(int I, int S, int O, } for(int k=0;k<K;k++) { // forward recursion - calc_metric_f(O, D, TABLE, &(observations[k*D]), &(prioro[k*O]),TYPE); // calc metrics + calc_metric(O, D, TABLE, &(observations[k*D]), &(prioro[k*O]),TYPE); // calc metrics norm=INF; for(int j=0;j<S;j++) { minm=INF; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t b/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t index 76b7fb38a..14ea0d17c 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t +++ b/gr-trellis/src/lib/trellis_viterbi_combined_X.cc.t @@ -114,7 +114,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alphai=0; for(int k=0;k<K;k++) { - calc_metric_f(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics + calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics norm=INF; for(int j=0;j<S;j++) { // for each next state do ACS minm=INF; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_b.cc b/gr-trellis/src/lib/trellis_viterbi_combined_b.cc index 86501ac76..e91d48ff9 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_b.cc +++ b/gr-trellis/src/lib/trellis_viterbi_combined_b.cc @@ -114,7 +114,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alphai=0; for(int k=0;k<K;k++) { - calc_metric_f(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics + calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics norm=INF; for(int j=0;j<S;j++) { // for each next state do ACS minm=INF; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_i.cc b/gr-trellis/src/lib/trellis_viterbi_combined_i.cc index a92e7b35d..150f80a14 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_i.cc +++ b/gr-trellis/src/lib/trellis_viterbi_combined_i.cc @@ -114,7 +114,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alphai=0; for(int k=0;k<K;k++) { - calc_metric_f(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics + calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics norm=INF; for(int j=0;j<S;j++) { // for each next state do ACS minm=INF; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_s.cc b/gr-trellis/src/lib/trellis_viterbi_combined_s.cc index b664f6e95..320189296 100644 --- a/gr-trellis/src/lib/trellis_viterbi_combined_s.cc +++ b/gr-trellis/src/lib/trellis_viterbi_combined_s.cc @@ -114,7 +114,7 @@ void viterbi_algorithm_combined(int I, int S, int O, alphai=0; for(int k=0;k<K;k++) { - calc_metric_f(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics + calc_metric(O, D, TABLE, &(in[k*D]), metric,TYPE); // calc metrics norm=INF; for(int j=0;j<S;j++) { // for each next state do ACS minm=INF; |