From d5f0ec3d5bd5bf867ae5e387a6485a2d78138efb Mon Sep 17 00:00:00 2001 From: eb Date: Mon, 5 Feb 2007 22:13:22 +0000 Subject: [PATCH] removed generated files from svn git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@4387 221aa14e-8319-0410-a670-987f0aec2ac5 --- gr-trellis/src/lib/trellis_encoder_bb.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_bb.h | 59 ------ gr-trellis/src/lib/trellis_encoder_bb.i | 36 ---- gr-trellis/src/lib/trellis_encoder_bi.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_bi.h | 59 ------ gr-trellis/src/lib/trellis_encoder_bi.i | 36 ---- gr-trellis/src/lib/trellis_encoder_bs.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_bs.h | 59 ------ gr-trellis/src/lib/trellis_encoder_bs.i | 36 ---- gr-trellis/src/lib/trellis_encoder_ii.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_ii.h | 59 ------ gr-trellis/src/lib/trellis_encoder_ii.i | 36 ---- gr-trellis/src/lib/trellis_encoder_si.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_si.h | 59 ------ gr-trellis/src/lib/trellis_encoder_si.i | 36 ---- gr-trellis/src/lib/trellis_encoder_ss.cc | 76 ------- gr-trellis/src/lib/trellis_encoder_ss.h | 59 ------ gr-trellis/src/lib/trellis_encoder_ss.i | 36 ---- gr-trellis/src/lib/trellis_metrics_c.cc | 105 ---------- gr-trellis/src/lib/trellis_metrics_c.h | 65 ------ gr-trellis/src/lib/trellis_metrics_c.i | 39 ---- gr-trellis/src/lib/trellis_metrics_f.cc | 105 ---------- gr-trellis/src/lib/trellis_metrics_f.h | 65 ------ gr-trellis/src/lib/trellis_metrics_f.i | 39 ---- gr-trellis/src/lib/trellis_metrics_i.cc | 105 ---------- gr-trellis/src/lib/trellis_metrics_i.h | 65 ------ gr-trellis/src/lib/trellis_metrics_i.i | 39 ---- gr-trellis/src/lib/trellis_metrics_s.cc | 105 ---------- gr-trellis/src/lib/trellis_metrics_s.h | 65 ------ gr-trellis/src/lib/trellis_metrics_s.i | 39 ---- gr-trellis/src/lib/trellis_viterbi_b.cc | 170 ---------------- gr-trellis/src/lib/trellis_viterbi_b.h | 78 -------- gr-trellis/src/lib/trellis_viterbi_b.i | 49 ----- .../src/lib/trellis_viterbi_combined_b.cc | 185 ------------------ .../src/lib/trellis_viterbi_combined_b.h | 93 --------- .../src/lib/trellis_viterbi_combined_b.i | 58 ------ .../src/lib/trellis_viterbi_combined_i.cc | 185 ------------------ .../src/lib/trellis_viterbi_combined_i.h | 93 --------- .../src/lib/trellis_viterbi_combined_i.i | 58 ------ .../src/lib/trellis_viterbi_combined_s.cc | 185 ------------------ .../src/lib/trellis_viterbi_combined_s.h | 93 --------- .../src/lib/trellis_viterbi_combined_s.i | 58 ------ gr-trellis/src/lib/trellis_viterbi_i.cc | 170 ---------------- gr-trellis/src/lib/trellis_viterbi_i.h | 78 -------- gr-trellis/src/lib/trellis_viterbi_i.i | 49 ----- gr-trellis/src/lib/trellis_viterbi_s.cc | 170 ---------------- gr-trellis/src/lib/trellis_viterbi_s.h | 78 -------- gr-trellis/src/lib/trellis_viterbi_s.i | 49 ----- 48 files changed, 3761 deletions(-) delete mode 100644 gr-trellis/src/lib/trellis_encoder_bb.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_bb.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_bb.i delete mode 100644 gr-trellis/src/lib/trellis_encoder_bi.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_bi.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_bi.i delete mode 100644 gr-trellis/src/lib/trellis_encoder_bs.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_bs.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_bs.i delete mode 100644 gr-trellis/src/lib/trellis_encoder_ii.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_ii.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_ii.i delete mode 100644 gr-trellis/src/lib/trellis_encoder_si.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_si.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_si.i delete mode 100644 gr-trellis/src/lib/trellis_encoder_ss.cc delete mode 100644 gr-trellis/src/lib/trellis_encoder_ss.h delete mode 100644 gr-trellis/src/lib/trellis_encoder_ss.i delete mode 100644 gr-trellis/src/lib/trellis_metrics_c.cc delete mode 100644 gr-trellis/src/lib/trellis_metrics_c.h delete mode 100644 gr-trellis/src/lib/trellis_metrics_c.i delete mode 100644 gr-trellis/src/lib/trellis_metrics_f.cc delete mode 100644 gr-trellis/src/lib/trellis_metrics_f.h delete mode 100644 gr-trellis/src/lib/trellis_metrics_f.i delete mode 100644 gr-trellis/src/lib/trellis_metrics_i.cc delete mode 100644 gr-trellis/src/lib/trellis_metrics_i.h delete mode 100644 gr-trellis/src/lib/trellis_metrics_i.i delete mode 100644 gr-trellis/src/lib/trellis_metrics_s.cc delete mode 100644 gr-trellis/src/lib/trellis_metrics_s.h delete mode 100644 gr-trellis/src/lib/trellis_metrics_s.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_b.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_b.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_b.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_b.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_b.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_b.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_i.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_i.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_i.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_s.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_s.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_combined_s.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_i.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_i.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_i.i delete mode 100644 gr-trellis/src/lib/trellis_viterbi_s.cc delete mode 100644 gr-trellis/src/lib/trellis_viterbi_s.h delete mode 100644 gr-trellis/src/lib/trellis_viterbi_s.i diff --git a/gr-trellis/src/lib/trellis_encoder_bb.cc b/gr-trellis/src/lib/trellis_encoder_bb.cc deleted file mode 100644 index bbb3c905..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bb.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bb_sptr -trellis_make_encoder_bb (const fsm &FSM, int ST) -{ - return trellis_encoder_bb_sptr (new trellis_encoder_bb (FSM,ST)); -} - -trellis_encoder_bb::trellis_encoder_bb (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bb", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bb::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bb; -typedef boost::shared_ptr trellis_encoder_bb_sptr; - -trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_bb : public gr_sync_block -{ -private: - friend trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bb (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bb.i b/gr-trellis/src/lib/trellis_encoder_bb.i deleted file mode 100644 index e79c6d8f..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bb.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bb); - -trellis_encoder_bb_sptr trellis_make_encoder_bb (const fsm &FSM, int ST); - -class trellis_encoder_bb : public gr_sync_block -{ -private: - trellis_encoder_bb (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_bi.cc b/gr-trellis/src/lib/trellis_encoder_bi.cc deleted file mode 100644 index 5e3d1899..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bi.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bi_sptr -trellis_make_encoder_bi (const fsm &FSM, int ST) -{ - return trellis_encoder_bi_sptr (new trellis_encoder_bi (FSM,ST)); -} - -trellis_encoder_bi::trellis_encoder_bi (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bi", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bi::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bi; -typedef boost::shared_ptr trellis_encoder_bi_sptr; - -trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_bi : public gr_sync_block -{ -private: - friend trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bi (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bi.i b/gr-trellis/src/lib/trellis_encoder_bi.i deleted file mode 100644 index 9675b5f7..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bi.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bi); - -trellis_encoder_bi_sptr trellis_make_encoder_bi (const fsm &FSM, int ST); - -class trellis_encoder_bi : public gr_sync_block -{ -private: - trellis_encoder_bi (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_bs.cc b/gr-trellis/src/lib/trellis_encoder_bs.cc deleted file mode 100644 index 0d84ca90..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bs.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_bs_sptr -trellis_make_encoder_bs (const fsm &FSM, int ST) -{ - return trellis_encoder_bs_sptr (new trellis_encoder_bs (FSM,ST)); -} - -trellis_encoder_bs::trellis_encoder_bs (const fsm &FSM, int ST) - : gr_sync_block ("encoder_bs", - gr_make_io_signature (1, -1, sizeof (unsigned char)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_bs::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_bs; -typedef boost::shared_ptr trellis_encoder_bs_sptr; - -trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_bs : public gr_sync_block -{ -private: - friend trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_bs (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_bs.i b/gr-trellis/src/lib/trellis_encoder_bs.i deleted file mode 100644 index 95b5dfb9..00000000 --- a/gr-trellis/src/lib/trellis_encoder_bs.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_bs); - -trellis_encoder_bs_sptr trellis_make_encoder_bs (const fsm &FSM, int ST); - -class trellis_encoder_bs : public gr_sync_block -{ -private: - trellis_encoder_bs (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_ii.cc b/gr-trellis/src/lib/trellis_encoder_ii.cc deleted file mode 100644 index e281763a..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ii.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_ii_sptr -trellis_make_encoder_ii (const fsm &FSM, int ST) -{ - return trellis_encoder_ii_sptr (new trellis_encoder_ii (FSM,ST)); -} - -trellis_encoder_ii::trellis_encoder_ii (const fsm &FSM, int ST) - : gr_sync_block ("encoder_ii", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_ii::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_ii; -typedef boost::shared_ptr trellis_encoder_ii_sptr; - -trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_ii : public gr_sync_block -{ -private: - friend trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_ii (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_ii.i b/gr-trellis/src/lib/trellis_encoder_ii.i deleted file mode 100644 index 4d5615d8..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ii.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_ii); - -trellis_encoder_ii_sptr trellis_make_encoder_ii (const fsm &FSM, int ST); - -class trellis_encoder_ii : public gr_sync_block -{ -private: - trellis_encoder_ii (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_si.cc b/gr-trellis/src/lib/trellis_encoder_si.cc deleted file mode 100644 index 03da34fa..00000000 --- a/gr-trellis/src/lib/trellis_encoder_si.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_si_sptr -trellis_make_encoder_si (const fsm &FSM, int ST) -{ - return trellis_encoder_si_sptr (new trellis_encoder_si (FSM,ST)); -} - -trellis_encoder_si::trellis_encoder_si (const fsm &FSM, int ST) - : gr_sync_block ("encoder_si", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_si::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_si; -typedef boost::shared_ptr trellis_encoder_si_sptr; - -trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_si : public gr_sync_block -{ -private: - friend trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_si (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_si.i b/gr-trellis/src/lib/trellis_encoder_si.i deleted file mode 100644 index 439a2aa5..00000000 --- a/gr-trellis/src/lib/trellis_encoder_si.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_si); - -trellis_encoder_si_sptr trellis_make_encoder_si (const fsm &FSM, int ST); - -class trellis_encoder_si : public gr_sync_block -{ -private: - trellis_encoder_si (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_encoder_ss.cc b/gr-trellis/src/lib/trellis_encoder_ss.cc deleted file mode 100644 index e4196eb9..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ss.cc +++ /dev/null @@ -1,76 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include - -trellis_encoder_ss_sptr -trellis_make_encoder_ss (const fsm &FSM, int ST) -{ - return trellis_encoder_ss_sptr (new trellis_encoder_ss (FSM,ST)); -} - -trellis_encoder_ss::trellis_encoder_ss (const fsm &FSM, int ST) - : gr_sync_block ("encoder_ss", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_ST (ST) -{ -} - - - -int -trellis_encoder_ss::work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - int ST_tmp=0; - - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - - for (int m=0;m - -class trellis_encoder_ss; -typedef boost::shared_ptr trellis_encoder_ss_sptr; - -trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - -/*! - * \brief Convolutional encoder. - * \ingroup block - * - * - */ -class trellis_encoder_ss : public gr_sync_block -{ -private: - friend trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - fsm d_FSM; - int d_ST; - trellis_encoder_ss (const fsm &FSM, int ST); - -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } - - int work (int noutput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_encoder_ss.i b/gr-trellis/src/lib/trellis_encoder_ss.i deleted file mode 100644 index 567374d9..00000000 --- a/gr-trellis/src/lib/trellis_encoder_ss.i +++ /dev/null @@ -1,36 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,encoder_ss); - -trellis_encoder_ss_sptr trellis_make_encoder_ss (const fsm &FSM, int ST); - -class trellis_encoder_ss : public gr_sync_block -{ -private: - trellis_encoder_ss (const fsm &FSM, int ST); -public: - fsm FSM () const { return d_FSM; } - int ST () const { return d_ST; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_c.cc b/gr-trellis/src/lib/trellis_metrics_c.cc deleted file mode 100644 index 1dc3d137..00000000 --- a/gr-trellis/src/lib/trellis_metrics_c.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_c_sptr -trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_c_sptr (new trellis_metrics_c (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_c::trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_c", - gr_make_io_signature (1, -1, sizeof (gr_complex)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - - - - -void -trellis_metrics_c::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_c::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_c; -typedef boost::shared_ptr trellis_metrics_c_sptr; - -trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup block - * - */ -class trellis_metrics_c : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_c.i b/gr-trellis/src/lib/trellis_metrics_c.i deleted file mode 100644 index 8a4008a3..00000000 --- a/gr-trellis/src/lib/trellis_metrics_c.i +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_c); - -trellis_metrics_c_sptr trellis_make_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_c : public gr_block -{ -private: - trellis_metrics_c (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_f.cc b/gr-trellis/src/lib/trellis_metrics_f.cc deleted file mode 100644 index 6cfbe352..00000000 --- a/gr-trellis/src/lib/trellis_metrics_f.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_f_sptr -trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_f_sptr (new trellis_metrics_f (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_f::trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_f", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - - - - -void -trellis_metrics_f::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_f::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_f; -typedef boost::shared_ptr trellis_metrics_f_sptr; - -trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup block - * - */ -class trellis_metrics_f : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_f.i b/gr-trellis/src/lib/trellis_metrics_f.i deleted file mode 100644 index 631523a6..00000000 --- a/gr-trellis/src/lib/trellis_metrics_f.i +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_f); - -trellis_metrics_f_sptr trellis_make_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_f : public gr_block -{ -private: - trellis_metrics_f (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_i.cc b/gr-trellis/src/lib/trellis_metrics_i.cc deleted file mode 100644 index ab0938d2..00000000 --- a/gr-trellis/src/lib/trellis_metrics_i.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_i_sptr -trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_i_sptr (new trellis_metrics_i (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_i::trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_i", - gr_make_io_signature (1, -1, sizeof (int)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - - - - -void -trellis_metrics_i::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_i::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_i; -typedef boost::shared_ptr trellis_metrics_i_sptr; - -trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup block - * - */ -class trellis_metrics_i : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_i.i b/gr-trellis/src/lib/trellis_metrics_i.i deleted file mode 100644 index 42406d31..00000000 --- a/gr-trellis/src/lib/trellis_metrics_i.i +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_i); - -trellis_metrics_i_sptr trellis_make_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_i : public gr_block -{ -private: - trellis_metrics_i (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_metrics_s.cc b/gr-trellis/src/lib/trellis_metrics_s.cc deleted file mode 100644 index dd989b8e..00000000 --- a/gr-trellis/src/lib/trellis_metrics_s.cc +++ /dev/null @@ -1,105 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifndef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include -#include - - -trellis_metrics_s_sptr -trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) -{ - return trellis_metrics_s_sptr (new trellis_metrics_s (O,D,TABLE,TYPE)); -} - - - -trellis_metrics_s::trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE) - : gr_block ("metrics_s", - gr_make_io_signature (1, -1, sizeof (short)), - gr_make_io_signature (1, -1, sizeof (float))), - d_O (O), - d_D (D), - d_TYPE (TYPE), - d_TABLE (TABLE) -{ - set_relative_rate (1.0 * d_O / ((double) d_D)); - set_output_multiple ((int)d_O); -} - - - - -void -trellis_metrics_s::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_O == 0); - int input_required = d_D * noutput_items / d_O; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) - ninput_items_required[i] = input_required; -} - - - -int -trellis_metrics_s::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - - assert (noutput_items % d_O == 0); - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - -for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_metrics_s; -typedef boost::shared_ptr trellis_metrics_s_sptr; - -trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -/*! - * \brief Evaluate metrics for use by the Viterbi algorithm. - * \ingroup block - * - */ -class trellis_metrics_s : public gr_block -{ - int d_O; - int d_D; - trellis_metric_type_t d_TYPE; - std::vector d_TABLE; - - friend trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - - -#endif diff --git a/gr-trellis/src/lib/trellis_metrics_s.i b/gr-trellis/src/lib/trellis_metrics_s.i deleted file mode 100644 index 38c5ce5a..00000000 --- a/gr-trellis/src/lib/trellis_metrics_s.i +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,metrics_s); - -trellis_metrics_s_sptr trellis_make_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -class trellis_metrics_s : public gr_block -{ -private: - trellis_metrics_s (int O, int D, const std::vector &TABLE, trellis_metric_type_t TYPE); - -public: - int O () const { return d_O; } - int D () const { return d_D; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - std::vector TABLE () const { return d_TABLE; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_b.cc b/gr-trellis/src/lib/trellis_viterbi_b.cc deleted file mode 100644 index b4144434..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_b.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_b_sptr -trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_b_sptr (new trellis_viterbi_b (FSM,K,S0,SK)); -} - -trellis_viterbi_b::trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_b", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_b::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_b::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_b; -typedef boost::shared_ptr trellis_viterbi_b_sptr; - -trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -class trellis_viterbi_b : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_b.i b/gr-trellis/src/lib/trellis_viterbi_b.i deleted file mode 100644 index 52680c9d..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_b.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_b); - -trellis_viterbi_b_sptr trellis_make_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_b : public gr_block -{ -private: - trellis_viterbi_b ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_b.cc b/gr-trellis/src/lib/trellis_viterbi_combined_b.cc deleted file mode 100644 index 9860c7f8..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_b.cc +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_b_sptr -trellis_make_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_b_sptr (new trellis_viterbi_combined_b (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_b::trellis_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_b", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (unsigned char))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_combined_b::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, unsigned char *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (unsigned char) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_b::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_b; -typedef boost::shared_ptr trellis_viterbi_combined_b_sptr; - -trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_b : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_b.i b/gr-trellis/src/lib/trellis_viterbi_combined_b.i deleted file mode 100644 index 230024ff..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_b.i +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_b); - -trellis_viterbi_combined_b_sptr trellis_make_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_b : public gr_block -{ -private: - trellis_viterbi_combined_b ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_i.cc b/gr-trellis/src/lib/trellis_viterbi_combined_i.cc deleted file mode 100644 index 72b64e0d..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_i.cc +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_i_sptr -trellis_make_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_i_sptr (new trellis_viterbi_combined_i (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_i::trellis_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_i", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_combined_i::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_i::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_i; -typedef boost::shared_ptr trellis_viterbi_combined_i_sptr; - -trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_i : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_i.i b/gr-trellis/src/lib/trellis_viterbi_combined_i.i deleted file mode 100644 index f2377382..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_i.i +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_i); - -trellis_viterbi_combined_i_sptr trellis_make_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_i : public gr_block -{ -private: - trellis_viterbi_combined_i ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_s.cc b/gr-trellis/src/lib/trellis_viterbi_combined_s.cc deleted file mode 100644 index 9ee6bc42..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_s.cc +++ /dev/null @@ -1,185 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_combined_s_sptr -trellis_make_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) -{ - return trellis_viterbi_combined_s_sptr (new trellis_viterbi_combined_s (FSM,K,S0,SK,D,TABLE,TYPE)); -} - -trellis_viterbi_combined_s::trellis_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE) - : gr_block ("viterbi_combined_s", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK), - d_D (D), - d_TABLE (TABLE), - d_TYPE (TYPE)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_D)); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_combined_s::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_D * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm_combined(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE, - const float *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - float *metric = new float[O]; - int alphai; - float norm,mm,minm; - int minmi; - int st; - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - - delete [] metric; - -} - - - - - - -int -trellis_viterbi_combined_s::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m -#include "trellis_calc_metric.h" - -class trellis_viterbi_combined_s; -typedef boost::shared_ptr trellis_viterbi_combined_s_sptr; - -trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_s : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - int d_D; - std::vector d_TABLE; - trellis_metric_type_t d_TYPE; - //std::vector d_trace; - - friend trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - - trellis_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_combined_s.i b/gr-trellis/src/lib/trellis_viterbi_combined_s.i deleted file mode 100644 index 7f2a6a93..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_combined_s.i +++ /dev/null @@ -1,58 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_combined_s); - -trellis_viterbi_combined_s_sptr trellis_make_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - - -class trellis_viterbi_combined_s : public gr_block -{ -private: - trellis_viterbi_combined_s ( - const fsm &FSM, - int K, - int S0, - int SK, - int D, - const std::vector &TABLE, - trellis_metric_type_t TYPE); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - int D () const { return d_D; } - std::vector TABLE () const { return d_TABLE; } - trellis_metric_type_t TYPE () const { return d_TYPE; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_i.cc b/gr-trellis/src/lib/trellis_viterbi_i.cc deleted file mode 100644 index b39c6851..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_i.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_i_sptr -trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_i_sptr (new trellis_viterbi_i (FSM,K,S0,SK)); -} - -trellis_viterbi_i::trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_i", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (int))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_i::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, int *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (int) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_i::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_i; -typedef boost::shared_ptr trellis_viterbi_i_sptr; - -trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -class trellis_viterbi_i : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_i.i b/gr-trellis/src/lib/trellis_viterbi_i.i deleted file mode 100644 index dd0c3bcf..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_i.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_i); - -trellis_viterbi_i_sptr trellis_make_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_i : public gr_block -{ -private: - trellis_viterbi_i ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; diff --git a/gr-trellis/src/lib/trellis_viterbi_s.cc b/gr-trellis/src/lib/trellis_viterbi_s.cc deleted file mode 100644 index 9ccbab28..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_s.cc +++ /dev/null @@ -1,170 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -#ifdef HAVE_CONFIG_H -#include "config.h" -#endif - -#include -#include -#include -#include - -static const float INF = 1.0e9; - -trellis_viterbi_s_sptr -trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK) -{ - return trellis_viterbi_s_sptr (new trellis_viterbi_s (FSM,K,S0,SK)); -} - -trellis_viterbi_s::trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK) - : gr_block ("viterbi_s", - gr_make_io_signature (1, -1, sizeof (float)), - gr_make_io_signature (1, -1, sizeof (short))), - d_FSM (FSM), - d_K (K), - d_S0 (S0), - d_SK (SK)//, - //d_trace(FSM.S()*K) -{ - set_relative_rate (1.0 / ((double) d_FSM.O())); - set_output_multiple (d_K); -} - - -void -trellis_viterbi_s::forecast (int noutput_items, gr_vector_int &ninput_items_required) -{ - assert (noutput_items % d_K == 0); - int input_required = d_FSM.O() * noutput_items ; - unsigned ninputs = ninput_items_required.size(); - for (unsigned int i = 0; i < ninputs; i++) { - ninput_items_required[i] = input_required; - } -} - - - - -void viterbi_algorithm(int I, int S, int O, - const std::vector &NS, - const std::vector &OS, - const std::vector< std::vector > &PS, - const std::vector< std::vector > &PI, - int K, - int S0,int SK, - const float *in, short *out)//, - //std::vector &trace) -{ - std::vector trace(S*K); - std::vector alpha(S*2); - int alphai; - float norm,mm,minm; - int minmi; - int st; - - - if(S0<0) { // initial state not specified - for(int i=0;i=0;k--) { // traceback - int i0=trace[k*S+st]; - out[k]= (short) PI[st][i0]; - st=PS[st][i0]; - } - -} - - - - - - -int -trellis_viterbi_s::general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items) -{ - assert (input_items.size() == output_items.size()); - int nstreams = input_items.size(); - assert (noutput_items % d_K == 0); - int nblocks = noutput_items / d_K; - - for (int m=0;m - -class trellis_viterbi_s; -typedef boost::shared_ptr trellis_viterbi_s_sptr; - -trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - - -class trellis_viterbi_s : public gr_block -{ - fsm d_FSM; - int d_K; - int d_S0; - int d_SK; - //std::vector d_trace; - - friend trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - - trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } - void forecast (int noutput_items, - gr_vector_int &ninput_items_required); - int general_work (int noutput_items, - gr_vector_int &ninput_items, - gr_vector_const_void_star &input_items, - gr_vector_void_star &output_items); -}; - -#endif diff --git a/gr-trellis/src/lib/trellis_viterbi_s.i b/gr-trellis/src/lib/trellis_viterbi_s.i deleted file mode 100644 index e294eab1..00000000 --- a/gr-trellis/src/lib/trellis_viterbi_s.i +++ /dev/null @@ -1,49 +0,0 @@ -/* -*- 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 2, 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. - */ - -// WARNING: this file is machine generated. Edits will be over written - -GR_SWIG_BLOCK_MAGIC(trellis,viterbi_s); - -trellis_viterbi_s_sptr trellis_make_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - - -class trellis_viterbi_s : public gr_block -{ -private: - trellis_viterbi_s ( - const fsm &FSM, - int K, - int S0, - int SK); - -public: - fsm FSM () const { return d_FSM; } - int K () const { return d_K; } - int S0 () const { return d_S0; } - int SK () const { return d_SK; } - //std::vector trace () const { return d_trace; } -}; -- 2.30.2