summaryrefslogtreecommitdiff
path: root/gr-trellis/src/lib/calc_metric.cc
diff options
context:
space:
mode:
authorTom Rondeau2012-04-13 18:36:53 -0400
committerTom Rondeau2012-04-13 18:36:53 -0400
commitf919f9dcbb54a08e6e26d6c229ce92fb784fa1b2 (patch)
tree7e846386b9eb1676f9a93fc4a1e55916b9accc97 /gr-trellis/src/lib/calc_metric.cc
parent6a1e9783fec6ed827f49db27c171591d30f32933 (diff)
downloadgnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.gz
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.tar.bz2
gnuradio-f919f9dcbb54a08e6e26d6c229ce92fb784fa1b2.zip
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/calc_metric.cc')
-rw-r--r--gr-trellis/src/lib/calc_metric.cc14
1 files changed, 7 insertions, 7 deletions
diff --git a/gr-trellis/src/lib/calc_metric.cc b/gr-trellis/src/lib/calc_metric.cc
index 0e8f9c2d5..ce628209b 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++) {