summaryrefslogtreecommitdiff
path: root/gr-trellis/src/lib
diff options
context:
space:
mode:
authorTom Rondeau <trondeau@vt.edu>2012-04-13 18:36:53 -0400
committerTom Rondeau <trondeau@vt.edu>2012-04-13 18:36:53 -0400
commitf919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch)
tree7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gr-trellis/src/lib
parent6a1e9783fec6ed827f49db27c171591d30f32933 (diff)
Removed whitespace and added dtools/bin/remove-whitespace as a tool to do this in the future.
The sed script was provided by Moritz Fischer.
Diffstat (limited to 'gr-trellis/src/lib')
-rw-r--r--gr-trellis/src/lib/calc_metric.cc14
-rw-r--r--gr-trellis/src/lib/calc_metric.h10
-rw-r--r--gr-trellis/src/lib/core_algorithms.cc72
-rw-r--r--gr-trellis/src/lib/core_algorithms.h12
-rw-r--r--gr-trellis/src/lib/fsm.cc38
-rw-r--r--gr-trellis/src/lib/fsm.h6
-rw-r--r--gr-trellis/src/lib/generate_all.py10
-rw-r--r--gr-trellis/src/lib/generate_trellis.py10
-rw-r--r--gr-trellis/src/lib/interleaver.cc16
-rw-r--r--gr-trellis/src/lib/interleaver.i76
-rw-r--r--gr-trellis/src/lib/quicksort_index.cc8
-rw-r--r--gr-trellis/src/lib/quicksort_index.h8
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.cc12
-rw-r--r--gr-trellis/src/lib/trellis_constellation_metrics_cf.h10
-rw-r--r--gr-trellis/src/lib/trellis_encoder_XX.cc.t12
-rw-r--r--gr-trellis/src/lib/trellis_encoder_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_metrics_X.cc.t10
-rw-r--r--gr-trellis/src/lib/trellis_metrics_X.h.t8
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t16
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_X.h.t12
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t20
-rw-r--r--gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t12
-rw-r--r--gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t14
-rw-r--r--gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_permutation.cc18
-rw-r--r--gr-trellis/src/lib/trellis_permutation.h10
-rw-r--r--gr-trellis/src/lib/trellis_permutation.i10
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t16
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_X.h.t12
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t20
-rw-r--r--gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t12
-rw-r--r--gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t14
-rw-r--r--gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_siso_combined_f.cc40
-rw-r--r--gr-trellis/src/lib/trellis_siso_combined_f.h10
-rw-r--r--gr-trellis/src/lib/trellis_siso_f.cc40
-rw-r--r--gr-trellis/src/lib/trellis_siso_f.h10
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_X.cc.t20
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_X.h.t10
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t24
-rw-r--r--gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t8
41 files changed, 355 insertions, 355 deletions
diff --git a/gr-trellis/src/lib/calc_metric.cc b/gr-trellis/src/lib/calc_metric.cc
index 0e8f9c2d5d..ce628209b4 100644
--- a/gr-trellis/src/lib/calc_metric.cc
+++ b/gr-trellis/src/lib/calc_metric.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -26,12 +26,12 @@
-template <class T>
+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:
@@ -178,7 +178,7 @@ void calc_metric(int O, int D, const std::vector<float> &TABLE, const float *in,
float s=in[m]-TABLE[o*D+m];
metric[o]+=s*s;
}
- }
+ }
break;
case TRELLIS_HARD_SYMBOL:
for(int o=0;o<O;o++) {
diff --git a/gr-trellis/src/lib/calc_metric.h b/gr-trellis/src/lib/calc_metric.h
index fd20f8d36f..7cad6160aa 100644
--- a/gr-trellis/src/lib/calc_metric.h
+++ b/gr-trellis/src/lib/calc_metric.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -28,7 +28,7 @@
#include <digital_metric_type.h>
-template <class T>
+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);
/*
diff --git a/gr-trellis/src/lib/core_algorithms.cc b/gr-trellis/src/lib/core_algorithms.cc
index 54193c818a..3ed912c08a 100644
--- a/gr-trellis/src/lib/core_algorithms.cc
+++ b/gr-trellis/src/lib/core_algorithms.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -42,8 +42,8 @@ float min_star(float a, float b)
-template <class T>
-void viterbi_algorithm(int I, int S, int O,
+template <class T>
+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,
@@ -51,7 +51,7 @@ void viterbi_algorithm(int I, int S, int O,
int K,
int S0,int SK,
const float *in, T *out)//,
- //std::vector<int> &trace)
+ //std::vector<int> &trace)
{
std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
@@ -84,7 +84,7 @@ void viterbi_algorithm(int I, int S, int O,
alpha[((alphai+1)%2)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
alphai=(alphai+1)%2;
}
@@ -190,7 +190,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
alpha[((alphai+1)%2)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
alphai=(alphai+1)%2;
}
@@ -211,7 +211,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
out[k]= (To) PI[st][i0];
st=PS[st][i0];
}
-
+
delete [] metric;
}
@@ -415,7 +415,7 @@ void viterbi_algorithm_combined<gr_complex,int>(int I, int S, int O,
//===============================================
-void siso_algorithm(int I, int S, int O,
+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,
@@ -427,7 +427,7 @@ void siso_algorithm(int I, int S, int O,
const float *priori, const float *prioro, float *post//,
//std::vector<float> &alpha,
//std::vector<float> &beta
- )
+ )
{
float norm,mm,minm;
std::vector<float> alpha(S*(K+1));
@@ -454,7 +454,7 @@ void siso_algorithm(int I, int S, int O,
alpha[(k+1)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode
}
@@ -468,7 +468,7 @@ void siso_algorithm(int I, int S, int O,
for(int k=K-1;k>=0;k--) { // backward recursion
norm=INF;
- for(int j=0;j<S;j++) {
+ for(int j=0;j<S;j++) {
minm=INF;
for(int i=0;i<I;i++) {
int i0 = j*I+i;
@@ -517,8 +517,8 @@ if (POSTI && POSTO)
for(int n=0;n<O;n++)
post[k*(I+O)+I+n]-=norm; // normalize metrics
}
-}
-else if(POSTI)
+}
+else if(POSTI)
{
for(int k=0;k<K;k++) { // input combining
norm=INF;
@@ -563,7 +563,7 @@ else
//===========================================================
template <class T>
-void siso_algorithm_combined(int I, int S, int O,
+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,
@@ -576,7 +576,7 @@ void siso_algorithm_combined(int I, int S, int O,
const std::vector<T> &TABLE,
trellis_metric_type_t TYPE,
const float *priori, const T *observations, float *post
-)
+)
{
float norm,mm,minm;
std::vector<float> alpha(S*(K+1));
@@ -605,7 +605,7 @@ void siso_algorithm_combined(int I, int S, int O,
alpha[(k+1)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode
}
@@ -619,7 +619,7 @@ void siso_algorithm_combined(int I, int S, int O,
for(int k=K-1;k>=0;k--) { // backward recursion
norm=INF;
- for(int j=0;j<S;j++) {
+ for(int j=0;j<S;j++) {
minm=INF;
for(int i=0;i<I;i++) {
int i0 = j*I+i;
@@ -668,8 +668,8 @@ void siso_algorithm_combined(int I, int S, int O,
for(int n=0;n<O;n++)
post[k*(I+O)+I+n]-=norm; // normalize metrics
}
- }
- else if(POSTI)
+ }
+ else if(POSTI)
{
for(int k=0;k<K;k++) { // input combining
norm=INF;
@@ -828,7 +828,7 @@ for(int rep=0;rep<iterations;rep++) {
//oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i];
//}
memcpy(&(oprioro[k*FSMi.I()]),&(iposti[ki*FSMi.I()]),FSMi.I()*sizeof(float));
- }
+ }
// run outer SISO
@@ -849,10 +849,10 @@ for(int rep=0;rep<iterations;rep++) {
//ipriori[ki*FSMi.I()+i]=oposto[k*FSMi.I()+i];
//}
memcpy(&(ipriori[ki*FSMi.I()]),&(oposto[k*FSMi.I()]),FSMi.I()*sizeof(float));
- }
+ }
}
else // produce posti but not posto
-
+
siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(),
FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(),
blocklength,
@@ -861,7 +861,7 @@ for(int rep=0;rep<iterations;rep++) {
p2mymin,
&(opriori[0]), &(oprioro[0]), &(oposti[0])
);
-
+
/*
viterbi_algorithm(FSMo.I(),FSMo.S(),FSMo.O(),
FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(),
@@ -1006,7 +1006,7 @@ void sccc_decoder(
//oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i];
//}
memcpy(&(oprioro[k*FSMi.I()]),&(iposti[ki*FSMi.I()]),FSMi.I()*sizeof(float));
- }
+ }
// run outer SISO
@@ -1027,10 +1027,10 @@ void sccc_decoder(
//ipriori[ki*FSMi.I()+i]=oposto[k*FSMi.I()+i];
//}
memcpy(&(ipriori[ki*FSMi.I()]),&(oposto[k*FSMi.I()]),FSMi.I()*sizeof(float));
- }
+ }
}
else {// produce posti but not posto
-
+
siso_algorithm(FSMo.I(),FSMo.S(),FSMo.O(),
FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(),
blocklength,
@@ -1039,7 +1039,7 @@ void sccc_decoder(
p2mymin,
&(opriori[0]), &(oprioro[0]), &(oposti[0])
);
-
+
/*
viterbi_algorithm(FSMo.I(),FSMo.S(),FSMo.O(),
FSMo.NS(), FSMo.OS(), FSMo.PS(), FSMo.PI(),
@@ -1120,7 +1120,7 @@ void pccc_decoder(
std::vector<float> priori2(blocklength*FSM2.I(),0.0);
std::vector<float> prioro2(blocklength*FSM2.O());
std::vector<float> posti2(blocklength*FSM2.I());
-
+
//generate prioro1,2 (metrics are not updated per iteration: this is not the best you can do...)
for (int k=0;k<blocklength;k++) {
//std::cout << k << std::endl;
@@ -1150,7 +1150,7 @@ void pccc_decoder(
p2mymin,
&(priori1[0]), &(prioro1[0]), &(posti1[0])
);
-
+
//for(int k=0;k<blocklength;k++){
//for(int i=0;i<FSM1.I();i++)
//std::cout << posti1[k*FSM1.I()+i] << ", ";
@@ -1164,7 +1164,7 @@ void pccc_decoder(
//oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i];
//}
memcpy(&(priori2[k*FSM2.I()]),&(posti1[ki*FSM1.I()]),FSM1.I()*sizeof(float));
- }
+ }
// run SISO 2
siso_algorithm(FSM2.I(),FSM2.S(),FSM2.O(),
@@ -1272,7 +1272,7 @@ void pccc_decoder_combined(
calc_metric(O, D, TABLE, &(observations[k*D]), &(cprioro[k*O]),METRIC_TYPE);
cprioro[k*O] *= scaling;
}
-
+
//generate prioro1,2 (metrics are not updated per iteration: this is not the best you can do...)
for (int k=0;k<blocklength;k++) {
//std::cout << k << std::endl;
@@ -1302,7 +1302,7 @@ void pccc_decoder_combined(
p2mymin,
&(priori1[0]), &(prioro1[0]), &(posti1[0])
);
-
+
//for(int k=0;k<blocklength;k++){
//for(int i=0;i<FSM1.I();i++)
//std::cout << posti1[k*FSM1.I()+i] << ", ";
@@ -1316,7 +1316,7 @@ void pccc_decoder_combined(
//oprioro[k*FSMi.I()+i]=iposti[ki*FSMi.I()+i];
//}
memcpy(&(priori2[k*FSM2.I()]),&(posti1[ki*FSM1.I()]),FSM1.I()*sizeof(float));
- }
+ }
// run SISO 2
siso_algorithm(FSM2.I(),FSM2.S(),FSM2.O(),
diff --git a/gr-trellis/src/lib/core_algorithms.h b/gr-trellis/src/lib/core_algorithms.h
index cab7086ba7..a8765225bf 100644
--- a/gr-trellis/src/lib/core_algorithms.h
+++ b/gr-trellis/src/lib/core_algorithms.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -34,7 +34,7 @@
float min(float a, float b);
float min_star(float a, float b);
-template <class T>
+template <class T>
void viterbi_algorithm(int I, int S, int O,
const std::vector<int> &NS,
const std::vector<int> &OS,
@@ -99,7 +99,7 @@ void sccc_decoder(
float (*p2mymin)(float,float),
const float *iprioro, T *data
);
-
+
template<class Ti, class To>
void sccc_decoder_combined(
diff --git a/gr-trellis/src/lib/fsm.cc b/gr-trellis/src/lib/fsm.cc
index 65c4b4b320..fb2b4d2c9f 100644
--- a/gr-trellis/src/lib/fsm.cc
+++ b/gr-trellis/src/lib/fsm.cc
@@ -64,7 +64,7 @@ fsm::fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int>
d_O=O;
d_NS=NS;
d_OS=OS;
-
+
generate_PS_PI();
generate_TM();
}
@@ -79,11 +79,11 @@ fsm::fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int>
//# output symbol matrix (S lines, each with I integers separated by spaces)
//# optional comments
//######################################################################
-fsm::fsm(const char *name)
+fsm::fsm(const char *name)
{
FILE *fsmfile;
- if((fsmfile=fopen(name,"r"))==NULL)
+ if((fsmfile=fopen(name,"r"))==NULL)
throw std::runtime_error ("fsm::fsm(const char *name): file open error\n");
//printf("file open error in fsm()\n");
@@ -91,7 +91,7 @@ fsm::fsm(const char *name)
if(ferror(fsmfile) != 0)
throw std::runtime_error ("fsm::fsm(const char *name): file read error\n");
}
-
+
d_NS.resize(d_I*d_S);
d_OS.resize(d_I*d_S);
@@ -113,7 +113,7 @@ fsm::fsm(const char *name)
}
fclose(fsmfile);
-
+
generate_PS_PI();
generate_TM();
}
@@ -141,7 +141,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G)
max_mem=mem;
}
}
-
+
//printf("max_mem_x\n");
//for(int j=0;j<max_mem_x.size();j++) printf("%d ",max_mem_x[j]); printf("\n");
@@ -155,7 +155,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G)
d_I=1<<k;
d_S=1<<sum_max_mem;
d_O=1<<n;
-
+
// binary representation of the G matrix
std::vector<std::vector<int> > Gb(k*n);
for(int j=0;j<k*n;j++) {
@@ -165,9 +165,9 @@ fsm::fsm(int k, int n, const std::vector<int> &G)
//for(int m=0;m<Gb[j].size();m++) printf("%d ",Gb[j][m]); printf("\n");
}
- // alphabet size of each shift register
+ // alphabet size of each shift register
std::vector<int> bases_x(k);
- for(int j=0;j<k ;j++)
+ for(int j=0;j<k ;j++)
bases_x[j] = 1 << max_mem_x[j];
//printf("bases_x\n");
//for(int j=0;j<max_mem_x.size();j++) printf("%d ",max_mem_x[j]); printf("\n");
@@ -229,7 +229,7 @@ fsm::fsm(int k, int n, const std::vector<int> &G)
//######################################################################
-//# Automatically generate an FSM specification describing the
+//# Automatically generate an FSM specification describing the
//# ISI for a channel
//# of length ch_length and a modulation of size mod_size
//######################################################################
@@ -243,13 +243,13 @@ fsm::fsm(int mod_size, int ch_length)
d_OS.resize(d_I*d_S);
for(int s=0;s<d_S;s++) {
- for(int i=0;i<d_I;i++) {
+ for(int i=0;i<d_I;i++) {
int t=i*d_S+s;
d_NS[s*d_I+i] = t/d_I;
d_OS[s*d_I+i] = t;
}
}
-
+
generate_PS_PI();
generate_TM();
}
@@ -258,8 +258,8 @@ fsm::fsm(int mod_size, int ch_length)
//######################################################################
-//# Automatically generate an FSM specification describing the
-//# the trellis for a CPM with h=K/P (relatively prime),
+//# Automatically generate an FSM specification describing the
+//# the trellis for a CPM with h=K/P (relatively prime),
//# alphabet size M, and frequency pulse duration L symbols
//#
//# This FSM is based on the paper by B. Rimoldi
@@ -303,7 +303,7 @@ fsm::fsm(int P, int M, int L)
//######################################################################
-//# Automatically generate an FSM specification describing the
+//# Automatically generate an FSM specification describing the
//# the joint trellis of fsm1 and fsm2
//######################################################################
fsm::fsm(const fsm &FSM1, const fsm &FSM2)
@@ -433,7 +433,7 @@ bool fsm::find_es(int es)
{
bool done = true;
for(int s=0;s<d_S;s++) {
- if(d_TMl[s*d_S+es] < d_S)
+ if(d_TMl[s*d_S+es] < d_S)
continue;
int minl=d_S;
int mini=-1;
@@ -477,7 +477,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages)
for( int stage_num = 0;stage_num < number_stages;stage_num ++){
// draw states
for ( int state_num = 0;state_num < d_S ; state_num ++ ) {
- trellis_fname << "<circle cx = \"" << stage_num * STAGE_STATE_OFFSETS + TRELLIS_X_OFFSET <<
+ trellis_fname << "<circle cx = \"" << stage_num * STAGE_STATE_OFFSETS + TRELLIS_X_OFFSET <<
"\" cy = \"" << state_num * STAGE_STATE_OFFSETS + TRELLIS_Y_OFFSET << "\" r = \"1\"/>" << std::endl;
//draw branches
if(stage_num != number_stages-1){
@@ -495,7 +495,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages)
// label the stages
trellis_fname << "<g font-size = \"4\" font= \"times\" fill = \"black\">" << std::endl;
for( int stage_num = 0;stage_num < number_stages ;stage_num ++){
- trellis_fname << "<text x = \"" << stage_num * STAGE_STATE_OFFSETS + STAGE_LABEL_X_OFFSET <<
+ trellis_fname << "<text x = \"" << stage_num * STAGE_STATE_OFFSETS + STAGE_LABEL_X_OFFSET <<
"\" y = \"" << STAGE_LABEL_Y_OFFSET << "\" >" << std::endl;
trellis_fname << stage_num << std::endl;
trellis_fname << "</text>" << std::endl;
@@ -505,7 +505,7 @@ void fsm::write_trellis_svg( std::string filename ,int number_stages)
// label the states
trellis_fname << "<g font-size = \"4\" font= \"times\" fill = \"black\">" << std::endl;
for( int state_num = 0;state_num < d_S ; state_num ++){
- trellis_fname << "<text y = \"" << state_num * STAGE_STATE_OFFSETS + STATE_LABEL_Y_OFFSET <<
+ trellis_fname << "<text y = \"" << state_num * STAGE_STATE_OFFSETS + STATE_LABEL_Y_OFFSET <<
"\" x = \"" << STATE_LABEL_X_OFFSET << "\" >" << std::endl;
trellis_fname << state_num << std::endl;
trellis_fname << "</text>" << std::endl;
diff --git a/gr-trellis/src/lib/fsm.h b/gr-trellis/src/lib/fsm.h
index 7dc7e0d9de..47e467898a 100644
--- a/gr-trellis/src/lib/fsm.h
+++ b/gr-trellis/src/lib/fsm.h
@@ -46,7 +46,7 @@ private:
// next_state = d_NS[current_state * d_I + input_symbol]
std::vector<int> d_NS;
// OS means Output Symbol.
- // output_symbol = d_OS[current_state * d_I + input_symbol]
+ // output_symbol = d_OS[current_state * d_I + input_symbol]
std::vector<int> d_OS;
// PS means Previous State.
std::vector< std::vector<int> > d_PS;
@@ -83,7 +83,7 @@ public:
* \param NS A mapping from (current state, input symbol) to next state.
* next_state = NS[current_state * I + input_symbol]
* \param OS A mapping from (current state, input symbol) to output symbol.
- * output_symbol = OS[current_state * I + input_symbol]
+ * output_symbol = OS[current_state * I + input_symbol]
*
*/
fsm(int I, int S, int O, const std::vector<int> &NS, const std::vector<int> &OS);
@@ -152,7 +152,7 @@ public:
* \param filename filename
* \param number_stages ????
*
- */
+ */
void write_trellis_svg(std::string filename ,int number_stages);
/*!
* \brief Write the FSMS to a file.
diff --git a/gr-trellis/src/lib/generate_all.py b/gr-trellis/src/lib/generate_all.py
index ee1966b890..78e36270cc 100644
--- a/gr-trellis/src/lib/generate_all.py
+++ b/gr-trellis/src/lib/generate_all.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2006,2007 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from build_utils import output_glue
diff --git a/gr-trellis/src/lib/generate_trellis.py b/gr-trellis/src/lib/generate_trellis.py
index 31bc44aac0..60a81f77a8 100644
--- a/gr-trellis/src/lib/generate_trellis.py
+++ b/gr-trellis/src/lib/generate_trellis.py
@@ -1,24 +1,24 @@
#!/usr/bin/env python
#
# Copyright 2006,2007 Free Software Foundation, Inc.
-#
+#
# This file is part of GNU Radio
-#
+#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later version.
-#
+#
# GNU Radio is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
-#
+#
# You should have received a copy of the GNU General Public License
# along with GNU Radio; see the file COPYING. If not, write to
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-#
+#
from build_utils import expand_template, copyright, open_and_log_name
from build_utils_codes import *
diff --git a/gr-trellis/src/lib/interleaver.cc b/gr-trellis/src/lib/interleaver.cc
index 131dcb07b8..740f33ab39 100644
--- a/gr-trellis/src/lib/interleaver.cc
+++ b/gr-trellis/src/lib/interleaver.cc
@@ -20,7 +20,7 @@
* Boston, MA 02110-1301, USA.
*/
-#include <cstdlib>
+#include <cstdlib>
#include <cstdio>
#include <iostream>
#include <string>
@@ -52,7 +52,7 @@ interleaver::interleaver(int K, const std::vector<int> &INTER)
d_K=K;
d_INTER=INTER;
d_DEINTER.resize(d_K);
-
+
// generate DEINTER table
for(int i=0;i<d_K;i++) {
d_DEINTER[d_INTER[i]]=i;
@@ -67,14 +67,14 @@ interleaver::interleaver(int K, const std::vector<int> &INTER)
//# list of space separated K integers from 0 to K-1 in appropriate order
//# optional comments
//######################################################################
-interleaver::interleaver(const char *name)
+interleaver::interleaver(const char *name)
{
FILE *interleaverfile;
- if((interleaverfile=fopen(name,"r"))==NULL)
+ if((interleaverfile=fopen(name,"r"))==NULL)
throw std::runtime_error ("file open error in interleaver()");
//printf("file open error in interleaver()\n");
-
+
if(fscanf(interleaverfile,"%d\n",&d_K) == EOF) {
if(ferror(interleaverfile) != 0)
throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n");
@@ -89,7 +89,7 @@ interleaver::interleaver(const char *name)
throw std::runtime_error ("interleaver::interleaver(const char *name): file read error\n");
}
}
-
+
// generate DEINTER table
for(int i=0;i<d_K;i++) {
d_DEINTER[d_INTER[i]]=i;
@@ -105,11 +105,11 @@ interleaver::interleaver(int K, int seed)
d_INTER.resize(d_K);
d_DEINTER.resize(d_K);
- if(seed>=0) srand((unsigned int)seed);
+ if(seed>=0) srand((unsigned int)seed);
std::vector<int> tmp(d_K);
for(int i=0;i<d_K;i++) {
d_INTER[i]=i;
- tmp[i] = rand();
+ tmp[i] = rand();
}
quicksort_index <int> (tmp,d_INTER,0,d_K-1);
diff --git a/gr-trellis/src/lib/interleaver.i b/gr-trellis/src/lib/interleaver.i
index 403c2d09e8..bb9078b1bd 100644
--- a/gr-trellis/src/lib/interleaver.i
+++ b/gr-trellis/src/lib/interleaver.i
@@ -1,38 +1,38 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2002 Free Software Foundation, Inc.
- *
- * This file is part of GNU Radio
- *
- * GNU Radio is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 3, or (at your option)
- * any later version.
- *
- * GNU Radio is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with GNU Radio; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-class interleaver {
-private:
- int d_K;
- std::vector<int> d_INTER;
- std::vector<int> d_DEINTER;
-public:
- interleaver();
- interleaver(const interleaver & INTERLEAVER);
- interleaver(int K, const std::vector<int> & INTER);
- interleaver(const char *name);
- interleaver(int K, int seed);
- int K () const { return d_K; }
- const std::vector<int> & INTER () const { return d_INTER; }
- const std::vector<int> & DEINTER () const { return d_DEINTER; }
- void write_interleaver_txt(std::string filename);
-};
+/* -*- c++ -*- */
+/*
+ * Copyright 2002 Free Software Foundation, Inc.
+ *
+ * This file is part of GNU Radio
+ *
+ * GNU Radio is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3, or (at your option)
+ * any later version.
+ *
+ * GNU Radio is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with GNU Radio; see the file COPYING. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street,
+ * Boston, MA 02110-1301, USA.
+ */
+
+class interleaver {
+private:
+ int d_K;
+ std::vector<int> d_INTER;
+ std::vector<int> d_DEINTER;
+public:
+ interleaver();
+ interleaver(const interleaver & INTERLEAVER);
+ interleaver(int K, const std::vector<int> & INTER);
+ interleaver(const char *name);
+ interleaver(int K, int seed);
+ int K () const { return d_K; }
+ const std::vector<int> & INTER () const { return d_INTER; }
+ const std::vector<int> & DEINTER () const { return d_DEINTER; }
+ void write_interleaver_txt(std::string filename);
+};
diff --git a/gr-trellis/src/lib/quicksort_index.cc b/gr-trellis/src/lib/quicksort_index.cc
index b75896a209..cf37e862e2 100644
--- a/gr-trellis/src/lib/quicksort_index.cc
+++ b/gr-trellis/src/lib/quicksort_index.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
diff --git a/gr-trellis/src/lib/quicksort_index.h b/gr-trellis/src/lib/quicksort_index.h
index da453972e4..9583955db9 100644
--- a/gr-trellis/src/lib/quicksort_index.h
+++ b/gr-trellis/src/lib/quicksort_index.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2007 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
index 91520e4ce4..6e6aa2dd03 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010,2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -81,8 +81,8 @@ for (unsigned int m=0;m<nstreams;m++) {
float *out = (float *) output_items[m];
for (unsigned int i = 0; i < noutput_items / d_O ; i++){
- d_constellation->calc_metric(&(in[i*d_D]), &(out[i*d_O]), d_TYPE);
- }
+ d_constellation->calc_metric(&(in[i*d_D]), &(out[i*d_O]), d_TYPE);
+ }
}
consume_each (d_D * noutput_items / d_O);
diff --git a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
index 1851bb89c1..2c2070522c 100644
--- a/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
+++ b/gr-trellis/src/lib/trellis_constellation_metrics_cf.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010,2011 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -48,7 +48,7 @@ class TRELLIS_API trellis_constellation_metrics_cf : public gr_block
gr_vector_void_star &output_items);
protected:
trellis_constellation_metrics_cf (digital_constellation_sptr constellation, trellis_metric_type_t TYPE);
-
+
private:
digital_constellation_sptr d_constellation;
trellis_metric_type_t d_TYPE;
diff --git a/gr-trellis/src/lib/trellis_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_encoder_XX.cc.t
index 698a0b307d..dca92b08f3 100644
--- a/gr-trellis/src/lib/trellis_encoder_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_encoder_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -30,7 +30,7 @@
#include <gr_io_signature.h>
#include <iostream>
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (const fsm &FSM, int ST)
{
return gnuradio::get_initial_sptr (new @NAME@ (FSM,ST));
@@ -47,7 +47,7 @@ trellis_make_@BASE_NAME@ (const fsm &FSM, int ST)
-int
+int
@NAME@::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
diff --git a/gr-trellis/src/lib/trellis_encoder_XX.h.t b/gr-trellis/src/lib/trellis_encoder_XX.h.t
index 4038caac9f..7c4250a929 100644
--- a/gr-trellis/src/lib/trellis_encoder_XX.h.t
+++ b/gr-trellis/src/lib/trellis_encoder_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -44,7 +44,7 @@ private:
friend TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (const fsm &FSM, int ST);
fsm d_FSM;
int d_ST;
- @NAME@ (const fsm &FSM, int ST);
+ @NAME@ (const fsm &FSM, int ST);
public:
fsm FSM () const { return d_FSM; }
diff --git a/gr-trellis/src/lib/trellis_metrics_X.cc.t b/gr-trellis/src/lib/trellis_metrics_X.cc.t
index cd66df6fb3..77eb8c81b5 100644
--- a/gr-trellis/src/lib/trellis_metrics_X.cc.t
+++ b/gr-trellis/src/lib/trellis_metrics_X.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -89,7 +89,7 @@ for (int m=0;m<nstreams;m++) {
for (int i = 0; i < noutput_items / d_O ; i++){
calc_metric(d_O, d_D, d_TABLE,&(in[i*d_D]),&(out[i*d_O]), d_TYPE);
- }
+ }
}
consume_each (d_D * noutput_items / d_O);
diff --git a/gr-trellis/src/lib/trellis_metrics_X.h.t b/gr-trellis/src/lib/trellis_metrics_X.h.t
index 809c27e650..ab406c51ea 100644
--- a/gr-trellis/src/lib/trellis_metrics_X.h.t
+++ b/gr-trellis/src/lib/trellis_metrics_X.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t
index 34dd2eb878..d79192491e 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_X.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -32,10 +32,10 @@
#include <iostream>
#include "core_algorithms.h"
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSM1, int ST10, int ST1K,
const fsm &FSM2, int ST20, int ST2K,
@@ -65,7 +65,7 @@ trellis_make_@BASE_NAME@ (
)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, 1, sizeof (float)),
- gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
d_FSM1 (FSM1), d_ST10 (ST10), d_ST1K (ST1K),
d_FSM2 (FSM2), d_ST20 (ST20), d_ST2K (ST2K),
d_INTERLEAVER (INTERLEAVER),
@@ -114,7 +114,7 @@ int
d_FSM1, d_ST10, d_ST1K,
d_FSM2, d_ST20, d_ST2K,
d_INTERLEAVER, d_blocklength, d_repetitions,
- p2min,
+ p2min,
&(in[n*d_blocklength*d_FSM1.O()*d_FSM2.O()]),&(out[n*d_blocklength])
);
}
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t
index a58a032645..e9bc946818 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_X.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -41,7 +41,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining
);
@@ -77,7 +77,7 @@ class TRELLIS_API @NAME@ : public gr_block
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE
+ trellis_siso_type_t SISO_TYPE
);
public:
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
index 48f68f1fef..03e21de1f5 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -32,10 +32,10 @@
#include <iostream>
#include "core_algorithms.h"
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSMo, int STo0, int SToK,
const fsm &FSMi, int STi0, int STiK,
@@ -76,7 +76,7 @@ trellis_make_@BASE_NAME@ (
)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
- gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK),
d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK),
d_INTERLEAVER (INTERLEAVER),
@@ -134,9 +134,9 @@ int
d_FSMo, d_STo0, d_SToK,
d_FSMi, d_STi0, d_STiK,
d_INTERLEAVER, d_blocklength, d_repetitions,
- p2min,
- d_D,d_TABLE,
- d_METRIC_TYPE,
+ p2min,
+ d_D,d_TABLE,
+ d_METRIC_TYPE,
d_scaling,
&(in[n*d_blocklength*d_D]),&(out[n*d_blocklength])
);
diff --git a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
index ce118a3b13..6e45ea10ac 100644
--- a/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_pccc_decoder_combined_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -42,7 +42,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<@I_TYPE@> &TABLE,
trellis_metric_type_t METRIC_TYPE,
@@ -90,7 +90,7 @@ class TRELLIS_API @NAME@ : public gr_block
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE,
+ trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
trellis_metric_type_t METRIC_TYPE,
diff --git a/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t
index 40dcd4105c..6cab858cd5 100644
--- a/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_pccc_encoder_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -30,7 +30,7 @@
#include <gr_io_signature.h>
#include <iostream>
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSM1, int ST1,
const fsm &FSM2, int ST2,
@@ -64,13 +64,13 @@ trellis_make_@BASE_NAME@ (
-int
+int
@NAME@::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
assert(noutput_items%d_blocklength ==0);
- for (int b = 0 ; b<noutput_items/d_blocklength; b++) {
+ for (int b = 0 ; b<noutput_items/d_blocklength; b++) {
const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]+b*d_blocklength;
@O_TYPE@ *out = (@O_TYPE@ *) output_items[0]+b*d_blocklength;
diff --git a/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t b/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t
index 2b6110e373..75a22b829c 100644
--- a/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t
+++ b/gr-trellis/src/lib/trellis_pccc_encoder_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -66,7 +66,7 @@ private:
const fsm &FSM2, int ST2,
const interleaver &INTERLEAVER,
int blocklength
- );
+ );
public:
fsm FSM1 () const { return d_FSM1; }
diff --git a/gr-trellis/src/lib/trellis_permutation.cc b/gr-trellis/src/lib/trellis_permutation.cc
index 416fc58ec1..57c6d26938 100644
--- a/gr-trellis/src/lib/trellis_permutation.cc
+++ b/gr-trellis/src/lib/trellis_permutation.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -29,7 +29,7 @@
#include <iostream>
#include <string.h>
-trellis_permutation_sptr
+trellis_permutation_sptr
trellis_make_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL)
{
return gnuradio::get_initial_sptr(new trellis_permutation (K,TABLE,SYMS_PER_BLOCK,BYTES_PER_SYMBOL));
@@ -50,7 +50,7 @@ trellis_permutation::trellis_permutation (int K, const std::vector<int> &TABLE,
-int
+int
trellis_permutation::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
@@ -67,13 +67,13 @@ trellis_permutation::work (int noutput_items,
for (int i = 0; i < noutput_items/d_SYMS_PER_BLOCK; i++){
// Index i refers to blocks.
// Begining of packet (in blocks)
- int i0 = d_K*(i/d_K);
+ int i0 = d_K*(i/d_K);
// position of block within packet (in blocks)
int j0 = i%d_K;
// new position of block within packet (in blocks)
int k0 = d_TABLE[j0];
- memcpy(&(out[i*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]),
- &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]),
+ memcpy(&(out[i*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]),
+ &(in[(i0+k0)*d_SYMS_PER_BLOCK*d_BYTES_PER_SYMBOL]),
d_BYTES_PER_SYMBOL*d_SYMS_PER_BLOCK);
}
// end per stream processing
diff --git a/gr-trellis/src/lib/trellis_permutation.h b/gr-trellis/src/lib/trellis_permutation.h
index 2786de29ac..cc40518c2c 100644
--- a/gr-trellis/src/lib/trellis_permutation.h
+++ b/gr-trellis/src/lib/trellis_permutation.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -45,7 +45,7 @@ private:
std::vector<int> d_TABLE;
int d_SYMS_PER_BLOCK;
size_t d_BYTES_PER_SYMBOL;
- trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES);
+ trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t NBYTES);
public:
int K () const { return d_K; }
diff --git a/gr-trellis/src/lib/trellis_permutation.i b/gr-trellis/src/lib/trellis_permutation.i
index 1433a65844..fdfaa44d33 100644
--- a/gr-trellis/src/lib/trellis_permutation.i
+++ b/gr-trellis/src/lib/trellis_permutation.i
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -31,7 +31,7 @@ private:
std::vector<int> d_TABLE;
int d_SYMS_PER_BLOCK;
size_t d_BYTES_PER_SYMBOL;
- trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL);
+ trellis_permutation (int K, const std::vector<int> &TABLE, int SYMS_PER_BLOCK, size_t BYTES_PER_SYMBOL);
public:
int K () const { return d_K; }
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t
index 4a0f471fa2..c9b78aa8f6 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_X.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -32,10 +32,10 @@
#include <iostream>
#include "core_algorithms.h"
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSMo, int STo0, int SToK,
const fsm &FSMi, int STi0, int STiK,
@@ -65,7 +65,7 @@ trellis_make_@BASE_NAME@ (
)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, 1, sizeof (float)),
- gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK),
d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK),
d_INTERLEAVER (INTERLEAVER),
@@ -114,7 +114,7 @@ int
d_FSMo, d_STo0, d_SToK,
d_FSMi, d_STi0, d_STiK,
d_INTERLEAVER, d_blocklength, d_repetitions,
- p2min,
+ p2min,
&(in[n*d_blocklength*d_FSMi.O()]),&(out[n*d_blocklength])
);
}
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t b/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t
index 9857c6a341..d6fb72f682 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_X.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -41,7 +41,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t SISO_TYPE // perform "min-sum" or "sum-product" combining
);
@@ -77,7 +77,7 @@ class TRELLIS_API @NAME@ : public gr_block
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE
+ trellis_siso_type_t SISO_TYPE
);
public:
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
index 2927e3fe3c..4508ca5cba 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -32,10 +32,10 @@
#include <iostream>
#include "core_algorithms.h"
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSMo, int STo0, int SToK,
const fsm &FSMi, int STi0, int STiK,
@@ -76,7 +76,7 @@ trellis_make_@BASE_NAME@ (
)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, 1, sizeof (@I_TYPE@)),
- gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, 1, sizeof (@O_TYPE@))),
d_FSMo (FSMo), d_STo0 (STo0), d_SToK (SToK),
d_FSMi (FSMi), d_STi0 (STi0), d_STiK (STiK),
d_INTERLEAVER (INTERLEAVER),
@@ -134,9 +134,9 @@ int
d_FSMo, d_STo0, d_SToK,
d_FSMi, d_STi0, d_STiK,
d_INTERLEAVER, d_blocklength, d_repetitions,
- p2min,
- d_D,d_TABLE,
- d_METRIC_TYPE,
+ p2min,
+ d_D,d_TABLE,
+ d_METRIC_TYPE,
d_scaling,
&(in[n*d_blocklength*d_D]),&(out[n*d_blocklength])
);
diff --git a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
index 5d2c2b85cb..3fdc53c624 100644
--- a/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_sccc_decoder_combined_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -42,7 +42,7 @@ TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<@I_TYPE@> &TABLE,
trellis_metric_type_t METRIC_TYPE,
@@ -90,7 +90,7 @@ class TRELLIS_API @NAME@ : public gr_block
const interleaver &INTERLEAVER,
int blocklength,
int repetitions,
- trellis_siso_type_t SISO_TYPE,
+ trellis_siso_type_t SISO_TYPE,
int D,
const std::vector<@I_TYPE@> &TABLE,
trellis_metric_type_t METRIC_TYPE,
diff --git a/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t b/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t
index b1a46ca606..8054909db8 100644
--- a/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_sccc_encoder_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -30,7 +30,7 @@
#include <gr_io_signature.h>
#include <iostream>
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSMo, int STo,
const fsm &FSMi, int STi,
@@ -64,13 +64,13 @@ trellis_make_@BASE_NAME@ (
-int
+int
@NAME@::work (int noutput_items,
gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items)
{
assert(noutput_items%d_blocklength ==0);
- for (int b = 0 ; b<noutput_items/d_blocklength; b++) {
+ for (int b = 0 ; b<noutput_items/d_blocklength; b++) {
const @I_TYPE@ *in = (const @I_TYPE@ *) input_items[0]+b*d_blocklength;
@O_TYPE@ *out = (@O_TYPE@ *) output_items[0]+b*d_blocklength;
diff --git a/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t b/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t
index 0e8ff45a43..b16d7ffca9 100644
--- a/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t
+++ b/gr-trellis/src/lib/trellis_sccc_encoder_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -66,7 +66,7 @@ private:
const fsm &FSMi, int STi,
const interleaver &INTERLEAVER,
int blocklength
- );
+ );
public:
fsm FSMo () const { return d_FSMo; }
diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.cc b/gr-trellis/src/lib/trellis_siso_combined_f.cc
index 2a4cfa1234..d27fe44257 100644
--- a/gr-trellis/src/lib/trellis_siso_combined_f.cc
+++ b/gr-trellis/src/lib/trellis_siso_combined_f.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -29,10 +29,10 @@
#include <stdexcept>
#include <assert.h>
#include <iostream>
-
+
static const float INF = 1.0e9;
-trellis_siso_combined_f_sptr
+trellis_siso_combined_f_sptr
trellis_make_siso_combined_f (
const fsm &FSM,
int K,
@@ -61,7 +61,7 @@ trellis_siso_combined_f::trellis_siso_combined_f (
trellis_metric_type_t TYPE)
: gr_block ("siso_combined_f",
gr_make_io_signature (1, -1, sizeof (float)),
- gr_make_io_signature (1, -1, sizeof (float))),
+ gr_make_io_signature (1, -1, sizeof (float))),
d_FSM (FSM),
d_K (K),
d_S0 (S0),
@@ -76,7 +76,7 @@ trellis_siso_combined_f::trellis_siso_combined_f (
//d_beta(FSM.S()*(K+1))
{
int multiple;
- if (d_POSTI && d_POSTO)
+ if (d_POSTI && d_POSTO)
multiple = d_FSM.I()+d_FSM.O();
else if(d_POSTI)
multiple = d_FSM.I();
@@ -88,14 +88,14 @@ trellis_siso_combined_f::trellis_siso_combined_f (
set_output_multiple (d_K*multiple);
//what is the meaning of relative rate for a block with 2 inputs?
//set_relative_rate ( multiple / ((double) d_FSM.I()) );
- // it turns out that the above gives problems in the scheduler, so
+ // it turns out that the above gives problems in the scheduler, so
// let's try (assumption O>I)
//set_relative_rate ( multiple / ((double) d_FSM.O()) );
// I am tempted to automate like this
if(d_FSM.I() <= d_D)
set_relative_rate ( multiple / ((double) d_D) );
else
- set_relative_rate ( multiple / ((double) d_FSM.I()) );
+ set_relative_rate ( multiple / ((double) d_FSM.I()) );
}
@@ -111,7 +111,7 @@ trellis_siso_combined_f::forecast (int noutput_items, gr_vector_int &ninput_item
multiple = d_FSM.O();
else
throw std::runtime_error ("Not both POSTI and POSTO can be false.");
- //printf("forecast: Multiple = %d\n",multiple);
+ //printf("forecast: Multiple = %d\n",multiple);
assert (noutput_items % (d_K*multiple) == 0);
int input_required1 = d_FSM.I() * (noutput_items/multiple) ;
int input_required2 = d_D * (noutput_items/multiple) ;
@@ -142,7 +142,7 @@ inline float min_star(float a, float b)
return (a <= b ? a : b)-log(1+exp(a <= b ? a-b : b-a));
}
-void siso_algorithm_combined(int I, int S, int O,
+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,
@@ -157,7 +157,7 @@ void siso_algorithm_combined(int I, int S, int O,
const float *priori, const float *observations, float *post//,
//std::vector<float> &alpha,
//std::vector<float> &beta
- )
+ )
{
float norm,mm,minm;
std::vector<float> alpha(S*(K+1));
@@ -186,7 +186,7 @@ void siso_algorithm_combined(int I, int S, int O,
alpha[(k+1)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode
}
@@ -200,7 +200,7 @@ void siso_algorithm_combined(int I, int S, int O,
for(int k=K-1;k>=0;k--) { // backward recursion
norm=INF;
- for(int j=0;j<S;j++) {
+ for(int j=0;j<S;j++) {
minm=INF;
for(int i=0;i<I;i++) {
int i0 = j*I+i;
@@ -249,8 +249,8 @@ void siso_algorithm_combined(int I, int S, int O,
for(int n=0;n<O;n++)
post[k*(I+O)+I+n]-=norm; // normalize metrics
}
- }
- else if(POSTI)
+ }
+ else if(POSTI)
{
for(int k=0;k<K;k++) { // input combining
norm=INF;
@@ -306,7 +306,7 @@ trellis_siso_combined_f::general_work (int noutput_items,
{
assert (input_items.size() == 2*output_items.size());
int nstreams = output_items.size();
- //printf("general_work:Streams: %d\n",nstreams);
+ //printf("general_work:Streams: %d\n",nstreams);
int multiple;
if (d_POSTI && d_POSTO)
multiple = d_FSM.I()+d_FSM.O();
@@ -319,11 +319,11 @@ trellis_siso_combined_f::general_work (int noutput_items,
assert (noutput_items % (d_K*multiple) == 0);
int nblocks = noutput_items / (d_K*multiple);
- //printf("general_work:Blocks: %d\n",nblocks);
+ //printf("general_work:Blocks: %d\n",nblocks);
//for(int i=0;i<ninput_items.size();i++)
//printf("general_work:Input items available: %d\n",ninput_items[i]);
- float (*p2min)(float, float) = NULL;
+ float (*p2min)(float, float) = NULL;
if(d_SISO_TYPE == TRELLIS_MIN_SUM)
p2min = &min;
else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
diff --git a/gr-trellis/src/lib/trellis_siso_combined_f.h b/gr-trellis/src/lib/trellis_siso_combined_f.h
index 2d043df626..4b28e8de4a 100644
--- a/gr-trellis/src/lib/trellis_siso_combined_f.h
+++ b/gr-trellis/src/lib/trellis_siso_combined_f.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -40,7 +40,7 @@ TRELLIS_API trellis_siso_combined_f_sptr trellis_make_siso_combined_f (
int SK, // final state (put -1 if not specified)
bool POSTI, // true if you want a-posteriori info about the input symbols to be mux-ed in the output
bool POSTO, // true if you want a-posteriori info about the output symbols to be mux-ed in the output
- trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t d_SISO_TYPE, // perform "min-sum" or "sum-product" combining
int D,
const std::vector<float> &TABLE,
trellis_metric_type_t TYPE
diff --git a/gr-trellis/src/lib/trellis_siso_f.cc b/gr-trellis/src/lib/trellis_siso_f.cc
index d478c13a38..ffebf1928a 100644
--- a/gr-trellis/src/lib/trellis_siso_f.cc
+++ b/gr-trellis/src/lib/trellis_siso_f.cc
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -29,10 +29,10 @@
#include <stdexcept>
#include <assert.h>
#include <iostream>
-
+
static const float INF = 1.0e9;
-trellis_siso_f_sptr
+trellis_siso_f_sptr
trellis_make_siso_f (
const fsm &FSM,
int K,
@@ -55,7 +55,7 @@ trellis_siso_f::trellis_siso_f (
trellis_siso_type_t SISO_TYPE)
: gr_block ("siso_f",
gr_make_io_signature (1, -1, sizeof (float)),
- gr_make_io_signature (1, -1, sizeof (float))),
+ gr_make_io_signature (1, -1, sizeof (float))),
d_FSM (FSM),
d_K (K),
d_S0 (S0),
@@ -67,7 +67,7 @@ trellis_siso_f::trellis_siso_f (
//d_beta(FSM.S()*(K+1))
{
int multiple;
- if (d_POSTI && d_POSTO)
+ if (d_POSTI && d_POSTO)
multiple = d_FSM.I()+d_FSM.O();
else if(d_POSTI)
multiple = d_FSM.I();
@@ -79,14 +79,14 @@ trellis_siso_f::trellis_siso_f (
set_output_multiple (d_K*multiple);
//what is the meaning of relative rate for a block with 2 inputs?
//set_relative_rate ( multiple / ((double) d_FSM.I()) );
- // it turns out that the above gives problems in the scheduler, so
+ // it turns out that the above gives problems in the scheduler, so
// let's try (assumption O>I)
//set_relative_rate ( multiple / ((double) d_FSM.O()) );
// I am tempted to automate like this
if(d_FSM.I() <= d_FSM.O())
set_relative_rate ( multiple / ((double) d_FSM.O()) );
else
- set_relative_rate ( multiple / ((double) d_FSM.I()) );
+ set_relative_rate ( multiple / ((double) d_FSM.I()) );
}
@@ -102,7 +102,7 @@ trellis_siso_f::forecast (int noutput_items, gr_vector_int &ninput_items_require
multiple = d_FSM.O();
else
throw std::runtime_error ("Not both POSTI and POSTO can be false.");
- //printf("forecast: Multiple = %d\n",multiple);
+ //printf("forecast: Multiple = %d\n",multiple);
assert (noutput_items % (d_K*multiple) == 0);
int input_required1 = d_FSM.I() * (noutput_items/multiple) ;
int input_required2 = d_FSM.O() * (noutput_items/multiple) ;
@@ -131,7 +131,7 @@ inline float min_star(float a, float b)
return (a <= b ? a : b)-log(1+exp(a <= b ? a-b : b-a));
}
-void siso_algorithm(int I, int S, int O,
+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,
@@ -143,7 +143,7 @@ void siso_algorithm(int I, int S, int O,
const float *priori, const float *prioro, float *post//,
//std::vector<float> &alpha,
//std::vector<float> &beta
- )
+ )
{
float norm,mm,minm;
std::vector<float> alpha(S*(K+1));
@@ -170,7 +170,7 @@ void siso_algorithm(int I, int S, int O,
alpha[(k+1)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[(k+1)*S+j]-=norm; // normalize total metrics so they do not explode
}
@@ -184,7 +184,7 @@ void siso_algorithm(int I, int S, int O,
for(int k=K-1;k>=0;k--) { // backward recursion
norm=INF;
- for(int j=0;j<S;j++) {
+ for(int j=0;j<S;j++) {
minm=INF;
for(int i=0;i<I;i++) {
int i0 = j*I+i;
@@ -233,8 +233,8 @@ if (POSTI && POSTO)
for(int n=0;n<O;n++)
post[k*(I+O)+I+n]-=norm; // normalize metrics
}
-}
-else if(POSTI)
+}
+else if(POSTI)
{
for(int k=0;k<K;k++) { // input combining
norm=INF;
@@ -288,7 +288,7 @@ trellis_siso_f::general_work (int noutput_items,
{
assert (input_items.size() == 2*output_items.size());
int nstreams = output_items.size();
- //printf("general_work:Streams: %d\n",nstreams);
+ //printf("general_work:Streams: %d\n",nstreams);
int multiple;
if (d_POSTI && d_POSTO)
multiple = d_FSM.I()+d_FSM.O();
@@ -301,11 +301,11 @@ trellis_siso_f::general_work (int noutput_items,
assert (noutput_items % (d_K*multiple) == 0);
int nblocks = noutput_items / (d_K*multiple);
- //printf("general_work:Blocks: %d\n",nblocks);
+ //printf("general_work:Blocks: %d\n",nblocks);
//for(int i=0;i<ninput_items.size();i++)
//printf("general_work:Input items available: %d\n",ninput_items[i]);
- float (*p2min)(float, float) = NULL;
+ float (*p2min)(float, float) = NULL;
if(d_SISO_TYPE == TRELLIS_MIN_SUM)
p2min = &min;
else if(d_SISO_TYPE == TRELLIS_SUM_PRODUCT)
diff --git a/gr-trellis/src/lib/trellis_siso_f.h b/gr-trellis/src/lib/trellis_siso_f.h
index b3d02ad050..9341f24683 100644
--- a/gr-trellis/src/lib/trellis_siso_f.h
+++ b/gr-trellis/src/lib/trellis_siso_f.h
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -39,7 +39,7 @@ TRELLIS_API trellis_siso_f_sptr trellis_make_siso_f (
int SK, // final state (put -1 if not specified)
bool POSTI, // true if you want a-posteriori info about the input symbols to be mux-ed in the output
bool POSTO, // true if you want a-posteriori info about the output symbols to be mux-ed in the output
- trellis_siso_type_t d_SISO_TYPE // perform "min-sum" or "sum-product" combining
+ trellis_siso_type_t d_SISO_TYPE // perform "min-sum" or "sum-product" combining
);
diff --git a/gr-trellis/src/lib/trellis_viterbi_X.cc.t b/gr-trellis/src/lib/trellis_viterbi_X.cc.t
index 2254f6450b..cadb89d574 100644
--- a/gr-trellis/src/lib/trellis_viterbi_X.cc.t
+++ b/gr-trellis/src/lib/trellis_viterbi_X.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -30,10 +30,10 @@
#include <gr_io_signature.h>
#include <assert.h>
#include <iostream>
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSM,
int K,
@@ -50,7 +50,7 @@ trellis_make_@BASE_NAME@ (
int SK)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, -1, sizeof (float)),
- gr_make_io_signature (1, -1, sizeof (@TYPE@))),
+ gr_make_io_signature (1, -1, sizeof (@TYPE@))),
d_FSM (FSM),
d_K (K),
d_S0 (S0),
@@ -89,7 +89,7 @@ void viterbi_algorithm<@O_TYPE@>(int I, int S, int O,
/* Moved it to "core_algorithms.cc" */
/*
-void viterbi_algorithm(int I, int S, int O,
+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,
@@ -97,7 +97,7 @@ void viterbi_algorithm(int I, int S, int O,
int K,
int S0,int SK,
const float *in, @TYPE@ *out)//,
- //std::vector<int> &trace)
+ //std::vector<int> &trace)
{
std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
@@ -130,7 +130,7 @@ void viterbi_algorithm(int I, int S, int O,
alpha[((alphai+1)%2)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
alphai=(alphai+1)%2;
}
diff --git a/gr-trellis/src/lib/trellis_viterbi_X.h.t b/gr-trellis/src/lib/trellis_viterbi_X.h.t
index c679649bb1..c0400d3410 100644
--- a/gr-trellis/src/lib/trellis_viterbi_X.h.t
+++ b/gr-trellis/src/lib/trellis_viterbi_X.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -34,7 +34,7 @@ class @NAME@;
typedef boost::shared_ptr<@NAME@> @SPTR_NAME@;
TRELLIS_API @SPTR_NAME@ trellis_make_@BASE_NAME@ (
- const fsm &FSM,
+ const fsm &FSM,
int K,
int S0,
int SK);
diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
index e883a0ba71..74611ab8fb 100644
--- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
+++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.cc.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004,2010 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,
@@ -30,10 +30,10 @@
#include <gr_io_signature.h>
#include <assert.h>
#include <iostream>
-
+
static const float INF = 1.0e9;
-@SPTR_NAME@
+@SPTR_NAME@
trellis_make_@BASE_NAME@ (
const fsm &FSM,
int K,
@@ -56,7 +56,7 @@ trellis_make_@BASE_NAME@ (
trellis_metric_type_t TYPE)
: gr_block ("@BASE_NAME@",
gr_make_io_signature (1, -1, sizeof (@I_TYPE@)),
- gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
+ gr_make_io_signature (1, -1, sizeof (@O_TYPE@))),
d_FSM (FSM),
d_K (K),
d_S0 (S0),
@@ -71,7 +71,7 @@ trellis_make_@BASE_NAME@ (
}
-void @NAME@::set_TABLE(const std::vector<@I_TYPE@> &table)
+void @NAME@::set_TABLE(const std::vector<@I_TYPE@> &table)
{
d_TABLE = table;
}
@@ -91,7 +91,7 @@ void
/*
-void viterbi_algorithm_combined(int I, int S, int O,
+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,
@@ -102,7 +102,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
const std::vector<@I_TYPE@> &TABLE,
trellis_metric_type_t TYPE,
const @I_TYPE@ *in, @O_TYPE@ *out)//,
- //std::vector<int> &trace)
+ //std::vector<int> &trace)
{
std::vector<int> trace(S*K);
std::vector<float> alpha(S*2);
@@ -136,7 +136,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
alpha[((alphai+1)%2)*S+j]=minm;
if(minm<norm) norm=minm;
}
- for(int j=0;j<S;j++)
+ for(int j=0;j<S;j++)
alpha[((alphai+1)%2)*S+j]-=norm; // normalize total metrics so they do not explode
alphai=(alphai+1)%2;
}
@@ -157,7 +157,7 @@ void viterbi_algorithm_combined(int I, int S, int O,
out[k]= (@O_TYPE@) PI[st][i0];
st=PS[st][i0];
}
-
+
delete [] metric;
}
diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
index 072f661581..c7e468e73b 100644
--- a/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
+++ b/gr-trellis/src/lib/trellis_viterbi_combined_XX.h.t
@@ -1,19 +1,19 @@
/* -*- c++ -*- */
/*
* Copyright 2004 Free Software Foundation, Inc.
- *
+ *
* This file is part of GNU Radio
- *
+ *
* GNU Radio is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3, or (at your option)
* any later version.
- *
+ *
* GNU Radio is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with GNU Radio; see the file COPYING. If not, write to
* the Free Software Foundation, Inc., 51 Franklin Street,