[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 32/39: fec: LDPC: removing apps until we ca
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 32/39: fec: LDPC: removing apps until we can fix them up properly. |
Date: |
Thu, 15 Oct 2015 21:21:33 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch master
in repository gnuradio.
commit d0bb20fea01e5985c6ab09176b4e29f1bfe6948f
Author: Tom Rondeau <address@hidden>
Date: Mon Oct 12 11:05:39 2015 -0400
fec: LDPC: removing apps until we can fix them up properly.
---
gr-fec/apps/CMakeLists.txt | 59 ++++++---------
gr-fec/apps/ldpc_G_to_H.cc | 113 ----------------------------
gr-fec/apps/ldpc_H_to_G.cc | 104 -------------------------
gr-fec/apps/ldpc_H_to_upper_triangular_form | 70 -----------------
gr-fec/apps/ldpc_print_alist.cc | 95 -----------------------
5 files changed, 23 insertions(+), 418 deletions(-)
diff --git a/gr-fec/apps/CMakeLists.txt b/gr-fec/apps/CMakeLists.txt
index b187dc9..62fc6d2 100644
--- a/gr-fec/apps/CMakeLists.txt
+++ b/gr-fec/apps/CMakeLists.txt
@@ -17,39 +17,26 @@
# the Free Software Foundation, Inc., 51 Franklin Street,
# Boston, MA 02110-1301, USA.
-include_directories(
- ${GR_FEC_INCLUDE_DIRS}
- ${GNURADIO_RUNTIME_INCLUDE_DIRS}
- ${GSL_INCLUDE_DIRS}
- ${Boost_INCLUDE_DIRS}
-)
-
-list(APPEND libs
- ${GSL_LIBRARIES}
- ${Boost_LIBRARIES}
- gnuradio-fec gnuradio-runtime
-)
-
-add_executable(ldpc_H_to_G ldpc_H_to_G.cc)
-target_link_libraries(ldpc_H_to_G ${libs})
-
-add_executable(ldpc_G_to_H ldpc_G_to_H.cc)
-target_link_libraries(ldpc_G_to_H ${libs})
-
-add_executable(ldpc_print_alist ldpc_print_alist.cc)
-target_link_libraries(ldpc_print_alist ${libs})
-
-INSTALL(TARGETS
- ldpc_H_to_G
- ldpc_G_to_H
- ldpc_print_alist
- DESTINATION ${GR_RUNTIME_DIR}
- COMPONENT "fec_devel"
-)
-
-GR_PYTHON_INSTALL(
- PROGRAMS
- ldpc_H_to_upper_triangular_form
- DESTINATION ${GR_RUNTIME_DIR}
- COMPONENT "fec_devel"
-)
+#include_directories(
+# ${GR_FEC_INCLUDE_DIRS}
+# ${GNURADIO_RUNTIME_INCLUDE_DIRS}
+# ${GSL_INCLUDE_DIRS}
+# ${Boost_INCLUDE_DIRS}
+#)
+#
+#list(APPEND libs
+# ${GSL_LIBRARIES}
+# ${Boost_LIBRARIES}
+# gnuradio-fec gnuradio-runtime
+#)
+#
+#INSTALL(TARGETS
+# DESTINATION ${GR_RUNTIME_DIR}
+# COMPONENT "fec_devel"
+#)
+#
+#GR_PYTHON_INSTALL(
+# PROGRAMS
+# DESTINATION ${GR_RUNTIME_DIR}
+# COMPONENT "fec_devel"
+#)
diff --git a/gr-fec/apps/ldpc_G_to_H.cc b/gr-fec/apps/ldpc_G_to_H.cc
deleted file mode 100644
index 3c8981e..0000000
--- a/gr-fec/apps/ldpc_G_to_H.cc
+++ /dev/null
@@ -1,113 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Free Software Foundation, Inc.
- *
- * This 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.
- *
- * This software 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 this software; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <fstream>
-#include <sstream>
-#include <iostream>
-#include <stdexcept>
-#include <boost/exception/all.hpp>
-#include <boost/shared_ptr.hpp>
-#include <gnuradio/fec/fec_mtrx.h>
-#include <boost/program_options.hpp>
-
-using namespace gr::fec::code;
-namespace po = boost::program_options;
-
-int main(int argc, char **argv)
-{
- //setup the program options
- po::options_description desc("This program converts a G matrix from an alist
file "
- "into an H matrix alist file.\n\n"
- "ldpc_G_to_H [opts] inputfile outputfile\n\n"
- "Command line options");
- desc.add_options()
- ("help,h", "Produce the help message")
- ("verbose,v", "Turn on verbose mode")
- ;
-
- po::options_description hidden("Hidden options");
- hidden.add_options()
- ("files", po::value< std::vector<std::string> >(), "Files")
- ;
-
- po::positional_options_description p;
- p.add("files", -1);
-
- po::options_description allopts;
- allopts.add(desc).add(hidden);
-
- po::variables_map vm;
- try {
- po::store(po::command_line_parser(argc, argv).options(allopts).
- positional(p).run(), vm);
- po::notify(vm);
- }
- catch(boost::exception const& e) {
- std::cerr << "Bad arguments provided" << std::endl;
- std::cerr << std::endl << desc << std::endl;
- exit(0);
- }
-
- //print the help message
- if(vm.count("help")){
- std::cout << std::endl << desc << std::endl;
- exit(0);
- }
-
- std::string infilename, outfilename;
- if(vm.count("files")) {
- std::vector<std::string> filelist = vm["files"].as<
std::vector<std::string> >();
- if(filelist.size() >= 2) {
- infilename = filelist[0];
- outfilename = filelist[1];
- }
- else {
- std::cerr << "Please specify input and output files." << std::endl;
- std::cerr << std::endl << desc << std::endl;
- exit(1);
- }
- }
- else {
- std::cerr << "Please specify input and output files." << std::endl;
- std::cerr << std::endl << desc << std::endl;
- exit(1);
- }
-
-
- matrix_sptr G = read_matrix_from_file(infilename);
- matrix_sptr H = generate_H(G);
-
- write_matrix_to_file(outfilename, H);
-
- if(vm.count("verbose")) {
- std::cout << "G matrix: nrows: " << G->size1 << std::endl;
- std::cout << "G matrix: ncols: " << G->size2 << std::endl;
- print_matrix(G);
-
- std::cout << std::endl;
- std::cout << "H matrix: nrows: " << H->size1 << std::endl;
- std::cout << "H matrix: ncols: " << H->size2 << std::endl;
- print_matrix(H);
- }
-}
diff --git a/gr-fec/apps/ldpc_H_to_G.cc b/gr-fec/apps/ldpc_H_to_G.cc
deleted file mode 100644
index 7c10a27..0000000
--- a/gr-fec/apps/ldpc_H_to_G.cc
+++ /dev/null
@@ -1,104 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Free Software Foundation, Inc.
- *
- * This 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.
- *
- * This software 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 this software; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <fstream>
-#include <sstream>
-#include <iostream>
-#include <stdexcept>
-#include <boost/shared_ptr.hpp>
-#include <gnuradio/fec/fec_mtrx.h>
-#include <boost/program_options.hpp>
-
-using namespace gr::fec::code;
-namespace po = boost::program_options;
-
-int main(int argc, char **argv)
-{
- //setup the program options
- po::options_description desc("This program converts an H matrix from an
alist file "
- "into a G matrix alist file.\n\n"
- "ldpc_H_to_G [opts] inputfile outputfile\n\n"
- "Command line options");
- desc.add_options()
- ("help,h", "Produce the help message")
- ("verbose,v", "Turn on verbose mode")
- ;
-
- po::options_description hidden("Hidden options");
- hidden.add_options()
- ("files", po::value< std::vector<std::string> >(), "Files")
- ;
-
- po::positional_options_description p;
- p.add("files", -1);
-
- po::options_description allopts;
- allopts.add(desc).add(hidden);
-
- po::variables_map vm;
- po::store(po::command_line_parser(argc, argv).options(allopts).
- positional(p).run(), vm);
- po::notify(vm);
-
- //print the help message
- if(vm.count("help")){
- std::cout << std::endl << desc << std::endl;
- exit(0);
- }
-
- std::string infilename, outfilename;
- if(vm.count("files")) {
- std::vector<std::string> filelist = vm["files"].as<
std::vector<std::string> >();
- if(filelist.size() >= 2) {
- infilename = filelist[0];
- outfilename = filelist[1];
- }
- else {
- std::cerr << "Please specify input and output files." << std::endl;
- std::cerr << std::endl << desc << std::endl;
- exit(1);
- }
- }
- else {
- std::cerr << "Please specify input and output files." << std::endl;
- std::cout << std::endl << desc << std::endl;
- exit(1);
- }
-
- matrix_sptr H = read_matrix_from_file(infilename);
- matrix_sptr G = generate_G(H);
-
- write_matrix_to_file(outfilename, G);
-
- if(vm.count("verbose")) {
- std::cout << "H matrix: nrows: " << H->size1 << std::endl;
- std::cout << "H matrix: ncols: " << H->size2 << std::endl;
- print_matrix(H);
-
- std::cout << std::endl;
- std::cout << "G matrix: nrows: " << G->size1 << std::endl;
- std::cout << "G matrix: ncols: " << G->size2 << std::endl;
- print_matrix(G);
- }
-}
diff --git a/gr-fec/apps/ldpc_H_to_upper_triangular_form
b/gr-fec/apps/ldpc_H_to_upper_triangular_form
deleted file mode 100644
index a02ed49..0000000
--- a/gr-fec/apps/ldpc_H_to_upper_triangular_form
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/usr/bin/env python
-#
-# Copyright 2015 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.
-#
-
-import numpy, sys
-from gnuradio import fec
-from gnuradio.fec import LDPC
-from optparse import OptionParser
-
-def main():
- parser = OptionParser(usage="%prog: [options] alist_in alist_out")
- parser.add_option("-n", "--iterations", dest="niters", type="int",
- default=100, help="Set number of iterations in greedy
algorithm [default=%default]")
- parser.add_option("-v", "--verbose", dest="verbose", action="count",
- help="Turn on verbose mode")
-
- (options, args) = parser.parse_args()
- print options
-
- if(len(args) < 2):
- sys.stderr.write("Please provide an input and output file.")
- sys.exit(1)
-
- try:
- file_in = open(args[0], 'r')
- except:
- sys.stderr.write("Could not open input file '{0}'".format(file_in))
- sys.exit(1)
-
- file_in.close()
-
- H = LDPC.read_alist_file(args[0])
- H_fr = LDPC.get_full_rank_H_matrix(H, verbose=options.verbose)
- ret = LDPC.get_best_matrix(H_fr, numIterations=options.niters,
- verbose=options.verbose)
- if ret:
- H_utf = ret[0]
- g = ret[1]
- print H_utf
- print g
- #write_alist_file(args[1], H_utf)
- else:
- sys.stderr.write("Could not find an appropriate upper " \
- "triangular form for H.\n")
- sys.exit(1)
-
-
-if __name__ == "__main__":
- try:
- main()
- except KeyboardInterrupt:
- pass
diff --git a/gr-fec/apps/ldpc_print_alist.cc b/gr-fec/apps/ldpc_print_alist.cc
deleted file mode 100644
index 94da1bd..0000000
--- a/gr-fec/apps/ldpc_print_alist.cc
+++ /dev/null
@@ -1,95 +0,0 @@
-/* -*- c++ -*- */
-/*
- * Copyright 2015 Free Software Foundation, Inc.
- *
- * This 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.
- *
- * This software 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 this software; see the file COPYING. If not, write to
- * the Free Software Foundation, Inc., 51 Franklin Street,
- * Boston, MA 02110-1301, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <fstream>
-#include <sstream>
-#include <iostream>
-#include <stdexcept>
-#include <boost/shared_ptr.hpp>
-#include <gnuradio/fec/fec_mtrx.h>
-#include <boost/program_options.hpp>
-#include <gsl/gsl_matrix.h>
-
-using namespace gr::fec::code;
-namespace po = boost::program_options;
-
-int main(int argc, char **argv)
-{
- //setup the program options
- po::options_description desc("This program takes an alist file and prints "
- "the matrix it represents.\n\n"
- "ldpc_print_alist [opts] inputfile\n\n"
- "Command line options");
- desc.add_options()
- ("help,h", "Produce the help message")
- ("numpy,n", "Print in numpy.matrix format")
- ;
-
- po::options_description hidden("Hidden options");
- hidden.add_options()
- ("files", po::value< std::vector<std::string> >(), "Files")
- ;
-
- po::positional_options_description p;
- p.add("files", -1);
-
- po::options_description allopts;
- allopts.add(desc).add(hidden);
-
- po::variables_map vm;
- po::store(po::command_line_parser(argc, argv).options(allopts).
- positional(p).run(), vm);
- po::notify(vm);
-
- //print the help message
- if(vm.count("help")){
- std::cout << "LDPC: Convert H to G" << std::endl << desc << std::endl;
- exit(0);
- }
-
- std::string infilename, outfilename;
- if(vm.count("files")) {
- std::vector<std::string> filelist = vm["files"].as<
std::vector<std::string> >();
- if(filelist.size() >= 1) {
- infilename = filelist[0];
- }
- else {
- std::cerr << "Please specify an input file." << std::endl;
- std::cerr << std::endl << desc << std::endl;
- exit(1);
- }
- }
- else {
- std::cerr << "Please specify an input file." << std::endl;
- std::cout << std::endl << desc << std::endl;
- exit(1);
- }
-
- matrix_sptr M = read_matrix_from_file(infilename);
- std::cout << "nrows: " << M->size1 << std::endl;
- std::cout << "ncols: " << M->size2 << std::endl;
-
- bool numpy = vm.count("numpy");
- print_matrix(M, numpy);
-}
- [Commit-gnuradio] [gnuradio] 19/39: fec: LDPC: renaming some of the LDPC classes for clarity/consistency., (continued)
- [Commit-gnuradio] [gnuradio] 19/39: fec: LDPC: renaming some of the LDPC classes for clarity/consistency., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 09/39: fec: LDPC: Adding scripts to generate matrices for encoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 18/39: fec: LDPC: Updates to LDPC-related matrix classes., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 01/39: fec: LDPC: Adding class for LDPC parity check matrix., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 16/39: fec: LDPC: updates for LDPC functionality., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 22/39: fec: LDPC: Updating decoder to handle parity bits either first or last., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 28/39: qtgui: fixes calculation of BPSK BER curve., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 05/39: fec: LDPC: Adding LDPC encoder variable., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 34/39: fec: LDPC: changing namespace of ldpc_encoder back., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 30/39: fec: Updated docs for Forward Error Correction section in manual., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 32/39: fec: LDPC: removing apps until we can fix them up properly.,
git <=
- [Commit-gnuradio] [gnuradio] 35/39: fec: LDPC: better docs describing encoder/decoders and how to use., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 39/39: Merge remote-tracking branch 'tom/fec/ldpc_methods', git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 26/39: fec: LDPC: Setting copyright date to current year., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 38/39: fec: LDPC: added back all QA tests and added a test of ldpc_gen_mtrx_encoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 13/39: fec: LDPC: Renaming class from ldpc_par_chk_mtrx to ldpc_R_U_mtrx, git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 36/39: fec: LDPC: reworking code to make sure API is ok., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 25/39: fec: LDPC: Moving alist files to a more global place; updating example., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 04/39: fec: LDPC: Classes for LDPC encoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 02/39: fec: LDPC: Adding framework for bit flip decoder., git, 2015/10/15
- [Commit-gnuradio] [gnuradio] 29/39: fec: LDPC: Fixes GRC files for BER curve examples., git, 2015/10/15