Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
@@ -0,0 +1,17 @@
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// (C) Copyright 2007 Anthony Williams
// (C) Copyright 2011-2012 Vicente J. Botet Escriba
#ifndef BOOST_THREAD_LOCKS_HPP
#define BOOST_THREAD_LOCKS_HPP
#include <boost/thread/lock_algorithms.hpp>
#include <boost/thread/lock_types.hpp>
#include <boost/thread/lock_guard.hpp>
#include <boost/thread/shared_lock_guard.hpp>
#include <boost/thread/lockable_traits.hpp>
#include <boost/thread/lock_options.hpp>
#endif
@@ -0,0 +1,34 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
#define BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/luminous_flux.hpp>
namespace boost {
namespace units {
namespace si {
typedef unit<luminous_flux_dimension,si::system> luminous_flux;
BOOST_UNITS_STATIC_CONSTANT(lumen,luminous_flux);
BOOST_UNITS_STATIC_CONSTANT(lumens,luminous_flux);
} // namespace si
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_SI_LUMINOUS_FLUX_HPP
@@ -0,0 +1,29 @@
/*
* maintains a list of country names that have been worked
* VK3ACF July 2013
*/
#ifndef __COUNTRIESWORKDED_H
#define __COUNTRIESWORKDED_H
#include <QList>
#include <QString>
#include <QStringList>
#include <QHash>
class CountriesWorked
{
public:
void init(const QStringList countryNames);
void setAsWorked(const QString countryName);
bool getHasWorked(const QString countryName) const;
int getWorkedCount() const;
int getSize() const;
private:
QHash<QString, bool> _data;
};
#endif
@@ -0,0 +1,185 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Peter Dimov 2008.
// (C) Copyright Ion Gaztanaga 2013-2013. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//Parts of this file come from boost/smart_ptr/detail/yield_k.hpp
//Many thanks to Peter Dimov.
#ifndef BOOST_INTERPROCESS_SYNC_WAIT_HPP_INCLUDED
#define BOOST_INTERPROCESS_SYNC_WAIT_HPP_INCLUDED
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/detail/os_thread_functions.hpp>
//#define BOOST_INTERPROCESS_SPIN_WAIT_DEBUG
#ifdef BOOST_INTERPROCESS_SPIN_WAIT_DEBUG
#include <iostream>
#endif
// BOOST_INTERPROCESS_SMT_PAUSE
#if defined(_MSC_VER) && ( defined(_M_IX86) || defined(_M_X64) )
extern "C" void _mm_pause();
#pragma intrinsic( _mm_pause )
#define BOOST_INTERPROCESS_SMT_PAUSE _mm_pause();
#elif defined(__GNUC__) && ( defined(__i386__) || defined(__x86_64__) ) && !defined(_CRAYC)
#define BOOST_INTERPROCESS_SMT_PAUSE __asm__ __volatile__( "rep; nop" : : : "memory" );
#endif
namespace boost{
namespace interprocess{
namespace ipcdetail {
template<int Dummy = 0>
class num_core_holder
{
public:
static unsigned int get()
{
if(!num_cores){
return ipcdetail::get_num_cores();
}
else{
return num_cores;
}
}
private:
static unsigned int num_cores;
};
template<int Dummy>
unsigned int num_core_holder<Dummy>::num_cores = ipcdetail::get_num_cores();
} //namespace ipcdetail {
class spin_wait
{
public:
static const unsigned int nop_pause_limit = 32u;
spin_wait()
: m_count_start(), m_ul_yield_only_counts(), m_k()
{}
#ifdef BOOST_INTERPROCESS_SPIN_WAIT_DEBUG
~spin_wait()
{
if(m_k){
std::cout << "final m_k: " << m_k
<< " system tick(us): " << ipcdetail::get_system_tick_us() << std::endl;
}
}
#endif
unsigned int count() const
{ return m_k; }
void yield()
{
//Lazy initialization of limits
if( !m_k){
this->init_limits();
}
//Nop tries
if( m_k < (nop_pause_limit >> 2) ){
}
//Pause tries if the processor supports it
#if defined(BOOST_INTERPROCESS_SMT_PAUSE)
else if( m_k < nop_pause_limit ){
BOOST_INTERPROCESS_SMT_PAUSE
}
#endif
//Yield/Sleep strategy
else{
//Lazy initialization of tick information
if(m_k == nop_pause_limit){
this->init_tick_info();
}
else if( this->yield_or_sleep() ){
ipcdetail::thread_yield();
}
else{
ipcdetail::thread_sleep_tick();
}
}
++m_k;
}
void reset()
{
m_k = 0u;
}
private:
void init_limits()
{
unsigned int num_cores = ipcdetail::num_core_holder<0>::get();
m_k = num_cores > 1u ? 0u : nop_pause_limit;
}
void init_tick_info()
{
m_ul_yield_only_counts = ipcdetail::get_system_tick_in_highres_counts();
m_count_start = ipcdetail::get_current_system_highres_count();
}
//Returns true if yield must be called, false is sleep must be called
bool yield_or_sleep()
{
if(!m_ul_yield_only_counts){ //If yield-only limit was reached then yield one in every two tries
return (m_k & 1u) != 0;
}
else{ //Try to see if we've reched yield-only time limit
const ipcdetail::OS_highres_count_t now = ipcdetail::get_current_system_highres_count();
const ipcdetail::OS_highres_count_t elapsed = ipcdetail::system_highres_count_subtract(now, m_count_start);
if(!ipcdetail::system_highres_count_less_ul(elapsed, m_ul_yield_only_counts)){
#ifdef BOOST_INTERPROCESS_SPIN_WAIT_DEBUG
std::cout << "elapsed!\n"
<< " m_ul_yield_only_counts: " << m_ul_yield_only_counts
<< " system tick(us): " << ipcdetail::get_system_tick_us() << '\n'
<< " m_k: " << m_k << " elapsed counts: ";
ipcdetail::ostream_highres_count(std::cout, elapsed) << std::endl;
#endif
//Yield-only time reached, now it's time to sleep
m_ul_yield_only_counts = 0ul;
return false;
}
}
return true; //Otherwise yield
}
ipcdetail::OS_highres_count_t m_count_start;
unsigned long m_ul_yield_only_counts;
unsigned int m_k;
};
} // namespace interprocess
} // namespace boost
#include <boost/interprocess/detail/config_end.hpp>
#endif // #ifndef BOOST_INTERPROCESS_SYNC_WAIT_HPP_INCLUDED
@@ -0,0 +1,46 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef IMPLICIT_DWA2002326_HPP
# define IMPLICIT_DWA2002326_HPP
# include <boost/python/converter/rvalue_from_python_data.hpp>
# include <boost/python/converter/registrations.hpp>
# include <boost/python/converter/registered.hpp>
# include <boost/python/extract.hpp>
namespace boost { namespace python { namespace converter {
template <class Source, class Target>
struct implicit
{
static void* convertible(PyObject* obj)
{
// Find a converter which can produce a Source instance from
// obj. The user has told us that Source can be converted to
// Target, and instantiating construct() below, ensures that
// at compile-time.
return implicit_rvalue_convertible_from_python(obj, registered<Source>::converters)
? obj : 0;
}
static void construct(PyObject* obj, rvalue_from_python_stage1_data* data)
{
void* storage = ((rvalue_from_python_storage<Target>*)data)->storage.bytes;
arg_from_python<Source> get_source(obj);
bool convertible = get_source.convertible();
BOOST_VERIFY(convertible);
new (storage) Target(get_source());
// record successful construction
data->convertible = storage;
}
};
}}} // namespace boost::python::converter
#endif // IMPLICIT_DWA2002326_HPP
@@ -0,0 +1,32 @@
/*=============================================================================
Copyright (c) 2005-2008 Hartmut Kaiser
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2014-2015 John Fletcher
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_VERSION_HPP
#define BOOST_PHOENIX_VERSION_HPP
///////////////////////////////////////////////////////////////////////////////
//
// This is the version of the library
//
///////////////////////////////////////////////////////////////////////////////
#define BOOST_PHOENIX_VERSION 0x3200 // 3.2.0
// boost/predef is not in Boost before 1.55.0
#include <boost/version.hpp>
#if BOOST_VERSION >= 105500
// Also note that it has a nonstandard header which could change,
// so I have not relied on its own internal define.
#include <boost/predef.h>
#define BOOST_PHOENIX_HAVE_BOOST_PREDEF
#endif
#ifdef BOOST_PHOENIX_HAVE_BOOST_PREDEF
#define BOOST_PHOENIX_VERSION_NUMBER = BOOST_VERSION_NUMBER(3,2,0)
#endif
#endif
@@ -0,0 +1,91 @@
// Copyright Daniel Wallin, David Abrahams 2005. Use, modification and
// distribution is subject to the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef UNWRAP_CV_REFERENCE_050328_HPP
#define UNWRAP_CV_REFERENCE_050328_HPP
#include <boost/parameter/aux_/yesno.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/eval_if.hpp>
namespace boost { template<class T> class reference_wrapper; }
namespace boost { namespace parameter { namespace aux {
//
// reference_wrapper support -- because of the forwarding problem,
// when passing arguments positionally by non-const reference, we
// ask users of named parameter interfaces to use ref(x) to wrap
// them.
//
// is_cv_reference_wrapper returns mpl::true_ if T is of type
// reference_wrapper<U> cv
template <class U>
yes_tag is_cv_reference_wrapper_check(reference_wrapper<U> const volatile*);
no_tag is_cv_reference_wrapper_check(...);
template <class T>
struct is_cv_reference_wrapper
{
BOOST_STATIC_CONSTANT(
bool, value = (
sizeof(is_cv_reference_wrapper_check((T*)0)) == sizeof(yes_tag)
)
);
typedef mpl::bool_<
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
is_cv_reference_wrapper::
#endif
value> type;
};
// Needed for unwrap_cv_reference below. T might be const, so
// eval_if might fail because of deriving from T const on EDG.
template <class T>
struct get_type
{
typedef typename T::type type;
};
#if BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
template <class T, class is_reference_wrapper = typename is_cv_reference_wrapper<T>::type>
struct unwrap_cv_reference
{
typedef T type;
};
template <class T>
struct unwrap_cv_reference<T const, mpl::false_>
{
typedef T const type;
};
template <class T>
struct unwrap_cv_reference<T, mpl::true_>
: T
{};
#else
// Produces the unwrapped type to hold a reference to in named<>
// Can't use boost::unwrap_reference<> here because it
// doesn't handle the case where T = reference_wrapper<U> cv
template <class T>
struct unwrap_cv_reference
{
typedef typename mpl::eval_if<
is_cv_reference_wrapper<T>
, get_type<T>
, mpl::identity<T>
>::type type;
};
#endif
}}} // namespace boost::parameter::aux
#endif // UNWRAP_CV_REFERENCE_050328_HPP
@@ -0,0 +1,42 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_EQUAL_RANGE_HPP
#define BOOST_COMPUTE_ALGORITHM_EQUAL_RANGE_HPP
#include <utility>
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/lower_bound.hpp>
#include <boost/compute/algorithm/upper_bound.hpp>
namespace boost {
namespace compute {
/// Returns a pair of iterators containing the range of values equal
/// to \p value in the sorted range [\p first, \p last).
template<class InputIterator, class T>
inline std::pair<InputIterator, InputIterator>
equal_range(InputIterator first,
InputIterator last,
const T &value,
command_queue &queue = system::default_queue())
{
return std::make_pair(
::boost::compute::lower_bound(first, last, value, queue),
::boost::compute::upper_bound(first, last, value, queue)
);
}
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_EQUAL_RANGE_HPP
@@ -0,0 +1,82 @@
# /* **************************************************************************
# * *
# * (C) Copyright Paul Mensonides 2002.
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# * *
# ************************************************************************** */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
# define BOOST_PREPROCESSOR_ITERATION_ITERATE_HPP
#
# include <boost/preprocessor/arithmetic/dec.hpp>
# include <boost/preprocessor/arithmetic/inc.hpp>
# include <boost/preprocessor/array/elem.hpp>
# include <boost/preprocessor/array/size.hpp>
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/slot/slot.hpp>
# include <boost/preprocessor/tuple/elem.hpp>
#
# /* BOOST_PP_ITERATION_DEPTH */
#
# define BOOST_PP_ITERATION_DEPTH() 0
#
# /* BOOST_PP_ITERATION */
#
# define BOOST_PP_ITERATION() BOOST_PP_CAT(BOOST_PP_ITERATION_, BOOST_PP_ITERATION_DEPTH())
#
# /* BOOST_PP_ITERATION_START && BOOST_PP_ITERATION_FINISH */
#
# define BOOST_PP_ITERATION_START() BOOST_PP_CAT(BOOST_PP_ITERATION_START_, BOOST_PP_ITERATION_DEPTH())
# define BOOST_PP_ITERATION_FINISH() BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, BOOST_PP_ITERATION_DEPTH())
#
# /* BOOST_PP_ITERATION_FLAGS */
#
# define BOOST_PP_ITERATION_FLAGS() (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, BOOST_PP_ITERATION_DEPTH())())
#
# /* BOOST_PP_FRAME_ITERATION */
#
# define BOOST_PP_FRAME_ITERATION(i) BOOST_PP_CAT(BOOST_PP_ITERATION_, i)
#
# /* BOOST_PP_FRAME_START && BOOST_PP_FRAME_FINISH */
#
# define BOOST_PP_FRAME_START(i) BOOST_PP_CAT(BOOST_PP_ITERATION_START_, i)
# define BOOST_PP_FRAME_FINISH(i) BOOST_PP_CAT(BOOST_PP_ITERATION_FINISH_, i)
#
# /* BOOST_PP_FRAME_FLAGS */
#
# define BOOST_PP_FRAME_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_ITERATION_FLAGS_, i)())
#
# /* BOOST_PP_RELATIVE_ITERATION */
#
# define BOOST_PP_RELATIVE_ITERATION(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_)
#
# define BOOST_PP_RELATIVE_0(m) BOOST_PP_CAT(m, BOOST_PP_ITERATION_DEPTH())
# define BOOST_PP_RELATIVE_1(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))
# define BOOST_PP_RELATIVE_2(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))
# define BOOST_PP_RELATIVE_3(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH()))))
# define BOOST_PP_RELATIVE_4(m) BOOST_PP_CAT(m, BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_DEC(BOOST_PP_ITERATION_DEPTH())))))
#
# /* BOOST_PP_RELATIVE_START && BOOST_PP_RELATIVE_FINISH */
#
# define BOOST_PP_RELATIVE_START(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_START_)
# define BOOST_PP_RELATIVE_FINISH(i) BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FINISH_)
#
# /* BOOST_PP_RELATIVE_FLAGS */
#
# define BOOST_PP_RELATIVE_FLAGS(i) (BOOST_PP_CAT(BOOST_PP_RELATIVE_, i)(BOOST_PP_ITERATION_FLAGS_)())
#
# /* BOOST_PP_ITERATE */
#
# define BOOST_PP_ITERATE() BOOST_PP_CAT(BOOST_PP_ITERATE_, BOOST_PP_INC(BOOST_PP_ITERATION_DEPTH()))
#
# define BOOST_PP_ITERATE_1 <boost/preprocessor/iteration/detail/iter/forward1.hpp>
# define BOOST_PP_ITERATE_2 <boost/preprocessor/iteration/detail/iter/forward2.hpp>
# define BOOST_PP_ITERATE_3 <boost/preprocessor/iteration/detail/iter/forward3.hpp>
# define BOOST_PP_ITERATE_4 <boost/preprocessor/iteration/detail/iter/forward4.hpp>
# define BOOST_PP_ITERATE_5 <boost/preprocessor/iteration/detail/iter/forward5.hpp>
#
# endif
@@ -0,0 +1,13 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_INCLUDE_SINGLE_VIEW)
#define FUSION_INCLUDE_SINGLE_VIEW
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/view/single_view.hpp>
#endif
@@ -0,0 +1,67 @@
/*=============================================================================
Copyright (c) 2005-2012 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017)
#define BOOST_FUSION_DEQUE_AT_IMPL_09122006_2017
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/deque/detail/keyed_element.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/equal_to.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/type_traits/is_const.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/type_traits/add_reference.hpp>
namespace boost { namespace fusion
{
struct deque_tag;
namespace extension
{
template<typename T>
struct at_impl;
template<>
struct at_impl<deque_tag>
{
template<typename Sequence, typename N>
struct apply
{
typedef typename Sequence::next_up next_up;
typedef typename Sequence::next_down next_down;
BOOST_MPL_ASSERT_RELATION(next_down::value, !=, next_up::value);
static int const offset = next_down::value + 1;
typedef mpl::int_<(N::value + offset)> adjusted_index;
typedef typename
detail::keyed_element_value_at<Sequence, adjusted_index>::type
element_type;
typedef typename
add_reference<
typename mpl::eval_if<
is_const<Sequence>,
add_const<element_type>,
mpl::identity<element_type> >::type
>::type
type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type call(Sequence& seq)
{
return seq.get(adjusted_index());
}
};
};
}
}}
#endif
@@ -0,0 +1,530 @@
#ifndef BOOST_PROPERTY_TREE_DETAIL_JSON_PARSER_PARSER_HPP
#define BOOST_PROPERTY_TREE_DETAIL_JSON_PARSER_PARSER_HPP
#include <boost/property_tree/json_parser/error.hpp>
#include <boost/ref.hpp>
#include <boost/bind.hpp>
#include <boost/format.hpp>
#include <iterator>
#include <sstream>
#include <string>
namespace boost { namespace property_tree {
namespace json_parser { namespace detail
{
template <typename Encoding, typename Iterator, typename Sentinel>
class source
{
public:
typedef typename std::iterator_traits<Iterator>::value_type
code_unit;
typedef bool (Encoding::*encoding_predicate)(code_unit c) const;
explicit source(Encoding& encoding) : encoding(encoding) {}
template <typename Range>
void set_input(const std::string& filename, const Range& r)
{
this->filename = filename;
cur = r.begin();
end = r.end();
// Note that there is no backtracking, so if e.g. a UTF-8 file
// starts with something that initially looks like a BOM but isn't,
// there's trouble.
// However, no valid JSON file can start with a UTF-8 EF byte.
encoding.skip_introduction(cur, end);
line = 1;
offset = 0;
}
bool done() const { return cur == end; }
void parse_error(const char* msg) {
BOOST_PROPERTY_TREE_THROW(
json_parser_error(msg, filename, line));
}
void next() {
if (encoding.is_nl(*cur)) {
++line;
offset = 0;
} else {
++offset;
}
++cur;
}
template <typename Action>
bool have(encoding_predicate p, Action& a) {
bool found = cur != end && (encoding.*p)(*cur);
if (found) {
a(*cur);
next();
}
return found;
}
bool have(encoding_predicate p) {
DoNothing n;
return have(p, n);
}
template <typename Action>
void expect(encoding_predicate p, const char* msg, Action& a) {
if (!have(p, a)) {
parse_error(msg);
}
}
void expect(encoding_predicate p, const char* msg) {
DoNothing n;
expect(p, msg, n);
}
code_unit need_cur(const char* msg) {
if (cur == end) {
parse_error(msg);
}
return *cur;
}
Iterator& raw_cur() { return cur; }
Sentinel raw_end() { return end; }
private:
struct DoNothing {
void operator ()(code_unit) const {}
};
Encoding& encoding;
Iterator cur;
Sentinel end;
std::string filename;
int line;
int offset;
};
template <typename Callbacks, typename Encoding, typename Iterator,
typename = typename std::iterator_traits<Iterator>
::iterator_category>
class number_callback_adapter
{
public:
number_callback_adapter(Callbacks& callbacks, Encoding& encoding,
Iterator& cur)
: callbacks(callbacks), encoding(encoding), first(cur), cur(cur)
{}
void operator ()(typename Encoding::external_char) {}
void finish() const {
callbacks.on_number(encoding.to_internal(first, cur));
}
private:
number_callback_adapter(const number_callback_adapter&);
Callbacks& callbacks;
Encoding& encoding;
Iterator first;
Iterator& cur;
};
template <typename Callbacks, typename Encoding, typename Iterator>
class number_callback_adapter<Callbacks, Encoding, Iterator,
std::input_iterator_tag>
{
public:
number_callback_adapter(Callbacks& callbacks, Encoding& encoding,
Iterator&)
: callbacks(callbacks), encoding(encoding), first(true)
{}
void operator ()(typename Encoding::external_char c) {
if (first) {
callbacks.on_begin_number();
first = false;
}
callbacks.on_digit(encoding.to_internal_trivial(c));
}
void finish() const {
callbacks.on_end_number();
}
private:
number_callback_adapter(const number_callback_adapter&);
Callbacks& callbacks;
Encoding& encoding;
bool first;
};
template <typename Callbacks, typename Encoding, typename Iterator,
typename = typename std::iterator_traits<Iterator>
::iterator_category>
class string_callback_adapter
{
public:
string_callback_adapter(Callbacks& callbacks, Encoding& encoding,
Iterator& cur)
: callbacks(callbacks), encoding(encoding), cur(cur),
run_begin(cur)
{}
void start_run() {
run_begin = cur;
}
void finish_run() {
callbacks.on_code_units(encoding.to_internal(run_begin, cur));
}
template <typename Sentinel, typename EncodingErrorFn>
void process_codepoint(Sentinel end, EncodingErrorFn error_fn) {
encoding.skip_codepoint(cur, end, error_fn);
}
private:
string_callback_adapter(const string_callback_adapter&);
Callbacks& callbacks;
Encoding& encoding;
Iterator& cur;
Iterator run_begin;
};
template <typename Callbacks, typename Encoding, typename Iterator>
class string_callback_adapter<Callbacks, Encoding, Iterator,
std::input_iterator_tag>
{
public:
string_callback_adapter(Callbacks& callbacks, Encoding& encoding,
Iterator& cur)
: callbacks(callbacks), encoding(encoding), cur(cur)
{}
void start_run() {}
void finish_run() {}
template <typename Sentinel, typename EncodingErrorFn>
void process_codepoint(Sentinel end, EncodingErrorFn error_fn) {
encoding.transcode_codepoint(cur, end,
boost::bind(&Callbacks::on_code_unit,
boost::ref(callbacks), _1),
error_fn);
}
private:
string_callback_adapter(const string_callback_adapter&);
Callbacks& callbacks;
Encoding& encoding;
Iterator& cur;
};
template <typename Callbacks, typename Encoding, typename Iterator,
typename Sentinel>
class parser
{
typedef detail::number_callback_adapter<Callbacks, Encoding, Iterator>
number_adapter;
typedef detail::string_callback_adapter<Callbacks, Encoding, Iterator>
string_adapter;
typedef detail::source<Encoding, Iterator, Sentinel> source;
typedef typename source::code_unit code_unit;
public:
parser(Callbacks& callbacks, Encoding& encoding)
: callbacks(callbacks), encoding(encoding), src(encoding)
{}
template <typename Range>
void set_input(const std::string& filename, const Range& r) {
src.set_input(filename, r);
}
void finish() {
skip_ws();
if (!src.done()) {
parse_error("garbage after data");
}
}
void parse_value() {
if (parse_object()) return;
if (parse_array()) return;
if (parse_string()) return;
if (parse_boolean()) return;
if (parse_null()) return;
if (parse_number()) return;
parse_error("expected value");
}
bool parse_null() {
skip_ws();
if (!have(&Encoding::is_n)) {
return false;
}
expect(&Encoding::is_u, "expected 'null'");
expect(&Encoding::is_l, "expected 'null'");
expect(&Encoding::is_l, "expected 'null'");
callbacks.on_null();
return true;
}
bool parse_boolean() {
skip_ws();
if (have(&Encoding::is_t)) {
expect(&Encoding::is_r, "expected 'true'");
expect(&Encoding::is_u, "expected 'true'");
expect(&Encoding::is_e, "expected 'true'");
callbacks.on_boolean(true);
return true;
}
if (have(&Encoding::is_f)) {
expect(&Encoding::is_a, "expected 'false'");
expect(&Encoding::is_l, "expected 'false'");
expect(&Encoding::is_s, "expected 'false'");
expect(&Encoding::is_e, "expected 'false'");
callbacks.on_boolean(false);
return true;
}
return false;
}
bool parse_number() {
skip_ws();
number_adapter adapter(callbacks, encoding, src.raw_cur());
bool started = false;
if (have(&Encoding::is_minus, adapter)) {
started = true;
}
if (!have(&Encoding::is_0, adapter) && !parse_int_part(adapter)) {
if (started) {
parse_error("expected digits after -");
}
return false;
}
parse_frac_part(adapter);
parse_exp_part(adapter);
adapter.finish();
return true;
}
bool parse_string() {
skip_ws();
if (!have(&Encoding::is_quote)) {
return false;
}
callbacks.on_begin_string();
string_adapter adapter(callbacks, encoding, src.raw_cur());
while (!encoding.is_quote(need_cur("unterminated string"))) {
if (encoding.is_backslash(*src.raw_cur())) {
adapter.finish_run();
next();
parse_escape();
adapter.start_run();
} else {
adapter.process_codepoint(src.raw_end(),
boost::bind(&parser::parse_error,
this, "invalid code sequence"));
}
}
adapter.finish_run();
callbacks.on_end_string();
next();
return true;
}
bool parse_array() {
skip_ws();
if (!have(&Encoding::is_open_bracket)) {
return false;
}
callbacks.on_begin_array();
skip_ws();
if (have(&Encoding::is_close_bracket)) {
callbacks.on_end_array();
return true;
}
do {
parse_value();
skip_ws();
} while (have(&Encoding::is_comma));
expect(&Encoding::is_close_bracket, "expected ']' or ','");
callbacks.on_end_array();
return true;
}
bool parse_object() {
skip_ws();
if (!have(&Encoding::is_open_brace)) {
return false;
}
callbacks.on_begin_object();
skip_ws();
if (have(&Encoding::is_close_brace)) {
callbacks.on_end_object();
return true;
}
do {
if (!parse_string()) {
parse_error("expected key string");
}
skip_ws();
expect(&Encoding::is_colon, "expected ':'");
parse_value();
skip_ws();
} while (have(&Encoding::is_comma));
expect(&Encoding::is_close_brace, "expected '}' or ','");
callbacks.on_end_object();
return true;
}
private:
typedef typename source::encoding_predicate encoding_predicate;
void parse_error(const char* msg) { src.parse_error(msg); }
void next() { src.next(); }
template <typename Action>
bool have(encoding_predicate p, Action& a) { return src.have(p, a); }
bool have(encoding_predicate p) { return src.have(p); }
template <typename Action>
void expect(encoding_predicate p, const char* msg, Action& a) {
src.expect(p, msg, a);
}
void expect(encoding_predicate p, const char* msg) {
src.expect(p, msg);
}
code_unit need_cur(const char* msg) { return src.need_cur(msg); }
void skip_ws() {
while (have(&Encoding::is_ws)) {
}
}
bool parse_int_part(number_adapter& action) {
if (!have(&Encoding::is_digit0, action)) {
return false;
}
parse_digits(action);
return true;
}
void parse_frac_part(number_adapter& action) {
if (!have(&Encoding::is_dot, action)) {
return;
}
expect(&Encoding::is_digit, "need at least one digit after '.'",
action);
parse_digits(action);
}
void parse_exp_part(number_adapter& action) {
if (!have(&Encoding::is_eE, action)) {
return;
}
have(&Encoding::is_plusminus, action);
expect(&Encoding::is_digit, "need at least one digit in exponent",
action);
parse_digits(action);
}
void parse_digits(number_adapter& action) {
while (have(&Encoding::is_digit, action)) {
}
}
void parse_escape() {
if (have(&Encoding::is_quote)) {
feed(0x22);
} else if (have(&Encoding::is_backslash)) {
feed(0x5c);
} else if (have(&Encoding::is_slash)) {
feed(0x2f);
} else if (have(&Encoding::is_b)) {
feed(0x08); // backspace
} else if (have(&Encoding::is_f)) {
feed(0x0c); // formfeed
} else if (have(&Encoding::is_n)) {
feed(0x0a); // line feed
} else if (have(&Encoding::is_r)) {
feed(0x0d); // carriage return
} else if (have(&Encoding::is_t)) {
feed(0x09); // horizontal tab
} else if (have(&Encoding::is_u)) {
parse_codepoint_ref();
} else {
parse_error("invalid escape sequence");
}
}
unsigned parse_hex_quad() {
unsigned codepoint = 0;
for (int i = 0; i < 4; ++i) {
int value = encoding.decode_hexdigit(
need_cur("invalid escape sequence"));
if (value < 0) {
parse_error("invalid escape sequence");
}
codepoint *= 16;
codepoint += value;
next();
}
return codepoint;
}
static bool is_surrogate_high(unsigned codepoint) {
return (codepoint & 0xfc00) == 0xd800;
}
static bool is_surrogate_low(unsigned codepoint) {
return (codepoint & 0xfc00) == 0xdc00;
}
static unsigned combine_surrogates(unsigned high, unsigned low) {
return 0x010000 + (((high & 0x3ff) << 10) | (low & 0x3ff));
}
void parse_codepoint_ref() {
unsigned codepoint = parse_hex_quad();
if (is_surrogate_low(codepoint)) {
parse_error("invalid codepoint, stray low surrogate");
}
if (is_surrogate_high(codepoint)) {
expect(&Encoding::is_backslash,
"invalid codepoint, stray high surrogate");
expect(&Encoding::is_u,
"expected codepoint reference after high surrogate");
int low = parse_hex_quad();
if (!is_surrogate_low(low)) {
parse_error("expected low surrogate after high surrogate");
}
codepoint = combine_surrogates(codepoint, low);
}
feed(codepoint);
}
void feed(unsigned codepoint) {
encoding.feed_codepoint(codepoint,
boost::bind(&Callbacks::on_code_unit,
boost::ref(callbacks), _1));
}
Callbacks& callbacks;
Encoding& encoding;
source src;
};
}}}}
#endif
@@ -0,0 +1,47 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2005-2006 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_DISTANCE_IMPL_14122005_2104)
#define FUSION_DISTANCE_IMPL_14122005_2104
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/iterator/distance.hpp>
namespace boost { namespace fusion {
struct reverse_view_iterator_tag;
template <typename Iterator>
struct reverse_view_iterator;
namespace extension
{
template<typename Tag>
struct distance_impl;
template<>
struct distance_impl<reverse_view_iterator_tag>
{
template<typename First, typename Last>
struct apply
{
typedef typename First::first_type first_type;
typedef typename Last::first_type last_type;
typedef typename result_of::distance<last_type, first_type>::type type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(First const& first, Last const& last)
{
return boost::fusion::distance(last.first, first.first);
}
};
};
}
}}
#endif
@@ -0,0 +1,360 @@
/* boost random/poisson_distribution.hpp header file
*
* Copyright Jens Maurer 2002
* Copyright Steven Watanabe 2010
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org for most recent version including documentation.
*
* $Id$
*
*/
#ifndef BOOST_RANDOM_POISSON_DISTRIBUTION_HPP
#define BOOST_RANDOM_POISSON_DISTRIBUTION_HPP
#include <boost/config/no_tr1/cmath.hpp>
#include <cstdlib>
#include <iosfwd>
#include <boost/assert.hpp>
#include <boost/limits.hpp>
#include <boost/random/uniform_01.hpp>
#include <boost/random/detail/config.hpp>
#include <boost/random/detail/disable_warnings.hpp>
namespace boost {
namespace random {
namespace detail {
template<class RealType>
struct poisson_table {
static RealType value[10];
};
template<class RealType>
RealType poisson_table<RealType>::value[10] = {
0.0,
0.0,
0.69314718055994529,
1.7917594692280550,
3.1780538303479458,
4.7874917427820458,
6.5792512120101012,
8.5251613610654147,
10.604602902745251,
12.801827480081469
};
}
/**
* An instantiation of the class template @c poisson_distribution is a
* model of \random_distribution. The poisson distribution has
* \f$p(i) = \frac{e^{-\lambda}\lambda^i}{i!}\f$
*
* This implementation is based on the PTRD algorithm described
*
* @blockquote
* "The transformed rejection method for generating Poisson random variables",
* Wolfgang Hormann, Insurance: Mathematics and Economics
* Volume 12, Issue 1, February 1993, Pages 39-45
* @endblockquote
*/
template<class IntType = int, class RealType = double>
class poisson_distribution {
public:
typedef IntType result_type;
typedef RealType input_type;
class param_type {
public:
typedef poisson_distribution distribution_type;
/**
* Construct a param_type object with the parameter "mean"
*
* Requires: mean > 0
*/
explicit param_type(RealType mean_arg = RealType(1))
: _mean(mean_arg)
{
BOOST_ASSERT(_mean > 0);
}
/* Returns the "mean" parameter of the distribution. */
RealType mean() const { return _mean; }
#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
/** Writes the parameters of the distribution to a @c std::ostream. */
template<class CharT, class Traits>
friend std::basic_ostream<CharT, Traits>&
operator<<(std::basic_ostream<CharT, Traits>& os,
const param_type& parm)
{
os << parm._mean;
return os;
}
/** Reads the parameters of the distribution from a @c std::istream. */
template<class CharT, class Traits>
friend std::basic_istream<CharT, Traits>&
operator>>(std::basic_istream<CharT, Traits>& is, param_type& parm)
{
is >> parm._mean;
return is;
}
#endif
/** Returns true if the parameters have the same values. */
friend bool operator==(const param_type& lhs, const param_type& rhs)
{
return lhs._mean == rhs._mean;
}
/** Returns true if the parameters have different values. */
friend bool operator!=(const param_type& lhs, const param_type& rhs)
{
return !(lhs == rhs);
}
private:
RealType _mean;
};
/**
* Constructs a @c poisson_distribution with the parameter @c mean.
*
* Requires: mean > 0
*/
explicit poisson_distribution(RealType mean_arg = RealType(1))
: _mean(mean_arg)
{
BOOST_ASSERT(_mean > 0);
init();
}
/**
* Construct an @c poisson_distribution object from the
* parameters.
*/
explicit poisson_distribution(const param_type& parm)
: _mean(parm.mean())
{
init();
}
/**
* Returns a random variate distributed according to the
* poisson distribution.
*/
template<class URNG>
IntType operator()(URNG& urng) const
{
if(use_inversion()) {
return invert(urng);
} else {
return generate(urng);
}
}
/**
* Returns a random variate distributed according to the
* poisson distribution with parameters specified by param.
*/
template<class URNG>
IntType operator()(URNG& urng, const param_type& parm) const
{
return poisson_distribution(parm)(urng);
}
/** Returns the "mean" parameter of the distribution. */
RealType mean() const { return _mean; }
/** Returns the smallest value that the distribution can produce. */
IntType min BOOST_PREVENT_MACRO_SUBSTITUTION() const { return 0; }
/** Returns the largest value that the distribution can produce. */
IntType max BOOST_PREVENT_MACRO_SUBSTITUTION() const
{ return (std::numeric_limits<IntType>::max)(); }
/** Returns the parameters of the distribution. */
param_type param() const { return param_type(_mean); }
/** Sets parameters of the distribution. */
void param(const param_type& parm)
{
_mean = parm.mean();
init();
}
/**
* Effects: Subsequent uses of the distribution do not depend
* on values produced by any engine prior to invoking reset.
*/
void reset() { }
#ifndef BOOST_RANDOM_NO_STREAM_OPERATORS
/** Writes the parameters of the distribution to a @c std::ostream. */
template<class CharT, class Traits>
friend std::basic_ostream<CharT,Traits>&
operator<<(std::basic_ostream<CharT,Traits>& os,
const poisson_distribution& pd)
{
os << pd.param();
return os;
}
/** Reads the parameters of the distribution from a @c std::istream. */
template<class CharT, class Traits>
friend std::basic_istream<CharT,Traits>&
operator>>(std::basic_istream<CharT,Traits>& is, poisson_distribution& pd)
{
pd.read(is);
return is;
}
#endif
/** Returns true if the two distributions will produce the same
sequence of values, given equal generators. */
friend bool operator==(const poisson_distribution& lhs,
const poisson_distribution& rhs)
{
return lhs._mean == rhs._mean;
}
/** Returns true if the two distributions could produce different
sequences of values, given equal generators. */
friend bool operator!=(const poisson_distribution& lhs,
const poisson_distribution& rhs)
{
return !(lhs == rhs);
}
private:
/// @cond show_private
template<class CharT, class Traits>
void read(std::basic_istream<CharT, Traits>& is) {
param_type parm;
if(is >> parm) {
param(parm);
}
}
bool use_inversion() const
{
return _mean < 10;
}
static RealType log_factorial(IntType k)
{
BOOST_ASSERT(k >= 0);
BOOST_ASSERT(k < 10);
return detail::poisson_table<RealType>::value[k];
}
void init()
{
using std::sqrt;
using std::exp;
if(use_inversion()) {
_exp_mean = exp(-_mean);
} else {
_ptrd.smu = sqrt(_mean);
_ptrd.b = 0.931 + 2.53 * _ptrd.smu;
_ptrd.a = -0.059 + 0.02483 * _ptrd.b;
_ptrd.inv_alpha = 1.1239 + 1.1328 / (_ptrd.b - 3.4);
_ptrd.v_r = 0.9277 - 3.6224 / (_ptrd.b - 2);
}
}
template<class URNG>
IntType generate(URNG& urng) const
{
using std::floor;
using std::abs;
using std::log;
while(true) {
RealType u;
RealType v = uniform_01<RealType>()(urng);
if(v <= 0.86 * _ptrd.v_r) {
u = v / _ptrd.v_r - 0.43;
return static_cast<IntType>(floor(
(2*_ptrd.a/(0.5-abs(u)) + _ptrd.b)*u + _mean + 0.445));
}
if(v >= _ptrd.v_r) {
u = uniform_01<RealType>()(urng) - 0.5;
} else {
u = v/_ptrd.v_r - 0.93;
u = ((u < 0)? -0.5 : 0.5) - u;
v = uniform_01<RealType>()(urng) * _ptrd.v_r;
}
RealType us = 0.5 - abs(u);
if(us < 0.013 && v > us) {
continue;
}
RealType k = floor((2*_ptrd.a/us + _ptrd.b)*u+_mean+0.445);
v = v*_ptrd.inv_alpha/(_ptrd.a/(us*us) + _ptrd.b);
RealType log_sqrt_2pi = 0.91893853320467267;
if(k >= 10) {
if(log(v*_ptrd.smu) <= (k + 0.5)*log(_mean/k)
- _mean
- log_sqrt_2pi
+ k
- (1/12. - (1/360. - 1/(1260.*k*k))/(k*k))/k) {
return static_cast<IntType>(k);
}
} else if(k >= 0) {
if(log(v) <= k*log(_mean)
- _mean
- log_factorial(static_cast<IntType>(k))) {
return static_cast<IntType>(k);
}
}
}
}
template<class URNG>
IntType invert(URNG& urng) const
{
RealType p = _exp_mean;
IntType x = 0;
RealType u = uniform_01<RealType>()(urng);
while(u > p) {
u = u - p;
++x;
p = _mean * p / x;
}
return x;
}
RealType _mean;
union {
// for ptrd
struct {
RealType v_r;
RealType a;
RealType b;
RealType smu;
RealType inv_alpha;
} _ptrd;
// for inversion
RealType _exp_mean;
};
/// @endcond
};
} // namespace random
using random::poisson_distribution;
} // namespace boost
#include <boost/random/detail/enable_warnings.hpp>
#endif // BOOST_RANDOM_POISSON_DISTRIBUTION_HPP
@@ -0,0 +1,41 @@
#ifndef BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
#define BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2003-2004
// Copyright David Abrahams 2003-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#include <boost/mpl/erase_fwd.hpp>
#include <boost/mpl/set/aux_/erase_key_impl.hpp>
#include <boost/mpl/set/aux_/tag.hpp>
namespace boost { namespace mpl {
template<>
struct erase_impl< aux::set_tag >
{
template<
typename Set
, typename Pos
, typename unused_
>
struct apply
: erase_key_impl<aux::set_tag>
::apply<Set,typename Pos::type>
{
};
};
}}
#endif // BOOST_MPL_SET_AUX_ERASE_IMPL_HPP_INCLUDED
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,6 @@
This is a collection of programs and modules, written in C, that
support research and education concerning Low Density Parity Check
(LDPC) codes.
See index.html in this directory for an index to the documentation.
Copyright information can be found there, and in the file COPYRIGHT.
@@ -0,0 +1,127 @@
subroutine sync8(dd,nfa,nfb,nfqso,s,candidate,ncand)
include 'ft8_params.f90'
parameter (JZ=31) !DT up to +/- 2.5 s
complex cx(0:NH1)
real s(NH1,NHSYM)
real savg(NH1)
real x(NFFT1)
real sync2d(NH1,-JZ:JZ)
real red(NH1)
real candidate0(3,200)
real candidate(3,200)
real dd(NMAX)
integer jpeak(NH1)
integer indx(NH1)
integer ii(1)
integer icos7(0:6)
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
equivalence (x,cx)
! Compute symbol spectra at half-symbol steps.
savg=0.
istep=NSPS/2 !960
tstep=istep/12000.0 !0.08 s
df=12000.0/NFFT1 !3.125 Hz
! Compute symbol spectra at half-symbol steps
fac=1.0/300.0
do j=1,NHSYM
ia=(j-1)*istep + 1
ib=ia+NSPS-1
x(1:NSPS)=fac*dd(ia:ib)
x(NSPS+1:)=0.
call four2a(x,NFFT1,1,-1,0) !r2c FFT
do i=1,NH1
s(i,j)=real(cx(i))**2 + aimag(cx(i))**2
enddo
savg=savg + s(1:NH1,j) !Average spectrum
enddo
savg=savg/NHSYM
! do i=1,NH1
! write(51,3051) i*df,savg(i),db(savg(i))
!3051 format(f10.3,e12.3,f12.3)
! enddo
ia=max(1,nint(nfa/df))
ib=nint(nfb/df)
do i=ia,ib
do j=-JZ,JZ
t=0.
t0=0.
do n=0,6
k=j+2*n
if(k.ge.1) then
t=t + s(i+2*icos7(n),k)
t0=t0 + sum(s(i:i+12:2,k))
endif
t=t + s(i+2*icos7(n),k+72)
t0=t0 + sum(s(i:i+12:2,k+72))
if(k+144.le.NHSYM) then
t=t + s(i+2*icos7(n),k+144)
t0=t0 + sum(s(i:i+12:2,k+144))
endif
enddo
t0=(t0-t)/6.0
sync2d(i,j)=t/t0
enddo
enddo
red=0.
do i=ia,ib
ii=maxloc(sync2d(i,-JZ:JZ)) - 1 - JZ
j0=ii(1)
jpeak(i)=j0
red(i)=sync2d(i,j0)
! write(52,3052) i*df,red(i),db(red(i))
!3052 format(3f12.3)
enddo
iz=ib-ia+1
call indexx(red(ia:ib),iz,indx)
ibase=indx(nint(0.40*iz)) - 1 + ia
base=red(ibase)
red=red/base
candidate0=0.
k=0
syncmin=2.0
do i=1,100
n=ia + indx(iz+1-i) - 1
if(red(n).lt.syncmin) exit
if(k.lt.200) k=k+1
candidate0(1,k)=n*df
candidate0(2,k)=(jpeak(n)-1)*tstep
candidate0(3,k)=red(n)
enddo
ncand=k
! Put nfqso at top of list, and save only the best of near-dupe freqs.
do i=1,ncand
if(abs(candidate0(1,i)-nfqso).lt.10.0) candidate0(1,i)=-candidate0(1,i)
if(i.ge.2) then
do j=1,i-1
fdiff=abs(candidate0(1,i))-abs(candidate0(1,j))
if(abs(fdiff).lt.4.0) then
if(candidate0(3,i).ge.candidate0(3,j)) candidate0(3,j)=0.
if(candidate0(3,i).lt.candidate0(3,j)) candidate0(3,i)=0.
endif
enddo
! write(*,3001) i,candidate0(1,i-1),candidate0(1,i),candidate0(3,i-1), &
! candidate0(3,i)
!3001 format(i2,4f8.1)
endif
enddo
fac=20.0/maxval(s)
s=fac*s
call indexx(candidate0(1,1:ncand),ncand,indx)
do i=1,ncand
j=indx(i)
candidate(1,i)=abs(candidate0(1,j))
candidate(2,i)=candidate0(2,j)
candidate(3,i)=candidate0(3,j)
enddo
return
end subroutine sync8
@@ -0,0 +1,727 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// no include guards, this file is intended for multiple inclusion
// input: BOOST_FT_syntax type macro to use
// input: BOOST_FT_cc empty or cc specifier
// input: BOOST_FT_ell empty or "..."
// input: BOOST_FT_cv empty or cv qualifiers
// input: BOOST_FT_flags single decimal integer encoding the flags
// output: BOOST_FT_n number of component types (arity+1)
// output: BOOST_FT_arity current arity
// output: BOOST_FT_type macro that expands to the type
// output: BOOST_FT_tplargs(p) template arguments with given prefix
// output: BOOST_FT_params(p) parameters with given prefix
# include <boost/function_types/detail/synthesize_impl/arity20_1.hpp>
# define BOOST_FT_make_type(flags,cc,arity) BOOST_FT_make_type_impl(flags,cc,arity)
# define BOOST_FT_make_type_impl(flags,cc,arity) make_type_ ## flags ## _ ## cc ## _ ## arity
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 22 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,21)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 23 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,22)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 24 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,23)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 25 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,24)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 26 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,25)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 27 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
typedef typename mpl::next< iter_25 > ::type iter_26;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,26)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
, typename mpl::deref< iter_26 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 28 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
typedef typename mpl::next< iter_25 > ::type iter_26;
typedef typename mpl::next< iter_26 > ::type iter_27;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,27)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
, typename mpl::deref< iter_26 > ::type
, typename mpl::deref< iter_27 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 29 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
typedef typename mpl::next< iter_25 > ::type iter_26;
typedef typename mpl::next< iter_26 > ::type iter_27;
typedef typename mpl::next< iter_27 > ::type iter_28;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,28)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
, typename mpl::deref< iter_26 > ::type
, typename mpl::deref< iter_27 > ::type
, typename mpl::deref< iter_28 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 30 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
typedef typename mpl::next< iter_25 > ::type iter_26;
typedef typename mpl::next< iter_26 > ::type iter_27;
typedef typename mpl::next< iter_27 > ::type iter_28;
typedef typename mpl::next< iter_28 > ::type iter_29;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,29)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
, typename mpl::deref< iter_26 > ::type
, typename mpl::deref< iter_27 > ::type
, typename mpl::deref< iter_28 > ::type
, typename mpl::deref< iter_29 > ::type
> ::type type;
};
};
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 >
struct BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30)
{
typedef BOOST_FT_syntax(BOOST_FT_cc,type BOOST_PP_EMPTY) (T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 BOOST_FT_ell) BOOST_FT_cv ;
};
template< >
struct synthesize_impl_o< BOOST_FT_flags, BOOST_FT_cc_id, 31 >
{
template<typename S> struct synthesize_impl_i
{
private:
typedef typename mpl::begin<S> ::type iter_0;
typedef typename mpl::next< iter_0 > ::type iter_1;
typedef typename mpl::next< iter_1 > ::type iter_2;
typedef typename mpl::next< iter_2 > ::type iter_3;
typedef typename mpl::next< iter_3 > ::type iter_4;
typedef typename mpl::next< iter_4 > ::type iter_5;
typedef typename mpl::next< iter_5 > ::type iter_6;
typedef typename mpl::next< iter_6 > ::type iter_7;
typedef typename mpl::next< iter_7 > ::type iter_8;
typedef typename mpl::next< iter_8 > ::type iter_9;
typedef typename mpl::next< iter_9 > ::type iter_10;
typedef typename mpl::next< iter_10 > ::type iter_11;
typedef typename mpl::next< iter_11 > ::type iter_12;
typedef typename mpl::next< iter_12 > ::type iter_13;
typedef typename mpl::next< iter_13 > ::type iter_14;
typedef typename mpl::next< iter_14 > ::type iter_15;
typedef typename mpl::next< iter_15 > ::type iter_16;
typedef typename mpl::next< iter_16 > ::type iter_17;
typedef typename mpl::next< iter_17 > ::type iter_18;
typedef typename mpl::next< iter_18 > ::type iter_19;
typedef typename mpl::next< iter_19 > ::type iter_20;
typedef typename mpl::next< iter_20 > ::type iter_21;
typedef typename mpl::next< iter_21 > ::type iter_22;
typedef typename mpl::next< iter_22 > ::type iter_23;
typedef typename mpl::next< iter_23 > ::type iter_24;
typedef typename mpl::next< iter_24 > ::type iter_25;
typedef typename mpl::next< iter_25 > ::type iter_26;
typedef typename mpl::next< iter_26 > ::type iter_27;
typedef typename mpl::next< iter_27 > ::type iter_28;
typedef typename mpl::next< iter_28 > ::type iter_29;
typedef typename mpl::next< iter_29 > ::type iter_30;
public:
typedef typename detail::BOOST_FT_make_type(BOOST_FT_flags,BOOST_FT_cc_id,30)
< typename mpl::deref< iter_0 > ::type
, typename detail::cv_traits<
typename mpl::deref< iter_1 > ::type > ::type
, typename mpl::deref< iter_2 > ::type
, typename mpl::deref< iter_3 > ::type
, typename mpl::deref< iter_4 > ::type
, typename mpl::deref< iter_5 > ::type
, typename mpl::deref< iter_6 > ::type
, typename mpl::deref< iter_7 > ::type
, typename mpl::deref< iter_8 > ::type
, typename mpl::deref< iter_9 > ::type
, typename mpl::deref< iter_10 > ::type
, typename mpl::deref< iter_11 > ::type
, typename mpl::deref< iter_12 > ::type
, typename mpl::deref< iter_13 > ::type
, typename mpl::deref< iter_14 > ::type
, typename mpl::deref< iter_15 > ::type
, typename mpl::deref< iter_16 > ::type
, typename mpl::deref< iter_17 > ::type
, typename mpl::deref< iter_18 > ::type
, typename mpl::deref< iter_19 > ::type
, typename mpl::deref< iter_20 > ::type
, typename mpl::deref< iter_21 > ::type
, typename mpl::deref< iter_22 > ::type
, typename mpl::deref< iter_23 > ::type
, typename mpl::deref< iter_24 > ::type
, typename mpl::deref< iter_25 > ::type
, typename mpl::deref< iter_26 > ::type
, typename mpl::deref< iter_27 > ::type
, typename mpl::deref< iter_28 > ::type
, typename mpl::deref< iter_29 > ::type
, typename mpl::deref< iter_30 > ::type
> ::type type;
};
};
# undef BOOST_FT_make_type
# undef BOOST_FT_make_type_impl
@@ -0,0 +1,229 @@
// Boost.Range library
//
// Copyright Neil Groves 2014.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_ADAPTOR_FORMATTED_HPP_INCLUDED
#define BOOST_RANGE_ADAPTOR_FORMATTED_HPP_INCLUDED
#include <boost/config.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/begin.hpp>
#include <boost/range/end.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/iterator_range_core.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_array.hpp>
#include <boost/type_traits/remove_extent.hpp>
#include <ostream>
namespace boost
{
namespace range_detail
{
template<typename Sep, typename Prefix, typename Postfix>
struct formatted_holder
{
typedef typename boost::mpl::if_<
boost::is_array<Sep>,
const typename boost::remove_extent<Sep>::type*,
Sep
>::type separator_t;
typedef typename boost::mpl::if_<
boost::is_array<Prefix>,
const typename boost::remove_extent<Prefix>::type*,
Prefix
>::type prefix_t;
typedef typename boost::mpl::if_<
boost::is_array<Postfix>,
const typename boost::remove_extent<Postfix>::type*,
Postfix
>::type postfix_t;
formatted_holder(
const separator_t& sep,
const prefix_t& prefix,
const postfix_t& postfix)
: m_sep(sep)
, m_prefix(prefix)
, m_postfix(postfix)
{
}
separator_t m_sep;
prefix_t m_prefix;
postfix_t m_postfix;
};
template<typename Iter, typename Sep, typename Prefix, typename Postfix>
class formatted_range
: public boost::iterator_range<Iter>
{
typedef formatted_holder<Sep,Prefix,Postfix> holder_t;
public:
formatted_range(Iter first, Iter last, const holder_t& holder)
: boost::iterator_range<Iter>(first, last)
, m_holder(holder)
{
}
template<typename OStream>
void write(OStream& out) const
{
Iter it(this->begin());
out << m_holder.m_prefix;
if (it != this->end())
{
out << *it;
for (++it; it != this->end(); ++it)
{
out << m_holder.m_sep << *it;
}
}
out << m_holder.m_postfix;
}
private:
holder_t m_holder;
};
template<
typename SinglePassRange,
typename Sep,
typename Prefix,
typename Postfix
>
inline range_detail::formatted_range<
typename range_iterator<const SinglePassRange>::type, Sep, Prefix, Postfix
>
operator|(
const SinglePassRange& rng,
const range_detail::formatted_holder<Sep,Prefix,Postfix>& holder
)
{
typedef typename range_iterator<const SinglePassRange>::type iterator;
return range_detail::formatted_range<iterator, Sep, Prefix, Postfix>(
boost::begin(rng), boost::end(rng), holder);
}
template<typename Char, typename Traits, typename Iter, typename Sep,
typename Prefix, typename Postfix>
std::basic_ostream<Char, Traits>&
operator<<(
std::basic_ostream<Char, Traits>& out,
const formatted_range<Iter, Sep, Prefix, Postfix>& writer)
{
writer.write(out);
return out;
}
} // namespace range_detail
namespace adaptors
{
template<typename Sep, typename Prefix, typename Postfix>
range_detail::formatted_holder<Sep, Prefix, Postfix>
formatted(const Sep& sep, const Prefix& prefix, const Postfix& postfix)
{
return range_detail::formatted_holder<Sep,Prefix,Postfix>(
sep, prefix, postfix);
}
template<typename Sep, typename Prefix>
range_detail::formatted_holder<Sep, Prefix, char>
formatted(const Sep& sep, const Prefix& prefix)
{
return range_detail::formatted_holder<Sep, Prefix, char>(sep, prefix, '}');
}
template<typename Sep>
range_detail::formatted_holder<Sep, char, char>
formatted(const Sep& sep)
{
return range_detail::formatted_holder<Sep, char, char>(sep, '{', '}');
}
inline range_detail::formatted_holder<char, char, char>
formatted()
{
return range_detail::formatted_holder<char, char, char>(',', '{', '}');
}
using range_detail::formatted_range;
template<typename SinglePassRange, typename Sep, typename Prefix,
typename Postfix>
inline boost::range_detail::formatted_range<
typename boost::range_iterator<const SinglePassRange>::type,
Sep, Prefix, Postfix
>
format(
const SinglePassRange& rng,
const Sep& sep,
const Prefix& prefix,
const Postfix& postfix
)
{
typedef typename boost::range_iterator<const SinglePassRange>::type
iterator_t;
typedef boost::range_detail::formatted_range<
iterator_t, Sep, Prefix, Postfix> result_t;
typedef boost::range_detail::formatted_holder<Sep, Prefix, Postfix>
holder_t;
return result_t(boost::begin(rng), boost::end(rng),
holder_t(sep, prefix, postfix));
}
template<typename SinglePassRange, typename Sep, typename Prefix>
inline boost::range_detail::formatted_range<
typename boost::range_iterator<const SinglePassRange>::type,
Sep, Prefix, char
>
format(
const SinglePassRange& rng,
const Sep& sep,
const Prefix& prefix)
{
return adaptors::format<SinglePassRange, Sep, Prefix, char>(rng, sep, prefix, '}');
}
template<typename SinglePassRange, typename Sep>
inline boost::range_detail::formatted_range<
typename boost::range_iterator<const SinglePassRange>::type,
Sep, char, char
>
format(const SinglePassRange& rng, const Sep& sep)
{
return adaptors::format<SinglePassRange, Sep, char, char>(rng, sep, '{', '}');
}
template<typename SinglePassRange>
inline boost::range_detail::formatted_range<
typename boost::range_iterator<const SinglePassRange>::type,
char, char, char
>
format(const SinglePassRange& rng)
{
return adaptors::format<SinglePassRange, char, char, char>(rng, ',', '{', '}');
}
} // namespace adaptors
namespace range
{
using boost::range_detail::formatted_range;
} // namespace range
} // namespace boost
#endif // include guard
@@ -0,0 +1,34 @@
CC = gcc
#CC = clang-3.5
FC = gfortran
CFLAGS= -I/usr/include -Wall -Wno-missing-braces -O3 -ffast-math
LDFLAGS = -L/usr/lib
FFLAGS = -O2 -Wall -Wno-conversion
LIBS = -lfftw3f -lm
# Default rules
%.o: %.c $(DEPS)
${CC} ${CFLAGS} -c $<
%.o: %.f
${FC} ${FFLAGS} -c $<
%.o: %.F
${FC} ${FFLAGS} -c $<
%.o: %.f90
${FC} ${FFLAGS} -c $<
%.o: %.F90
${FC} ${FFLAGS} -c $<
all: wsprd wsprsim wsprd_exp
DEPS = wsprsim_utils.h wsprd_utils.h fano.h jelinek.h nhash.h
OBJS1 = wsprd.o wsprsim_utils.o wsprd_utils.o tab.o fano.o jelinek.o nhash.o
wsprd: $(OBJS1)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LIBS)
OBJS2 = wsprsim.o wsprsim_utils.o wsprd_utils.o tab.o fano.o nhash.o
wsprsim: $(OBJS2)
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LIBS)
clean:
rm *.o wsprd wsprsim
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,27 @@
#ifndef DOUBLE_CLICKABLE_RADIO_BUTTON_HPP_
#define DOUBLE_CLICKABLE_RADIO_BUTTON_HPP_
#include <QRadioButton>
//
// DoubleClickableRadioButton - QRadioButton that emits a mouse double
// click signal
//
// Clients should be aware of the QWidget::mouseDoubleClickEvent()
// notes about receipt of mouse press and mouse release events.
//
class DoubleClickableRadioButton
: public QRadioButton
{
Q_OBJECT
public:
DoubleClickableRadioButton (QWidget * = nullptr);
Q_SIGNAL void doubleClicked ();
protected:
void mouseDoubleClickEvent (QMouseEvent *) override;
};
#endif
@@ -0,0 +1,317 @@
// (C) Copyright Howard Hinnant
// (C) Copyright 2011 Vicente J. Botet Escriba
// Use, modification and distribution are subject to the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt).
//
/**
* Duration formatting facet for output.
*/
#ifndef BOOST_CHRONO_IO_DURATION_PUT_HPP
#define BOOST_CHRONO_IO_DURATION_PUT_HPP
#include <boost/chrono/config.hpp>
#include <boost/chrono/io/duration_units.hpp>
#include <boost/chrono/process_cpu_clocks.hpp>
#include <boost/assert.hpp>
#include <locale>
namespace boost
{
namespace chrono
{
namespace detail
{
template <class T>
struct propagate {
typedef T type;
};
template <>
struct propagate<boost::int_least32_t> {
typedef boost::int_least64_t type;
};
}
/**
* @tparam ChatT a character type
* @tparam OutputIterator a model of @c OutputIterator
*
* The @c duration_put facet provides facilities for formatted output of duration values.
* The member function of @c duration_put take a duration and format it into character string representation.
*
*/
template <class CharT, class OutputIterator = std::ostreambuf_iterator<CharT> >
class duration_put: public std::locale::facet
{
public:
/**
* Type of character the facet is instantiated on.
*/
typedef CharT char_type;
/**
* Type of character string passed to member functions.
*/
typedef std::basic_string<CharT> string_type;
/**
* Type of iterator used to write in the character buffer.
*/
typedef OutputIterator iter_type;
/**
* Construct a duration_put facet.
* @param refs
* @Effects Construct a duration_put facet.
* If the @c refs argument is @c 0 then destruction of the object is
* delegated to the @c locale, or locales, containing it. This allows
* the user to ignore lifetime management issues. On the other had,
* if @c refs is @c 1 then the object must be explicitly deleted;
* the @c locale will not do so. In this case, the object can be
* maintained across the lifetime of multiple locales.
*/
explicit duration_put(size_t refs = 0) :
std::locale::facet(refs)
{
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @param pattern begin of the formatting pattern
* @param pat_end end of the formatting pattern
*
* @Effects Steps through the sequence from @c pattern to @c pat_end,
* identifying characters that are part of a pattern sequence. Each character
* that is not part of a pattern sequence is written to @c s immediately, and
* each pattern sequence, as it is identified, results in a call to
* @c put_value or @c put_unit;
* thus, pattern elements and other characters are interleaved in the output
* in the order in which they appear in the pattern. Pattern sequences are
* identified by converting each character @c c to a @c char value as if by
* @c ct.narrow(c,0), where @c ct is a reference to @c ctype<charT> obtained from
* @c ios.getloc(). The first character of each sequence is equal to @c '%',
* followed by a pattern specifier character @c spec, which can be @c 'v' for
* the duration value or @c 'u' for the duration unit. .
* For each valid pattern sequence identified, calls
* <c>put_value(s, ios, fill, d)</c> or <c>put_unit(s, ios, fill, d)</c>.
*
* @Returns An iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const CharT* pattern,
const CharT* pat_end, const char_type* val = 0) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
return put(facet, s, ios, fill, d, pattern, pat_end, val);
}
else
{
duration_units_default<CharT> facet;
return put(facet, s, ios, fill, d, pattern, pat_end, val);
}
}
template <typename Rep, typename Period>
iter_type put(duration_units<CharT> const& units_facet, iter_type s, std::ios_base& ios, char_type fill,
duration<Rep, Period> const& d, const CharT* pattern, const CharT* pat_end, const char_type* val = 0) const
{
const std::ctype<char_type>& ct = std::use_facet<std::ctype<char_type> >(ios.getloc());
for (; pattern != pat_end; ++pattern)
{
if (ct.narrow(*pattern, 0) == '%')
{
if (++pattern == pat_end)
{
*s++ = pattern[-1];
break;
}
char fmt = ct.narrow(*pattern, 0);
switch (fmt)
{
case 'v':
{
s = put_value(s, ios, fill, d, val);
break;
}
case 'u':
{
s = put_unit(units_facet, s, ios, fill, d);
break;
}
default:
BOOST_ASSERT(false && "Boost::Chrono internal error.");
break;
}
}
else
*s++ = *pattern;
}
return s;
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects imbue in @c ios the @c duration_units_default facet if not already present.
* Retrieves Stores the duration pattern from the @c duration_unit facet in let say @c str. Last as if
* @code
* return put(s, ios, d, str.data(), str.data() + str.size());
* @endcode
* @Returns An iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const char_type* val = 0) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, s, ios, fill, d, str.data(), str.data() + str.size(), val);
}
else
{
duration_units_default<CharT> facet;
std::basic_string<CharT> str = facet.get_pattern();
return put(facet, s, ios, fill, d, str.data(), str.data() + str.size(), val);
}
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects As if s=std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, static_cast<long int> (d.count())).
* @Returns s, iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put_value(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d, const char_type* val = 0) const
{
if (val)
{
while (*val) {
*s = *val;
s++; val++;
}
return s;
}
return std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill,
static_cast<typename detail::propagate<Rep>::type> (d.count()));
}
template <typename Rep, typename Period>
iter_type put_value(iter_type s, std::ios_base& ios, char_type fill, duration<process_times<Rep>, Period> const& d, const char_type* = 0) const
{
*s++ = CharT('{');
s = put_value(s, ios, fill, process_real_cpu_clock::duration(d.count().real));
*s++ = CharT(';');
s = put_value(s, ios, fill, process_user_cpu_clock::duration(d.count().user));
*s++ = CharT(';');
s = put_value(s, ios, fill, process_system_cpu_clock::duration(d.count().system));
*s++ = CharT('}');
return s;
}
/**
*
* @param s an output stream iterator
* @param ios a reference to a ios_base
* @param fill the character used as filler
* @param d the duration
* @Effects Let facet be the duration_units<CharT> facet associated to ios. If the associated unit is named,
* as if
* @code
string_type str = facet.get_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
* @endcode
* Otherwise, format the unit as "[Period::num/Period::den]" followed by the unit associated to [N/D] obtained using facet.get_n_d_unit(get_duration_style(ios), d)
* @Returns s, iterator pointing immediately after the last character produced.
*/
template <typename Rep, typename Period>
iter_type put_unit(iter_type s, std::ios_base& ios, char_type fill, duration<Rep, Period> const& d) const
{
if (std::has_facet<duration_units<CharT> >(ios.getloc()))
{
duration_units<CharT> const&facet = std::use_facet<duration_units<CharT> >(
ios.getloc());
return put_unit(facet, s, ios, fill, d);
}
else
{
duration_units_default<CharT> facet;
return put_unit(facet, s, ios, fill, d);
}
}
template <typename Rep, typename Period>
iter_type put_unit(duration_units<CharT> const& facet, iter_type s, std::ios_base& ios, char_type fill,
duration<Rep, Period> const& d) const
{
if (facet.template is_named_unit<Period>()) {
string_type str = facet.get_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
} else {
*s++ = CharT('[');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::num);
*s++ = CharT('/');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::den);
*s++ = CharT(']');
string_type str = facet.get_n_d_unit(get_duration_style(ios), d);
s=std::copy(str.begin(), str.end(), s);
}
return s;
}
template <typename Rep, typename Period>
iter_type put_unit(duration_units<CharT> const& facet, iter_type s, std::ios_base& ios, char_type fill,
duration<process_times<Rep>, Period> const& d) const
{
duration<Rep,Period> real(d.count().real);
if (facet.template is_named_unit<Period>()) {
string_type str = facet.get_unit(get_duration_style(ios), real);
s=std::copy(str.begin(), str.end(), s);
} else {
*s++ = CharT('[');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::num);
*s++ = CharT('/');
std::use_facet<std::num_put<CharT, iter_type> >(ios.getloc()).put(s, ios, fill, Period::den);
*s++ = CharT(']');
string_type str = facet.get_n_d_unit(get_duration_style(ios), real);
s=std::copy(str.begin(), str.end(), s);
}
return s;
}
/**
* Unique identifier for this type of facet.
*/
static std::locale::id id;
/**
* @Effects Destroy the facet
*/
~duration_put()
{
}
};
template <class CharT, class OutputIterator>
std::locale::id duration_put<CharT, OutputIterator>::id;
} // chrono
} // boost
#endif // header
@@ -0,0 +1,87 @@
// Copyright (C) 2004-2006 The Trustees of Indiana University.
// Use, modification and distribution is subject to the Boost Software
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// Authors: Douglas Gregor
// Andrew Lumsdaine
// The placement of this #include probably looks very odd relative to
// the #ifndef/#define pair below. However, this placement is
// extremely important to allow the various property map headers to be
// included in any order.
#include <boost/property_map/property_map.hpp>
#ifndef BOOST_PARALLEL_LOCAL_PROPERTY_MAP_HPP
#define BOOST_PARALLEL_LOCAL_PROPERTY_MAP_HPP
#include <boost/assert.hpp>
namespace boost {
/** Property map that accesses an underlying, local property map
* using a subset of the global keys.
*/
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
class local_property_map
{
typedef typename property_traits<GlobalMap>::value_type owner_local_pair;
public:
typedef ProcessGroup process_group_type;
typedef typename property_traits<StorageMap>::value_type value_type;
typedef typename property_traits<GlobalMap>::key_type key_type;
typedef typename property_traits<StorageMap>::reference reference;
typedef typename property_traits<StorageMap>::category category;
local_property_map() { }
local_property_map(const ProcessGroup& process_group,
const GlobalMap& global, const StorageMap& storage)
: process_group_(process_group), global_(global), storage(storage) { }
reference operator[](const key_type& key)
{
owner_local_pair p = get(global_, key);
BOOST_ASSERT(p.first == process_id(process_group_));
return storage[p.second];
}
GlobalMap& global() const { return global_; }
StorageMap& base() const { return storage; }
ProcessGroup& process_group() { return process_group_; }
const ProcessGroup& process_group() const { return process_group_; }
private:
ProcessGroup process_group_;
mutable GlobalMap global_;
mutable StorageMap storage;
};
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline
typename local_property_map<ProcessGroup, GlobalMap, StorageMap>::reference
get(const local_property_map<ProcessGroup, GlobalMap, StorageMap>& pm,
typename local_property_map<ProcessGroup, GlobalMap, StorageMap>::key_type
const & key)
{
typename property_traits<GlobalMap>::value_type p = get(pm.global(), key);
return get(pm.base(), p.second);
}
template<typename ProcessGroup, typename GlobalMap, typename StorageMap>
inline void
put(const local_property_map<ProcessGroup, GlobalMap, StorageMap>& pm,
typename local_property_map<ProcessGroup, GlobalMap, StorageMap>
::key_type const & key,
typename local_property_map<ProcessGroup, GlobalMap, StorageMap>
::value_type const& v)
{
typename property_traits<GlobalMap>::value_type p = get(pm.global(), key);
BOOST_ASSERT(p.first == process_id(pm.process_group()));
put(pm.base(), p.second, v);
}
} // end namespace boost
#endif // BOOST_PARALLEL_LOCAL_PROPERTY_MAP_HPP
@@ -0,0 +1,46 @@
A text box entitled Astronomical Data provides information needed for
tracking the sun or moon, compensating for EME Doppler shift, and
estimating EME Doppler spread and path degradation. Toggle the
*Astronomical data* on the *View* menu to display or hide this window.
image::AstroData_2.png[align="center",alt="Astronomical Data"]
Available information includes the current UTC *Date* and time; *Az*
and *El*, azimuth and elevation of the moon at your own location, in
degrees; *SelfDop*, *Width*, and *Delay*, the Doppler shift, full
limb-to-limb Doppler spread in Hz, and delay of your own EME echoes in
seconds; and *DxAz* and *DxEl*, *DxDop*, and *DxWid*, corresponding
parameters for a station located at the *DX Grid* entered on the main
window. These numbers are followed by *Dec*, the declination of the
moon; *SunAz* and *SunEl*, the azimuth and elevation of the Sun;
*Freq*, your stated operating frequency in MHz; *Tsky*, the estimated
sky background temperature in the direction of the moon, scaled to the
operating frequency; *Dpol*, the spatial polarization offset in
degrees; *MNR*, the maximum non-reciprocity of the EME path in dB,
owing to a combination of Faraday rotation and spatial polarization;
and finally *Dgrd*, an estimate of the signal degradation in dB,
relative to the best possible time with the moon at perigee in a cold
part of the sky.
The state of the art for establishing three-dimensional locations of
the sun, moon, and planets at a specified time is embodied in a
numerical model of the solar system maintained at the Jet Propulsion
Laboratory. The model has been numerically integrated to produce
tabular data that can be interpolated with very high accuracy. For
example, the celestial coordinates of the moon or a planet can be
determined at a specified time to within about 0.0000003 degrees. The
JPL ephemeris tables and interpolation routines have been incorporated
into _WSJT-X_. Further details on accuracy, especially concerning
calculated EME Doppler shifts, are described in {lunarEchoes} for
November-December, 2016.
The sky background temperatures reported by _WSJT-X_ are derived from
the all-sky 408 MHz map of Haslam et al. (Astronomy and Astrophysics
Supplement Series, 47, 1, 1982), scaled by frequency to the -2.6
power. This map has angular resolution of about 1 degree, and of
course most amateur EME antennas have much broader beamwidths than
this. Your antenna will therefore smooth out the hot spots
considerably, and the observed extremes of sky temperature will be
less. Unless you understand your sidelobes and ground reflections
extremely well, it is unlikely that more accurate sky temperatures
would be of much practical use.