Initial Commit
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
|
||||
#ifndef BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
|
||||
#define BOOST_MPL_SET_AUX_HAS_KEY_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/set/aux_/tag.hpp>
|
||||
#include <boost/mpl/has_key_fwd.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/overload_names.hpp>
|
||||
#include <boost/mpl/aux_/static_cast.hpp>
|
||||
#include <boost/mpl/aux_/yes_no.hpp>
|
||||
#include <boost/mpl/aux_/type_wrapper.hpp>
|
||||
#include <boost/mpl/aux_/config/workaround.hpp>
|
||||
#include <boost/mpl/aux_/config/static_constant.hpp>
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct has_key_impl< aux::set_tag >
|
||||
{
|
||||
template< typename Set, typename T > struct apply
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) \
|
||||
|| BOOST_WORKAROUND(__EDG_VERSION__, <= 245)
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
|
||||
Set
|
||||
, BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
|
||||
) ) == sizeof(aux::no_tag) )
|
||||
);
|
||||
|
||||
typedef bool_<value> type;
|
||||
|
||||
#else // ISO98 C++
|
||||
: bool_<
|
||||
( sizeof( BOOST_MPL_AUX_OVERLOAD_CALL_IS_MASKED(
|
||||
Set
|
||||
, BOOST_MPL_AUX_STATIC_CAST(aux::type_wrapper<T>*, 0)
|
||||
) ) == sizeof(aux::no_tag) )
|
||||
>
|
||||
{
|
||||
#endif
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
#endif // BOOST_MPL_SET_AUX_HAS_KEY_IMPL_HPP_INCLUDED
|
||||
@@ -0,0 +1,446 @@
|
||||
/* The following code declares class array,
|
||||
* an STL container (as wrapper) for arrays of constant size.
|
||||
*
|
||||
* See
|
||||
* http://www.boost.org/libs/array/
|
||||
* for documentation.
|
||||
*
|
||||
* The original author site is at: http://www.josuttis.com/
|
||||
*
|
||||
* (C) Copyright Nicolai M. Josuttis 2001.
|
||||
*
|
||||
* 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)
|
||||
*
|
||||
* 14 Apr 2012 - (mtc) Added support for boost::hash
|
||||
* 28 Dec 2010 - (mtc) Added cbegin and cend (and crbegin and crend) for C++Ox compatibility.
|
||||
* 10 Mar 2010 - (mtc) fill method added, matching resolution of the standard library working group.
|
||||
* See <http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#776> or Trac issue #3168
|
||||
* Eventually, we should remove "assign" which is now a synonym for "fill" (Marshall Clow)
|
||||
* 10 Mar 2010 - added workaround for SUNCC and !STLPort [trac #3893] (Marshall Clow)
|
||||
* 29 Jan 2004 - c_array() added, BOOST_NO_PRIVATE_IN_AGGREGATE removed (Nico Josuttis)
|
||||
* 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.
|
||||
* 05 Aug 2001 - minor update (Nico Josuttis)
|
||||
* 20 Jan 2001 - STLport fix (Beman Dawes)
|
||||
* 29 Sep 2000 - Initial Revision (Nico Josuttis)
|
||||
*
|
||||
* Jan 29, 2004
|
||||
*/
|
||||
#ifndef BOOST_ARRAY_HPP
|
||||
#define BOOST_ARRAY_HPP
|
||||
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable:4996) // 'std::equal': Function call with parameters that may be unsafe
|
||||
# pragma warning(disable:4510) // boost::array<T,N>' : default constructor could not be generated
|
||||
# pragma warning(disable:4610) // warning C4610: class 'boost::array<T,N>' can never be instantiated - user defined constructor required
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <stdexcept>
|
||||
#include <boost/assert.hpp>
|
||||
#include <boost/swap.hpp>
|
||||
|
||||
// Handles broken standard libraries better than <iterator>
|
||||
#include <boost/detail/iterator.hpp>
|
||||
#include <boost/throw_exception.hpp>
|
||||
#include <boost/functional/hash_fwd.hpp>
|
||||
#include <algorithm>
|
||||
|
||||
// FIXES for broken compilers
|
||||
#include <boost/config.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
|
||||
template<class T, std::size_t N>
|
||||
class array {
|
||||
public:
|
||||
T elems[N]; // fixed-size array of elements of type T
|
||||
|
||||
public:
|
||||
// type definitions
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// iterator support
|
||||
iterator begin() { return elems; }
|
||||
const_iterator begin() const { return elems; }
|
||||
const_iterator cbegin() const { return elems; }
|
||||
|
||||
iterator end() { return elems+N; }
|
||||
const_iterator end() const { return elems+N; }
|
||||
const_iterator cend() const { return elems+N; }
|
||||
|
||||
// reverse iterator support
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
|
||||
// workaround for broken reverse_iterator in VC7
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
|
||||
reference, iterator, reference> > reverse_iterator;
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
|
||||
const_reference, iterator, reference> > const_reverse_iterator;
|
||||
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
|
||||
value_type, reference, iterator, difference_type> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
|
||||
value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
|
||||
#else
|
||||
// workaround for broken reverse_iterator implementations
|
||||
typedef std::reverse_iterator<iterator,T> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
|
||||
#endif
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
const_reverse_iterator crbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
const_reverse_iterator crend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
// operator[]
|
||||
reference operator[](size_type i)
|
||||
{
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
const_reference operator[](size_type i) const
|
||||
{
|
||||
BOOST_ASSERT_MSG( i < N, "out of range" );
|
||||
return elems[i];
|
||||
}
|
||||
|
||||
// at() with range check
|
||||
reference at(size_type i) { rangecheck(i); return elems[i]; }
|
||||
const_reference at(size_type i) const { rangecheck(i); return elems[i]; }
|
||||
|
||||
// front() and back()
|
||||
reference front()
|
||||
{
|
||||
return elems[0];
|
||||
}
|
||||
|
||||
const_reference front() const
|
||||
{
|
||||
return elems[0];
|
||||
}
|
||||
|
||||
reference back()
|
||||
{
|
||||
return elems[N-1];
|
||||
}
|
||||
|
||||
const_reference back() const
|
||||
{
|
||||
return elems[N-1];
|
||||
}
|
||||
|
||||
// size is constant
|
||||
static size_type size() { return N; }
|
||||
static bool empty() { return false; }
|
||||
static size_type max_size() { return N; }
|
||||
enum { static_size = N };
|
||||
|
||||
// swap (note: linear complexity)
|
||||
void swap (array<T,N>& y) {
|
||||
for (size_type i = 0; i < N; ++i)
|
||||
boost::swap(elems[i],y.elems[i]);
|
||||
}
|
||||
|
||||
// direct access to data (read-only)
|
||||
const T* data() const { return elems; }
|
||||
T* data() { return elems; }
|
||||
|
||||
// use array as C array (direct read/write access to data)
|
||||
T* c_array() { return elems; }
|
||||
|
||||
// assignment with type conversion
|
||||
template <typename T2>
|
||||
array<T,N>& operator= (const array<T2,N>& rhs) {
|
||||
std::copy(rhs.begin(),rhs.end(), begin());
|
||||
return *this;
|
||||
}
|
||||
|
||||
// assign one value to all elements
|
||||
void assign (const T& value) { fill ( value ); } // A synonym for fill
|
||||
void fill (const T& value)
|
||||
{
|
||||
std::fill_n(begin(),size(),value);
|
||||
}
|
||||
|
||||
// check range (may be private because it is static)
|
||||
static void rangecheck (size_type i) {
|
||||
if (i >= size()) {
|
||||
std::out_of_range e("array<>: index out of range");
|
||||
boost::throw_exception(e);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
|
||||
template< class T >
|
||||
class array< T, 0 > {
|
||||
|
||||
public:
|
||||
// type definitions
|
||||
typedef T value_type;
|
||||
typedef T* iterator;
|
||||
typedef const T* const_iterator;
|
||||
typedef T& reference;
|
||||
typedef const T& const_reference;
|
||||
typedef std::size_t size_type;
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
|
||||
// iterator support
|
||||
iterator begin() { return iterator( reinterpret_cast< T * >( this ) ); }
|
||||
const_iterator begin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
|
||||
const_iterator cbegin() const { return const_iterator( reinterpret_cast< const T * >( this ) ); }
|
||||
|
||||
iterator end() { return begin(); }
|
||||
const_iterator end() const { return begin(); }
|
||||
const_iterator cend() const { return cbegin(); }
|
||||
|
||||
// reverse iterator support
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) && !defined(BOOST_MSVC_STD_ITERATOR) && !defined(BOOST_NO_STD_ITERATOR_TRAITS)
|
||||
typedef std::reverse_iterator<iterator> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1300) && defined(BOOST_DINKUMWARE_STDLIB) && (BOOST_DINKUMWARE_STDLIB == 310)
|
||||
// workaround for broken reverse_iterator in VC7
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, iterator,
|
||||
reference, iterator, reference> > reverse_iterator;
|
||||
typedef std::reverse_iterator<std::_Ptrit<value_type, difference_type, const_iterator,
|
||||
const_reference, iterator, reference> > const_reverse_iterator;
|
||||
#elif defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
|
||||
typedef std::reverse_iterator<iterator, std::random_access_iterator_tag,
|
||||
value_type, reference, iterator, difference_type> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator, std::random_access_iterator_tag,
|
||||
value_type, const_reference, const_iterator, difference_type> const_reverse_iterator;
|
||||
#else
|
||||
// workaround for broken reverse_iterator implementations
|
||||
typedef std::reverse_iterator<iterator,T> reverse_iterator;
|
||||
typedef std::reverse_iterator<const_iterator,T> const_reverse_iterator;
|
||||
#endif
|
||||
|
||||
reverse_iterator rbegin() { return reverse_iterator(end()); }
|
||||
const_reverse_iterator rbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
const_reverse_iterator crbegin() const {
|
||||
return const_reverse_iterator(end());
|
||||
}
|
||||
|
||||
reverse_iterator rend() { return reverse_iterator(begin()); }
|
||||
const_reverse_iterator rend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
const_reverse_iterator crend() const {
|
||||
return const_reverse_iterator(begin());
|
||||
}
|
||||
|
||||
// operator[]
|
||||
reference operator[](size_type /*i*/)
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference operator[](size_type /*i*/) const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
// at() with range check
|
||||
reference at(size_type /*i*/) { return failed_rangecheck(); }
|
||||
const_reference at(size_type /*i*/) const { return failed_rangecheck(); }
|
||||
|
||||
// front() and back()
|
||||
reference front()
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference front() const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
reference back()
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
const_reference back() const
|
||||
{
|
||||
return failed_rangecheck();
|
||||
}
|
||||
|
||||
// size is constant
|
||||
static size_type size() { return 0; }
|
||||
static bool empty() { return true; }
|
||||
static size_type max_size() { return 0; }
|
||||
enum { static_size = 0 };
|
||||
|
||||
void swap (array<T,0>& /*y*/) {
|
||||
}
|
||||
|
||||
// direct access to data (read-only)
|
||||
const T* data() const { return 0; }
|
||||
T* data() { return 0; }
|
||||
|
||||
// use array as C array (direct read/write access to data)
|
||||
T* c_array() { return 0; }
|
||||
|
||||
// assignment with type conversion
|
||||
template <typename T2>
|
||||
array<T,0>& operator= (const array<T2,0>& ) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
// assign one value to all elements
|
||||
void assign (const T& value) { fill ( value ); }
|
||||
void fill (const T& ) {}
|
||||
|
||||
// check range (may be private because it is static)
|
||||
static reference failed_rangecheck () {
|
||||
std::out_of_range e("attempt to access element of an empty array");
|
||||
boost::throw_exception(e);
|
||||
#if defined(BOOST_NO_EXCEPTIONS) || (!defined(BOOST_MSVC) && !defined(__PATHSCALE__))
|
||||
//
|
||||
// We need to return something here to keep
|
||||
// some compilers happy: however we will never
|
||||
// actually get here....
|
||||
//
|
||||
static T placeholder;
|
||||
return placeholder;
|
||||
#endif
|
||||
}
|
||||
};
|
||||
#endif
|
||||
|
||||
// comparisons
|
||||
template<class T, std::size_t N>
|
||||
bool operator== (const array<T,N>& x, const array<T,N>& y) {
|
||||
return std::equal(x.begin(), x.end(), y.begin());
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator< (const array<T,N>& x, const array<T,N>& y) {
|
||||
return std::lexicographical_compare(x.begin(),x.end(),y.begin(),y.end());
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator!= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(x==y);
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator> (const array<T,N>& x, const array<T,N>& y) {
|
||||
return y<x;
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator<= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(y<x);
|
||||
}
|
||||
template<class T, std::size_t N>
|
||||
bool operator>= (const array<T,N>& x, const array<T,N>& y) {
|
||||
return !(x<y);
|
||||
}
|
||||
|
||||
// global swap()
|
||||
template<class T, std::size_t N>
|
||||
inline void swap (array<T,N>& x, array<T,N>& y) {
|
||||
x.swap(y);
|
||||
}
|
||||
|
||||
#if defined(__SUNPRO_CC)
|
||||
// Trac ticket #4757; the Sun Solaris compiler can't handle
|
||||
// syntax like 'T(&get_c_array(boost::array<T,N>& arg))[N]'
|
||||
//
|
||||
// We can't just use this for all compilers, because the
|
||||
// borland compilers can't handle this form.
|
||||
namespace detail {
|
||||
template <typename T, std::size_t N> struct c_array
|
||||
{
|
||||
typedef T type[N];
|
||||
};
|
||||
}
|
||||
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
typename detail::c_array<T,N>::type& get_c_array(boost::array<T,N>& arg)
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
typename const detail::c_array<T,N>::type& get_c_array(const boost::array<T,N>& arg)
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
#else
|
||||
// Specific for boost::array: simply returns its elems data member.
|
||||
template <typename T, std::size_t N>
|
||||
T(&get_c_array(boost::array<T,N>& arg))[N]
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
|
||||
// Const version.
|
||||
template <typename T, std::size_t N>
|
||||
const T(&get_c_array(const boost::array<T,N>& arg))[N]
|
||||
{
|
||||
return arg.elems;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
// Overload for std::array, assuming that std::array will have
|
||||
// explicit conversion functions as discussed at the WG21 meeting
|
||||
// in Summit, March 2009.
|
||||
template <typename T, std::size_t N>
|
||||
T(&get_c_array(std::array<T,N>& arg))[N]
|
||||
{
|
||||
return static_cast<T(&)[N]>(arg);
|
||||
}
|
||||
|
||||
// Const version.
|
||||
template <typename T, std::size_t N>
|
||||
const T(&get_c_array(const std::array<T,N>& arg))[N]
|
||||
{
|
||||
return static_cast<T(&)[N]>(arg);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
template<class T, std::size_t N>
|
||||
std::size_t hash_value(const array<T,N>& arr)
|
||||
{
|
||||
return boost::hash_range(arr.begin(), arr.end());
|
||||
}
|
||||
|
||||
} /* namespace boost */
|
||||
|
||||
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, >= 1400)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif /*BOOST_ARRAY_HPP*/
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "DoubleClickablePushButton.hpp"
|
||||
|
||||
#include "moc_DoubleClickablePushButton.cpp"
|
||||
|
||||
DoubleClickablePushButton::DoubleClickablePushButton (QWidget * parent)
|
||||
: QPushButton {parent}
|
||||
{
|
||||
}
|
||||
|
||||
void DoubleClickablePushButton::mouseDoubleClickEvent (QMouseEvent * event)
|
||||
{
|
||||
Q_EMIT doubleClicked ();
|
||||
QPushButton::mouseDoubleClickEvent (event);
|
||||
}
|
||||
@@ -0,0 +1,648 @@
|
||||
// -*- Mode: C++ -*-
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
#ifdef QT5
|
||||
#include <QtWidgets>
|
||||
#else
|
||||
#include <QtGui>
|
||||
#endif
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include <QDateTime>
|
||||
#include <QList>
|
||||
#include <QAudioDeviceInfo>
|
||||
#include <QScopedPointer>
|
||||
#include <QDir>
|
||||
#include <QProgressDialog>
|
||||
#include <QAbstractSocket>
|
||||
#include <QHostAddress>
|
||||
#include <QPointer>
|
||||
#include <QSet>
|
||||
#include <QVector>
|
||||
#include <QFuture>
|
||||
#include <QFutureWatcher>
|
||||
|
||||
#include "AudioDevice.hpp"
|
||||
#include "commons.h"
|
||||
#include "Radio.hpp"
|
||||
#include "Modes.hpp"
|
||||
#include "FrequencyList.hpp"
|
||||
#include "Configuration.hpp"
|
||||
#include "WSPRBandHopping.hpp"
|
||||
#include "Transceiver.hpp"
|
||||
#include "DisplayManual.hpp"
|
||||
#include "psk_reporter.h"
|
||||
#include "logbook/logbook.h"
|
||||
#include "commons.h"
|
||||
#include "astro.h"
|
||||
#include "MessageBox.hpp"
|
||||
#include "NetworkAccessManager.hpp"
|
||||
|
||||
#define NUM_JT4_SYMBOLS 206 //(72+31)*2, embedded sync
|
||||
#define NUM_JT65_SYMBOLS 126 //63 data + 63 sync
|
||||
#define NUM_JT9_SYMBOLS 85 //69 data + 16 sync
|
||||
#define NUM_WSPR_SYMBOLS 162 //(50+31)*2, embedded sync
|
||||
#define NUM_WSPR_LF_SYMBOLS 412 //300 data + 109 sync + 3 ramp
|
||||
#define NUM_ISCAT_SYMBOLS 1291 //30*11025/256
|
||||
#define NUM_MSK144_SYMBOLS 144 //s8 + d48 + s8 + d80
|
||||
#define NUM_QRA64_SYMBOLS 84 //63 data + 21 sync
|
||||
#define NUM_FT8_SYMBOLS 79
|
||||
#define NUM_CW_SYMBOLS 250
|
||||
#define TX_SAMPLE_RATE 48000
|
||||
#define N_WIDGETS 24
|
||||
|
||||
extern int volatile itone[NUM_ISCAT_SYMBOLS]; //Audio tones for all Tx symbols
|
||||
extern int volatile icw[NUM_CW_SYMBOLS]; //Dits for CW ID
|
||||
|
||||
//--------------------------------------------------------------- MainWindow
|
||||
namespace Ui {
|
||||
class MainWindow;
|
||||
}
|
||||
|
||||
class QSettings;
|
||||
class QLineEdit;
|
||||
class QFont;
|
||||
class QHostInfo;
|
||||
class EchoGraph;
|
||||
class FastGraph;
|
||||
class WideGraph;
|
||||
class LogQSO;
|
||||
class Transceiver;
|
||||
class MessageAveraging;
|
||||
class MessageClient;
|
||||
class QTime;
|
||||
class WSPRBandHopping;
|
||||
class HelpTextWindow;
|
||||
class WSPRNet;
|
||||
class SoundOutput;
|
||||
class Modulator;
|
||||
class SoundInput;
|
||||
class Detector;
|
||||
class SampleDownloader;
|
||||
class MultiSettings;
|
||||
class EqualizationToolsDialog;
|
||||
class DecodedText;
|
||||
|
||||
class MainWindow : public QMainWindow
|
||||
{
|
||||
Q_OBJECT;
|
||||
|
||||
public:
|
||||
using Frequency = Radio::Frequency;
|
||||
using FrequencyDelta = Radio::FrequencyDelta;
|
||||
using Mode = Modes::Mode;
|
||||
|
||||
explicit MainWindow(QDir const& temp_directory, bool multiple, MultiSettings *,
|
||||
QSharedMemory *shdmem, unsigned downSampleFactor,
|
||||
QSplashScreen *,
|
||||
QWidget *parent = nullptr);
|
||||
~MainWindow();
|
||||
|
||||
public slots:
|
||||
void showSoundInError(const QString& errorMsg);
|
||||
void showSoundOutError(const QString& errorMsg);
|
||||
void showStatusMessage(const QString& statusMsg);
|
||||
void dataSink(qint64 frames);
|
||||
void fastSink(qint64 frames);
|
||||
void diskDat();
|
||||
void freezeDecode(int n);
|
||||
void guiUpdate();
|
||||
void doubleClickOnCall(bool shift, bool ctrl);
|
||||
void doubleClickOnCall2(bool shift, bool ctrl);
|
||||
void readFromStdout();
|
||||
void p1ReadFromStdout();
|
||||
void setXIT(int n, Frequency base = 0u);
|
||||
void setFreq4(int rxFreq, int txFreq);
|
||||
void msgAvgDecode2();
|
||||
void fastPick(int x0, int x1, int y);
|
||||
|
||||
protected:
|
||||
void keyPressEvent (QKeyEvent *) override;
|
||||
void closeEvent(QCloseEvent *) override;
|
||||
void childEvent(QChildEvent *) override;
|
||||
bool eventFilter(QObject *, QEvent *) override;
|
||||
|
||||
private slots:
|
||||
void initialize_fonts ();
|
||||
void on_tx1_editingFinished();
|
||||
void on_tx2_editingFinished();
|
||||
void on_tx3_editingFinished();
|
||||
void on_tx4_editingFinished();
|
||||
void on_tx5_currentTextChanged (QString const&);
|
||||
void on_tx6_editingFinished();
|
||||
void on_actionSettings_triggered();
|
||||
void on_monitorButton_clicked (bool);
|
||||
void on_actionAbout_triggered();
|
||||
void on_autoButton_clicked (bool);
|
||||
void on_stopTxButton_clicked();
|
||||
void on_stopButton_clicked();
|
||||
void on_actionRelease_Notes_triggered ();
|
||||
void on_actionOnline_User_Guide_triggered();
|
||||
void on_actionLocal_User_Guide_triggered();
|
||||
void on_actionWide_Waterfall_triggered();
|
||||
void on_actionOpen_triggered();
|
||||
void on_actionOpen_next_in_directory_triggered();
|
||||
void on_actionDecode_remaining_files_in_directory_triggered();
|
||||
void on_actionDelete_all_wav_files_in_SaveDir_triggered();
|
||||
void on_actionOpen_log_directory_triggered ();
|
||||
void on_actionNone_triggered();
|
||||
void on_actionSave_all_triggered();
|
||||
void on_actionKeyboard_shortcuts_triggered();
|
||||
void on_actionSpecial_mouse_commands_triggered();
|
||||
void on_DecodeButton_clicked (bool);
|
||||
void decode();
|
||||
void decodeBusy(bool b);
|
||||
void on_EraseButton_clicked();
|
||||
void band_activity_cleared ();
|
||||
void rx_frequency_activity_cleared ();
|
||||
void on_txFirstCheckBox_stateChanged(int arg1);
|
||||
void set_dateTimeQSO(int m_ntx);
|
||||
void set_ntx(int n);
|
||||
void on_txrb1_toggled(bool status);
|
||||
void on_txrb1_doubleClicked ();
|
||||
void on_txrb2_toggled(bool status);
|
||||
void on_txrb3_toggled(bool status);
|
||||
void on_txrb4_toggled(bool status);
|
||||
void on_txrb4_doubleClicked ();
|
||||
void on_txrb5_toggled(bool status);
|
||||
void on_txrb5_doubleClicked ();
|
||||
void on_txrb6_toggled(bool status);
|
||||
void on_txb1_clicked();
|
||||
void on_txb1_doubleClicked ();
|
||||
void on_txb2_clicked();
|
||||
void on_txb3_clicked();
|
||||
void on_txb4_clicked();
|
||||
void on_txb4_doubleClicked ();
|
||||
void on_txb5_clicked();
|
||||
void on_txb5_doubleClicked ();
|
||||
void on_txb6_clicked();
|
||||
void on_lookupButton_clicked();
|
||||
void on_addButton_clicked();
|
||||
void on_dxCallEntry_textChanged (QString const&);
|
||||
void on_dxGridEntry_textChanged (QString const&);
|
||||
void on_dxCallEntry_returnPressed ();
|
||||
void on_genStdMsgsPushButton_clicked();
|
||||
void on_logQSOButton_clicked();
|
||||
void on_actionJT9_triggered();
|
||||
void on_actionJT65_triggered();
|
||||
void on_actionJT9_JT65_triggered();
|
||||
void on_actionJT4_triggered();
|
||||
void on_actionFT8_triggered();
|
||||
void on_TxFreqSpinBox_valueChanged(int arg1);
|
||||
void on_actionSave_decoded_triggered();
|
||||
void on_actionQuickDecode_toggled (bool);
|
||||
void on_actionMediumDecode_toggled (bool);
|
||||
void on_actionDeepestDecode_toggled (bool);
|
||||
void bumpFqso(int n);
|
||||
void on_actionErase_ALL_TXT_triggered();
|
||||
void on_actionErase_wsjtx_log_adi_triggered();
|
||||
void startTx2();
|
||||
void startP1();
|
||||
void stopTx();
|
||||
void stopTx2();
|
||||
void on_pbCallCQ_clicked();
|
||||
void on_pbAnswerCaller_clicked();
|
||||
void on_pbSendRRR_clicked();
|
||||
void on_pbAnswerCQ_clicked();
|
||||
void on_pbSendReport_clicked();
|
||||
void on_pbSend73_clicked();
|
||||
void on_rbGenMsg_clicked(bool checked);
|
||||
void on_rbFreeText_clicked(bool checked);
|
||||
void on_freeTextMsg_currentTextChanged (QString const&);
|
||||
void on_rptSpinBox_valueChanged(int n);
|
||||
void killFile();
|
||||
void on_tuneButton_clicked (bool);
|
||||
void on_pbR2T_clicked();
|
||||
void on_pbT2R_clicked();
|
||||
void acceptQSO2(QDateTime const&, QString const& call, QString const& grid
|
||||
, Frequency dial_freq, QString const& mode
|
||||
, QString const& rpt_sent, QString const& rpt_received
|
||||
, QString const& tx_power, QString const& comments
|
||||
, QString const& name, QDateTime const&);
|
||||
void on_bandComboBox_currentIndexChanged (int index);
|
||||
void on_bandComboBox_activated (int index);
|
||||
void on_readFreq_clicked();
|
||||
void on_pbTxMode_clicked();
|
||||
void on_RxFreqSpinBox_valueChanged(int n);
|
||||
void on_cbTxLock_clicked(bool checked);
|
||||
void on_outAttenuation_valueChanged (int);
|
||||
void rigOpen ();
|
||||
void handle_transceiver_update (Transceiver::TransceiverState const&);
|
||||
void handle_transceiver_failure (QString const& reason);
|
||||
void on_actionAstronomical_data_toggled (bool);
|
||||
void on_actionShort_list_of_add_on_prefixes_and_suffixes_triggered();
|
||||
void band_changed (Frequency);
|
||||
void monitor (bool);
|
||||
void stop_tuning ();
|
||||
void stopTuneATU();
|
||||
void auto_tx_mode(bool);
|
||||
void on_actionMessage_averaging_triggered();
|
||||
void on_actionInclude_averaging_toggled (bool);
|
||||
void on_actionInclude_correlation_toggled (bool);
|
||||
void on_actionEnable_AP_DXcall_toggled (bool);
|
||||
void VHF_features_enabled(bool b);
|
||||
void on_sbSubmode_valueChanged(int n);
|
||||
void on_cbShMsgs_toggled(bool b);
|
||||
void on_cbSWL_toggled(bool b);
|
||||
void on_cbTx6_toggled(bool b);
|
||||
void on_cbMenus_toggled(bool b);
|
||||
void on_cbFirst_toggled(bool b);
|
||||
void on_cbAutoSeq_toggled(bool b);
|
||||
void networkError (QString const&);
|
||||
void on_ClrAvgButton_clicked();
|
||||
void on_actionWSPR_triggered();
|
||||
void on_actionWSPR_LF_triggered();
|
||||
void on_syncSpinBox_valueChanged(int n);
|
||||
void on_TxPowerComboBox_currentIndexChanged(const QString &arg1);
|
||||
void on_sbTxPercent_valueChanged(int n);
|
||||
void on_cbUploadWSPR_Spots_toggled(bool b);
|
||||
void WSPR_config(bool b);
|
||||
void uploadSpots();
|
||||
void TxAgain();
|
||||
void uploadResponse(QString response);
|
||||
void on_WSPRfreqSpinBox_valueChanged(int n);
|
||||
void on_pbTxNext_clicked(bool b);
|
||||
void on_actionEcho_Graph_triggered();
|
||||
void on_actionEcho_triggered();
|
||||
void on_actionISCAT_triggered();
|
||||
void on_actionFast_Graph_triggered();
|
||||
void fast_decode_done();
|
||||
void on_actionMeasure_reference_spectrum_triggered();
|
||||
void on_actionErase_reference_spectrum_triggered();
|
||||
void on_actionMeasure_phase_response_triggered();
|
||||
void on_sbTR_valueChanged (int);
|
||||
void on_sbFtol_valueChanged (int);
|
||||
void on_cbFast9_clicked(bool b);
|
||||
void on_sbCQTxFreq_valueChanged(int n);
|
||||
void on_cbCQTx_toggled(bool b);
|
||||
void on_actionMSK144_triggered();
|
||||
void on_actionQRA64_triggered();
|
||||
void on_actionFreqCal_triggered();
|
||||
void splash_done ();
|
||||
|
||||
private:
|
||||
Q_SIGNAL void initializeAudioOutputStream (QAudioDeviceInfo,
|
||||
unsigned channels, unsigned msBuffered) const;
|
||||
Q_SIGNAL void stopAudioOutputStream () const;
|
||||
Q_SIGNAL void startAudioInputStream (QAudioDeviceInfo const&,
|
||||
int framesPerBuffer, AudioDevice * sink,
|
||||
unsigned downSampleFactor, AudioDevice::Channel) const;
|
||||
Q_SIGNAL void suspendAudioInputStream () const;
|
||||
Q_SIGNAL void resumeAudioInputStream () const;
|
||||
Q_SIGNAL void startDetector (AudioDevice::Channel) const;
|
||||
Q_SIGNAL void FFTSize (unsigned) const;
|
||||
Q_SIGNAL void detectorClose () const;
|
||||
Q_SIGNAL void finished () const;
|
||||
Q_SIGNAL void transmitFrequency (double) const;
|
||||
Q_SIGNAL void endTransmitMessage (bool quick = false) const;
|
||||
Q_SIGNAL void tune (bool = true) const;
|
||||
Q_SIGNAL void sendMessage (unsigned symbolsLength, double framesPerSymbol,
|
||||
double frequency, double toneSpacing,
|
||||
SoundOutput *, AudioDevice::Channel = AudioDevice::Mono,
|
||||
bool synchronize = true, bool fastMode = false, double dBSNR = 99.,
|
||||
int TRperiod=60) const;
|
||||
Q_SIGNAL void outAttenuationChanged (qreal) const;
|
||||
Q_SIGNAL void toggleShorthand () const;
|
||||
|
||||
private:
|
||||
void astroUpdate ();
|
||||
void writeAllTxt(QString message);
|
||||
void auto_sequence (DecodedText const& message, unsigned start_tolerance, unsigned stop_tolerance);
|
||||
void hideMenus(bool b);
|
||||
|
||||
NetworkAccessManager m_network_manager;
|
||||
bool m_valid;
|
||||
QSplashScreen * m_splash;
|
||||
QString m_revision;
|
||||
bool m_multiple;
|
||||
MultiSettings * m_multi_settings;
|
||||
QPushButton * m_configurations_button;
|
||||
QSettings * m_settings;
|
||||
QScopedPointer<Ui::MainWindow> ui;
|
||||
|
||||
// other windows
|
||||
Configuration m_config;
|
||||
WSPRBandHopping m_WSPR_band_hopping;
|
||||
bool m_WSPR_tx_next;
|
||||
MessageBox m_rigErrorMessageBox;
|
||||
QScopedPointer<SampleDownloader> m_sampleDownloader;
|
||||
QScopedPointer<EqualizationToolsDialog> m_equalizationToolsDialog;
|
||||
|
||||
QScopedPointer<WideGraph> m_wideGraph;
|
||||
QScopedPointer<EchoGraph> m_echoGraph;
|
||||
QScopedPointer<FastGraph> m_fastGraph;
|
||||
QScopedPointer<LogQSO> m_logDlg;
|
||||
QScopedPointer<Astro> m_astroWidget;
|
||||
QScopedPointer<HelpTextWindow> m_shortcuts;
|
||||
QScopedPointer<HelpTextWindow> m_prefixes;
|
||||
QScopedPointer<HelpTextWindow> m_mouseCmnds;
|
||||
QScopedPointer<MessageAveraging> m_msgAvgWidget;
|
||||
|
||||
Transceiver::TransceiverState m_rigState;
|
||||
Frequency m_lastDialFreq;
|
||||
QString m_lastBand;
|
||||
QString m_lastCallsign;
|
||||
Frequency m_dialFreqRxWSPR; // best guess at WSPR QRG
|
||||
|
||||
Detector * m_detector;
|
||||
unsigned m_FFTSize;
|
||||
SoundInput * m_soundInput;
|
||||
Modulator * m_modulator;
|
||||
SoundOutput * m_soundOutput;
|
||||
QThread m_audioThread;
|
||||
|
||||
qint64 m_msErase;
|
||||
qint64 m_secBandChanged;
|
||||
qint64 m_freqMoon;
|
||||
Frequency m_freqNominal;
|
||||
Frequency m_freqTxNominal;
|
||||
Astro::Correction m_astroCorrection;
|
||||
|
||||
double m_s6;
|
||||
double m_tRemaining;
|
||||
|
||||
float m_DTtol;
|
||||
float m_t0;
|
||||
float m_t1;
|
||||
float m_t0Pick;
|
||||
float m_t1Pick;
|
||||
float m_fCPUmskrtd;
|
||||
|
||||
qint32 m_waterfallAvg;
|
||||
qint32 m_ntx;
|
||||
bool m_gen_message_is_cq;
|
||||
bool m_send_RR73;
|
||||
qint32 m_timeout;
|
||||
qint32 m_XIT;
|
||||
qint32 m_setftx;
|
||||
qint32 m_ndepth;
|
||||
qint32 m_sec0;
|
||||
qint32 m_RxLog;
|
||||
qint32 m_nutc0;
|
||||
qint32 m_ntr;
|
||||
qint32 m_tx;
|
||||
qint32 m_hsym;
|
||||
qint32 m_TRperiod;
|
||||
qint32 m_nsps;
|
||||
qint32 m_hsymStop;
|
||||
qint32 m_inGain;
|
||||
qint32 m_ncw;
|
||||
qint32 m_secID;
|
||||
qint32 m_idleMinutes;
|
||||
qint32 m_nSubMode;
|
||||
qint32 m_nclearave;
|
||||
qint32 m_minSync;
|
||||
qint32 m_dBm;
|
||||
qint32 m_pctx;
|
||||
qint32 m_nseq;
|
||||
qint32 m_nWSPRdecodes;
|
||||
qint32 m_k0;
|
||||
qint32 m_kdone;
|
||||
qint32 m_nPick;
|
||||
FrequencyList_v2::const_iterator m_frequency_list_fcal_iter;
|
||||
qint32 m_nTx73;
|
||||
qint32 m_UTCdisk;
|
||||
qint32 m_wait;
|
||||
|
||||
bool m_btxok; //True if OK to transmit
|
||||
bool m_diskData;
|
||||
bool m_loopall;
|
||||
bool m_decoderBusy;
|
||||
bool m_txFirst;
|
||||
bool m_auto;
|
||||
bool m_restart;
|
||||
bool m_startAnother;
|
||||
bool m_saveDecoded;
|
||||
bool m_saveAll;
|
||||
bool m_widebandDecode;
|
||||
bool m_call3Modified;
|
||||
bool m_dataAvailable;
|
||||
bool m_bDecoded;
|
||||
bool m_noSuffix;
|
||||
bool m_blankLine;
|
||||
bool m_decodedText2;
|
||||
bool m_freeText;
|
||||
bool m_sentFirst73;
|
||||
int m_currentMessageType;
|
||||
QString m_currentMessage;
|
||||
int m_lastMessageType;
|
||||
QString m_lastMessageSent;
|
||||
bool m_lockTxFreq;
|
||||
bool m_bShMsgs;
|
||||
bool m_bSWL;
|
||||
bool m_uploadSpots;
|
||||
bool m_uploading;
|
||||
bool m_txNext;
|
||||
bool m_grid6;
|
||||
bool m_tuneup;
|
||||
bool m_bTxTime;
|
||||
bool m_rxDone;
|
||||
bool m_bSimplex; // not using split even if it is available
|
||||
bool m_bEchoTxOK;
|
||||
bool m_bTransmittedEcho;
|
||||
bool m_bEchoTxed;
|
||||
bool m_bFastMode;
|
||||
bool m_bFast9;
|
||||
bool m_bFastDecodeCalled;
|
||||
bool m_bDoubleClickAfterCQnnn;
|
||||
bool m_bRefSpec;
|
||||
bool m_bClearRefSpec;
|
||||
bool m_bTrain;
|
||||
bool m_bUseRef;
|
||||
bool m_bFastDone;
|
||||
bool m_bAltV;
|
||||
bool m_bNoMoreFiles;
|
||||
bool m_bQRAsyncWarned;
|
||||
bool m_bDoubleClicked;
|
||||
bool m_bCallingCQ;
|
||||
bool m_bAutoReply;
|
||||
bool m_bCheckedContest;
|
||||
enum
|
||||
{
|
||||
CALLING,
|
||||
REPLYING,
|
||||
REPORT,
|
||||
ROGER_REPORT,
|
||||
ROGERS,
|
||||
SIGNOFF
|
||||
}
|
||||
m_QSOProgress;
|
||||
|
||||
int m_ihsym;
|
||||
int m_nzap;
|
||||
int m_npts8;
|
||||
float m_px;
|
||||
float m_pxmax;
|
||||
float m_df3;
|
||||
int m_iptt0;
|
||||
bool m_btxok0;
|
||||
int m_nsendingsh;
|
||||
double m_onAirFreq0;
|
||||
bool m_first_error;
|
||||
|
||||
char m_msg[100][80];
|
||||
|
||||
// labels in status bar
|
||||
QLabel tx_status_label;
|
||||
QLabel config_label;
|
||||
QLabel mode_label;
|
||||
QLabel last_tx_label;
|
||||
QLabel auto_tx_label;
|
||||
QLabel band_hopping_label;
|
||||
QProgressBar progressBar;
|
||||
QLabel watchdog_label;
|
||||
|
||||
QFuture<void> m_wav_future;
|
||||
QFutureWatcher<void> m_wav_future_watcher;
|
||||
QFutureWatcher<void> watcher3;
|
||||
QFutureWatcher<QString> m_saveWAVWatcher;
|
||||
|
||||
QProcess proc_jt9;
|
||||
QProcess p1;
|
||||
QProcess p3;
|
||||
|
||||
WSPRNet *wsprNet;
|
||||
|
||||
QTimer m_guiTimer;
|
||||
QTimer ptt1Timer; //StartTx delay
|
||||
QTimer ptt0Timer; //StopTx delay
|
||||
QTimer logQSOTimer;
|
||||
QTimer killFileTimer;
|
||||
QTimer tuneButtonTimer;
|
||||
QTimer uploadTimer;
|
||||
QTimer tuneATU_Timer;
|
||||
QTimer TxAgainTimer;
|
||||
QTimer minuteTimer;
|
||||
QTimer splashTimer;
|
||||
QTimer p1Timer;
|
||||
|
||||
QString m_path;
|
||||
QString m_baseCall;
|
||||
QString m_hisCall;
|
||||
QString m_hisGrid;
|
||||
QString m_appDir;
|
||||
QString m_palette;
|
||||
QString m_dateTime;
|
||||
QString m_mode;
|
||||
QString m_modeTx;
|
||||
QString m_fnameWE; // save path without extension
|
||||
QString m_rpt;
|
||||
QString m_rptSent;
|
||||
QString m_rptRcvd;
|
||||
QString m_qsoStart;
|
||||
QString m_qsoStop;
|
||||
QString m_cmnd;
|
||||
QString m_cmndP1;
|
||||
QString m_msgSent0;
|
||||
QString m_fileToSave;
|
||||
QString m_calls;
|
||||
QString m_CQtype;
|
||||
|
||||
QSet<QString> m_pfx;
|
||||
QSet<QString> m_sfx;
|
||||
|
||||
QDateTime m_dateTimeQSOOn;
|
||||
|
||||
QSharedMemory *mem_jt9;
|
||||
LogBook m_logBook;
|
||||
QString m_QSOText;
|
||||
unsigned m_msAudioOutputBuffered;
|
||||
unsigned m_framesAudioInputBuffered;
|
||||
unsigned m_downSampleFactor;
|
||||
QThread::Priority m_audioThreadPriority;
|
||||
bool m_bandEdited;
|
||||
bool m_splitMode;
|
||||
bool m_monitoring;
|
||||
bool m_tx_when_ready;
|
||||
bool m_transmitting;
|
||||
bool m_tune;
|
||||
bool m_tx_watchdog; // true when watchdog triggered
|
||||
bool m_block_pwr_tooltip;
|
||||
bool m_PwrBandSetOK;
|
||||
bool m_bVHFwarned;
|
||||
Frequency m_lastMonitoredFrequency;
|
||||
double m_toneSpacing;
|
||||
int m_firstDecode;
|
||||
QProgressDialog m_optimizingProgress;
|
||||
QTimer m_heartbeat;
|
||||
MessageClient * m_messageClient;
|
||||
PSK_Reporter *psk_Reporter;
|
||||
DisplayManual m_manual;
|
||||
QHash<QString, QVariant> m_pwrBandTxMemory; // Remembers power level by band
|
||||
QHash<QString, QVariant> m_pwrBandTuneMemory; // Remembers power level by band for tuning
|
||||
QByteArray m_geometryNoControls;
|
||||
QVector<double> m_phaseEqCoefficients;
|
||||
|
||||
//---------------------------------------------------- private functions
|
||||
void readSettings();
|
||||
void set_application_font (QFont const&);
|
||||
void setDecodedTextFont (QFont const&);
|
||||
void writeSettings();
|
||||
void createStatusBar();
|
||||
void updateStatusBar();
|
||||
void genStdMsgs(QString rpt, bool unconditional = false);
|
||||
void genCQMsg();
|
||||
void clearDX ();
|
||||
void lookup();
|
||||
void ba2msg(QByteArray ba, char* message);
|
||||
void msgtype(QString t, QLineEdit* tx);
|
||||
void stub();
|
||||
void statusChanged();
|
||||
void fixStop();
|
||||
bool shortList(QString callsign);
|
||||
void transmit (double snr = 99.);
|
||||
void rigFailure (QString const& reason);
|
||||
void pskSetLocal ();
|
||||
void pskPost(DecodedText const& decodedtext);
|
||||
void displayDialFrequency ();
|
||||
void transmitDisplay (bool);
|
||||
void processMessage(DecodedText const&, bool ctrl = false, bool alt = false);
|
||||
void replyToCQ (QTime, qint32 snr, float delta_time, quint32 delta_frequency, QString const& mode, QString const& message_text, bool low_confidence, quint8 modifiers);
|
||||
void replayDecodes ();
|
||||
void postDecode (bool is_new, QString const& message);
|
||||
void postWSPRDecode (bool is_new, QStringList message_parts);
|
||||
void enable_DXCC_entity (bool on);
|
||||
void switch_mode (Mode);
|
||||
void WSPR_scheduling ();
|
||||
void freqCalStep();
|
||||
void setRig (Frequency = 0); // zero frequency means no change
|
||||
void WSPR_history(Frequency dialFreq, int ndecodes);
|
||||
QString WSPR_hhmm(int n);
|
||||
void fast_config(bool b);
|
||||
void CQTxFreq();
|
||||
QString save_wave_file (QString const& name
|
||||
, short const * data
|
||||
, int seconds
|
||||
, QString const& my_callsign
|
||||
, QString const& my_grid
|
||||
, QString const& mode
|
||||
, qint32 sub_mode
|
||||
, Frequency frequency
|
||||
, QString const& his_call
|
||||
, QString const& his_grid) const;
|
||||
void read_wav_file (QString const& fname);
|
||||
void decodeDone ();
|
||||
void subProcessFailed (QProcess *, int exit_code, QProcess::ExitStatus);
|
||||
void subProcessError (QProcess *, QProcess::ProcessError);
|
||||
void statusUpdate () const;
|
||||
void update_watchdog_label ();
|
||||
void on_the_minute ();
|
||||
void add_child_to_event_filter (QObject *);
|
||||
void remove_child_from_event_filter (QObject *);
|
||||
void setup_status_bar (bool vhf);
|
||||
void tx_watchdog (bool triggered);
|
||||
int nWidgets(QString t);
|
||||
void displayWidgets(int n);
|
||||
void vhfWarning();
|
||||
QChar current_submode () const; // returns QChar {0} if sub mode is
|
||||
// not appropriate
|
||||
void write_transmit_entry (QString const& file_name);
|
||||
};
|
||||
|
||||
extern int killbyname(const char* progName);
|
||||
extern void getDev(int* numDevices,char hostAPI_DeviceName[][50],
|
||||
int minChan[], int maxChan[],
|
||||
int minSpeed[], int maxSpeed[]);
|
||||
extern int next_tx_state(int pctx);
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -0,0 +1,47 @@
|
||||
=== Decoded Lines
|
||||
|
||||
Displayed information accompanying decoded messages generally includes UTC,
|
||||
signal-to-noise ratio in dB, time offset DT in seconds, and
|
||||
audio frequency in Hz. Some modes include additional information such
|
||||
as frequency offset from nominal (DF), frequency drift (Drift or F1),
|
||||
or distance (km or mi).
|
||||
|
||||
There may also be some cryptic characters with special meanings
|
||||
summarized in the following Table:
|
||||
|
||||
[[DECODED_LINES_TABLE]]
|
||||
.Notations used on decoded text lines
|
||||
[width="50%",cols="h,3*^",frame=topbot,options="header"]
|
||||
|===========================================
|
||||
|Mode |Mode character|Sync character|End of line information
|
||||
|JT4 | $ | *, # | f, fN, dNC
|
||||
|JT9 | @ | |
|
||||
|JT65 | # | |
|
||||
|JT65 VHF| # | *, # | f, fN, dNC
|
||||
|QRA64 | : | * | R
|
||||
|ISCAT | | * | M N C T
|
||||
|MSK144 | & | | N
|
||||
|===========================================
|
||||
Sync character::
|
||||
`*` - Normal sync +
|
||||
`#` - Alternate sync
|
||||
|
||||
End of line information::
|
||||
`C` - Confidence indicator [ISCAT and Deep Search; (0-9,*)] +
|
||||
`d` - Deep Search algorithm +
|
||||
`f` - Franke-Taylor or Fano algorithm +
|
||||
`M` - Message length (characters) +
|
||||
`N` - Number of Rx intervals or frames averaged +
|
||||
`R` - Return code from QRA64 decoder +
|
||||
`T` - Length of analyzed region (s)
|
||||
|
||||
=== Reference Spectrum
|
||||
|
||||
WSJT-X provides a tool that can be used to determine the detailed
|
||||
shape of your receiver's passband. Disconnect your antenna or tune to
|
||||
a quiet frequency with no signals. With WSJT-X running in one of the
|
||||
slow modes, select *Measure reference spectrum* from the *File* menu.
|
||||
Wait for about a minute and then hit the *Stop* button. A file named
|
||||
`refspec.dat` should appear in your log directory.
|
||||
|
||||
[ ... more to come ...]
|
||||
@@ -0,0 +1,151 @@
|
||||
subroutine sync8(dd,nfa,nfb,syncmin,nfqso,s,candidate,ncand,sbase)
|
||||
|
||||
include 'ft8_params.f90'
|
||||
! Search over +/- 2.5s relative to 0.5s TX start time.
|
||||
parameter (JZ=62)
|
||||
complex cx(0:NH1)
|
||||
real s(NH1,NHSYM)
|
||||
real savg(NH1)
|
||||
real sbase(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, stepping by NSTEP steps.
|
||||
savg=0.
|
||||
tstep=NSTEP/12000.0
|
||||
df=12000.0/NFFT1 !3.125 Hz
|
||||
fac=1.0/300.0
|
||||
do j=1,NHSYM
|
||||
ia=(j-1)*NSTEP + 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
|
||||
call baseline(savg,nfa,nfb,sbase)
|
||||
! 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)
|
||||
nssy=NSPS/NSTEP ! # steps per symbol
|
||||
nfos=NFFT1/NSPS ! # frequency bin oversampling factor
|
||||
jstrt=0.5/tstep
|
||||
|
||||
do i=ia,ib
|
||||
do j=-JZ,+JZ
|
||||
ta=0.
|
||||
tb=0.
|
||||
tc=0.
|
||||
t0a=0.
|
||||
t0b=0.
|
||||
t0c=0.
|
||||
do n=0,6
|
||||
k=j+jstrt+nssy*n
|
||||
if(k.ge.1.and.k.le.NHSYM) then
|
||||
ta=ta + s(i+nfos*icos7(n),k)
|
||||
t0a=t0a + sum(s(i:i+nfos*6:nfos,k))
|
||||
endif
|
||||
tb=tb + s(i+nfos*icos7(n),k+nssy*36)
|
||||
t0b=t0b + sum(s(i:i+nfos*6:nfos,k+nssy*36))
|
||||
if(k+nssy*72.le.NHSYM) then
|
||||
tc=tc + s(i+nfos*icos7(n),k+nssy*72)
|
||||
t0c=t0c + sum(s(i:i+nfos*6:nfos,k+nssy*72))
|
||||
endif
|
||||
enddo
|
||||
t=ta+tb+tc
|
||||
t0=t0a+t0b+t0c
|
||||
t0=(t0-t)/6.0
|
||||
sync_abc=t/t0
|
||||
|
||||
t=tb+tc
|
||||
t0=t0b+t0c
|
||||
t0=(t0-t)/6.0
|
||||
sync_bc=t/t0
|
||||
sync2d(i,j)=max(sync_abc,sync_bc)
|
||||
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
|
||||
do i=1,200
|
||||
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
|
||||
|
||||
! Sort by sync
|
||||
! call indexx(candidate0(3,1:ncand),ncand,indx)
|
||||
! Sort by frequency
|
||||
call indexx(candidate0(1,1:ncand),ncand,indx)
|
||||
k=1
|
||||
! do i=ncand,1,-1
|
||||
do i=1,ncand
|
||||
j=indx(i)
|
||||
! if( candidate0(3,j) .ge. syncmin .and. candidate0(2,j).ge.-1.5 ) then
|
||||
if( candidate0(3,j) .ge. syncmin ) then
|
||||
candidate(1,k)=abs(candidate0(1,j))
|
||||
candidate(2,k)=candidate0(2,j)
|
||||
candidate(3,k)=candidate0(3,j)
|
||||
k=k+1
|
||||
endif
|
||||
enddo
|
||||
ncand=k-1
|
||||
return
|
||||
end subroutine sync8
|
||||
@@ -0,0 +1,94 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
|
||||
// *Preprocessed* version of the main "not_equal_to.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
>
|
||||
struct not_equal_to_impl
|
||||
: if_c<
|
||||
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
|
||||
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
|
||||
)
|
||||
|
||||
, aux::cast2nd_impl< not_equal_to_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< not_equal_to_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct not_equal_to_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct not_equal_to_impl< na,Tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename Tag > struct not_equal_to_impl< Tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct not_equal_to_tag
|
||||
{
|
||||
typedef typename T::tag type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct not_equal_to
|
||||
|
||||
: not_equal_to_impl<
|
||||
typename not_equal_to_tag<N1>::type
|
||||
, typename not_equal_to_tag<N2>::type
|
||||
>::template apply< N1,N2 >::type
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, not_equal_to, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, not_equal_to)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct not_equal_to_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value != BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,461 @@
|
||||
// inverse_gamma.hpp
|
||||
|
||||
// Copyright Paul A. Bristow 2010.
|
||||
// Copyright John Maddock 2010.
|
||||
// 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)
|
||||
|
||||
#ifndef BOOST_STATS_INVERSE_GAMMA_HPP
|
||||
#define BOOST_STATS_INVERSE_GAMMA_HPP
|
||||
|
||||
// Inverse Gamma Distribution is a two-parameter family
|
||||
// of continuous probability distributions
|
||||
// on the positive real line, which is the distribution of
|
||||
// the reciprocal of a variable distributed according to the gamma distribution.
|
||||
|
||||
// http://en.wikipedia.org/wiki/Inverse-gamma_distribution
|
||||
// http://rss.acs.unt.edu/Rdoc/library/pscl/html/igamma.html
|
||||
|
||||
// See also gamma distribution at gamma.hpp:
|
||||
// http://www.itl.nist.gov/div898/handbook/eda/section3/eda366b.htm
|
||||
// http://mathworld.wolfram.com/GammaDistribution.html
|
||||
// http://en.wikipedia.org/wiki/Gamma_distribution
|
||||
|
||||
#include <boost/math/distributions/fwd.hpp>
|
||||
#include <boost/math/special_functions/gamma.hpp>
|
||||
#include <boost/math/distributions/detail/common_error_handling.hpp>
|
||||
#include <boost/math/distributions/complement.hpp>
|
||||
|
||||
#include <utility>
|
||||
|
||||
namespace boost{ namespace math
|
||||
{
|
||||
namespace detail
|
||||
{
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_inverse_gamma_shape(
|
||||
const char* function, // inverse_gamma
|
||||
RealType shape, // shape aka alpha
|
||||
RealType* result, // to update, perhaps with NaN
|
||||
const Policy& pol)
|
||||
{ // Sources say shape argument must be > 0
|
||||
// but seems logical to allow shape zero as special case,
|
||||
// returning pdf and cdf zero (but not < 0).
|
||||
// (Functions like mean, variance with other limits on shape are checked
|
||||
// in version including an operator & limit below).
|
||||
if((shape < 0) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but must be >= 0 !", shape, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} //bool check_inverse_gamma_shape
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_inverse_gamma_x(
|
||||
const char* function,
|
||||
RealType const& x,
|
||||
RealType* result, const Policy& pol)
|
||||
{
|
||||
if((x < 0) || !(boost::math::isfinite)(x))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Random variate is %1% but must be >= 0 !", x, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_inverse_gamma(
|
||||
const char* function, // TODO swap these over, so shape is first.
|
||||
RealType scale, // scale aka beta
|
||||
RealType shape, // shape aka alpha
|
||||
RealType* result, const Policy& pol)
|
||||
{
|
||||
return check_scale(function, scale, result, pol)
|
||||
&& check_inverse_gamma_shape(function, shape, result, pol);
|
||||
} // bool check_inverse_gamma
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template <class RealType = double, class Policy = policies::policy<> >
|
||||
class inverse_gamma_distribution
|
||||
{
|
||||
public:
|
||||
typedef RealType value_type;
|
||||
typedef Policy policy_type;
|
||||
|
||||
inverse_gamma_distribution(RealType l_shape = 1, RealType l_scale = 1)
|
||||
: m_shape(l_shape), m_scale(l_scale)
|
||||
{
|
||||
RealType result;
|
||||
detail::check_inverse_gamma(
|
||||
"boost::math::inverse_gamma_distribution<%1%>::inverse_gamma_distribution",
|
||||
l_scale, l_shape, &result, Policy());
|
||||
}
|
||||
|
||||
RealType shape()const
|
||||
{
|
||||
return m_shape;
|
||||
}
|
||||
|
||||
RealType scale()const
|
||||
{
|
||||
return m_scale;
|
||||
}
|
||||
private:
|
||||
//
|
||||
// Data members:
|
||||
//
|
||||
RealType m_shape; // distribution shape
|
||||
RealType m_scale; // distribution scale
|
||||
};
|
||||
|
||||
typedef inverse_gamma_distribution<double> inverse_gamma;
|
||||
// typedef - but potential clash with name of inverse gamma *function*.
|
||||
// but there is a typedef for gamma
|
||||
// typedef boost::math::gamma_distribution<Type, Policy> gamma;
|
||||
|
||||
// Allow random variable x to be zero, treated as a special case (unlike some definitions).
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> range(const inverse_gamma_distribution<RealType, Policy>& /* dist */)
|
||||
{ // Range of permissible values for random variable x.
|
||||
using boost::math::tools::max_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> support(const inverse_gamma_distribution<RealType, Policy>& /* dist */)
|
||||
{ // Range of supported values for random variable x.
|
||||
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
|
||||
using boost::math::tools::max_value;
|
||||
using boost::math::tools::min_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(0), max_value<RealType>());
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType pdf(const inverse_gamma_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::pdf(const inverse_gamma_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
{ // distribution parameters bad.
|
||||
return result;
|
||||
}
|
||||
if(x == 0)
|
||||
{ // Treat random variate zero as a special case.
|
||||
return 0;
|
||||
}
|
||||
else if(false == detail::check_inverse_gamma_x(function, x, &result, Policy()))
|
||||
{ // x bad.
|
||||
return result;
|
||||
}
|
||||
result = scale / x;
|
||||
if(result < tools::min_value<RealType>())
|
||||
return 0; // random variable is infinite or so close as to make no difference.
|
||||
result = gamma_p_derivative(shape, result, Policy()) * scale;
|
||||
if(0 != result)
|
||||
{
|
||||
if(x < 0)
|
||||
{
|
||||
// x * x may under or overflow, likewise our result,
|
||||
// so be extra careful about the arithmetic:
|
||||
RealType lim = tools::max_value<RealType>() * x;
|
||||
if(lim < result)
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "PDF is infinite.", Policy());
|
||||
result /= x;
|
||||
if(lim < result)
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "PDF is infinite.", Policy());
|
||||
result /= x;
|
||||
}
|
||||
result /= (x * x);
|
||||
}
|
||||
// better than naive
|
||||
// result = (pow(scale, shape) * pow(x, (-shape -1)) * exp(-scale/x) ) / tgamma(shape);
|
||||
return result;
|
||||
} // pdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const inverse_gamma_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::cdf(const inverse_gamma_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
{ // distribution parameters bad.
|
||||
return result;
|
||||
}
|
||||
if (x == 0)
|
||||
{ // Treat zero as a special case.
|
||||
return 0;
|
||||
}
|
||||
else if(false == detail::check_inverse_gamma_x(function, x, &result, Policy()))
|
||||
{ // x bad
|
||||
return result;
|
||||
}
|
||||
result = boost::math::gamma_q(shape, scale / x, Policy());
|
||||
// result = tgamma(shape, scale / x) / tgamma(shape); // naive using tgamma
|
||||
return result;
|
||||
} // cdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const inverse_gamma_distribution<RealType, Policy>& dist, const RealType& p)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
using boost::math::gamma_q_inv;
|
||||
|
||||
static const char* function = "boost::math::quantile(const inverse_gamma_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
return result;
|
||||
if(false == detail::check_probability(function, p, &result, Policy()))
|
||||
return result;
|
||||
if(p == 1)
|
||||
{
|
||||
return policies::raise_overflow_error<RealType>(function, 0, Policy());
|
||||
}
|
||||
result = gamma_q_inv(shape, p, Policy());
|
||||
if((result < 1) && (result * tools::max_value<RealType>() < scale))
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "Value of random variable in inverse gamma distribution quantile is infinite.", Policy());
|
||||
result = scale / result;
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const complemented2_type<inverse_gamma_distribution<RealType, Policy>, RealType>& c)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::quantile(const gamma_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType shape = c.dist.shape();
|
||||
RealType scale = c.dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
return result;
|
||||
if(false == detail::check_inverse_gamma_x(function, c.param, &result, Policy()))
|
||||
return result;
|
||||
|
||||
if(c.param == 0)
|
||||
return 1; // Avoid division by zero
|
||||
|
||||
//result = 1. - gamma_q(shape, c.param / scale, Policy());
|
||||
result = gamma_p(shape, scale/c.param, Policy());
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const complemented2_type<inverse_gamma_distribution<RealType, Policy>, RealType>& c)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::quantile(const inverse_gamma_distribution<%1%>&, %1%)";
|
||||
|
||||
RealType shape = c.dist.shape();
|
||||
RealType scale = c.dist.scale();
|
||||
RealType q = c.param;
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
return result;
|
||||
if(false == detail::check_probability(function, q, &result, Policy()))
|
||||
return result;
|
||||
|
||||
if(q == 0)
|
||||
{
|
||||
return policies::raise_overflow_error<RealType>(function, 0, Policy());
|
||||
}
|
||||
result = gamma_p_inv(shape, q, Policy());
|
||||
if((result < 1) && (result * tools::max_value<RealType>() < scale))
|
||||
return policies::raise_overflow_error<RealType, Policy>(function, "Value of random variable in inverse gamma distribution quantile is infinite.", Policy());
|
||||
result = scale / result;
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mean(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::mean(const inverse_gamma_distribution<%1%>&)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
|
||||
if(false == detail::check_scale(function, scale, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if((shape <= 1) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but for a defined mean it must be > 1", shape, Policy());
|
||||
return result;
|
||||
}
|
||||
result = scale / (shape - 1);
|
||||
return result;
|
||||
} // mean
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType variance(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::variance(const inverse_gamma_distribution<%1%>&)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_scale(function, scale, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if((shape <= 2) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but for a defined variance it must be > 2", shape, Policy());
|
||||
return result;
|
||||
}
|
||||
result = (scale * scale) / ((shape - 1) * (shape -1) * (shape -2));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mode(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::mode(const inverse_gamma_distribution<%1%>&)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_inverse_gamma(function, scale, shape, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// Only defined for shape >= 0, but is checked by check_inverse_gamma.
|
||||
result = scale / (shape + 1);
|
||||
return result;
|
||||
}
|
||||
|
||||
//template <class RealType, class Policy>
|
||||
//inline RealType median(const gamma_distribution<RealType, Policy>& dist)
|
||||
//{ // Wikipedia does not define median,
|
||||
// so rely on default definition quantile(0.5) in derived accessors.
|
||||
// return result.
|
||||
//}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType skewness(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::skewness(const inverse_gamma_distribution<%1%>&)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
RealType result = 0;
|
||||
|
||||
if(false == detail::check_scale(function, scale, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if((shape <= 3) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but for a defined skewness it must be > 3", shape, Policy());
|
||||
return result;
|
||||
}
|
||||
result = (4 * sqrt(shape - 2) ) / (shape - 3);
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis_excess(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
BOOST_MATH_STD_USING // for ADL of std functions
|
||||
|
||||
static const char* function = "boost::math::kurtosis_excess(const inverse_gamma_distribution<%1%>&)";
|
||||
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
if(false == detail::check_scale(function, scale, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if((shape <= 4) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but for a defined kurtosis excess it must be > 4", shape, Policy());
|
||||
return result;
|
||||
}
|
||||
result = (30 * shape - 66) / ((shape - 3) * (shape - 4));
|
||||
return result;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis(const inverse_gamma_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
static const char* function = "boost::math::kurtosis(const inverse_gamma_distribution<%1%>&)";
|
||||
RealType shape = dist.shape();
|
||||
RealType scale = dist.scale();
|
||||
|
||||
RealType result = 0;
|
||||
|
||||
if(false == detail::check_scale(function, scale, &result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if((shape <= 4) || !(boost::math::isfinite)(shape))
|
||||
{
|
||||
result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Shape parameter is %1%, but for a defined kurtosis it must be > 4", shape, Policy());
|
||||
return result;
|
||||
}
|
||||
return kurtosis_excess(dist) + 3;
|
||||
}
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
// This include must be at the end, *after* the accessors
|
||||
// for this distribution have been defined, in order to
|
||||
// keep compilers that support two-phase lookup happy.
|
||||
#include <boost/math/distributions/detail/derived_accessors.hpp>
|
||||
|
||||
#endif // BOOST_STATS_INVERSE_GAMMA_HPP
|
||||
@@ -0,0 +1,102 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/less_equal.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
typename Tag1
|
||||
, typename Tag2
|
||||
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag1_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag1)::value
|
||||
, BOOST_MPL_AUX_NTTP_DECL(int, tag2_) = BOOST_MPL_AUX_MSVC_VALUE_WKND(Tag2)::value
|
||||
>
|
||||
struct less_equal_impl
|
||||
: if_c<
|
||||
( tag1_ > tag2_ )
|
||||
, aux::cast2nd_impl< less_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
|
||||
, aux::cast1st_impl< less_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
/// for Digital Mars C++/compilers with no CTPS/TTP support
|
||||
template<> struct less_equal_impl< na,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct less_equal_impl< na,integral_c_tag >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template<> struct less_equal_impl< integral_c_tag,na >
|
||||
{
|
||||
template< typename U1, typename U2 > struct apply
|
||||
{
|
||||
typedef apply type;
|
||||
BOOST_STATIC_CONSTANT(int, value = 0);
|
||||
};
|
||||
};
|
||||
|
||||
template< typename T > struct less_equal_tag
|
||||
: tag< T,na >
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
typename BOOST_MPL_AUX_NA_PARAM(N1)
|
||||
, typename BOOST_MPL_AUX_NA_PARAM(N2)
|
||||
>
|
||||
struct less_equal
|
||||
: aux::msvc_eti_base< typename apply_wrap2<
|
||||
less_equal_impl<
|
||||
typename less_equal_tag<N1>::type
|
||||
, typename less_equal_tag<N2>::type
|
||||
>
|
||||
, N1
|
||||
, N2
|
||||
>::type >::type
|
||||
|
||||
{
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(2, less_equal, (N1, N2))
|
||||
|
||||
};
|
||||
|
||||
BOOST_MPL_AUX_NA_SPEC2(2, 2, less_equal)
|
||||
|
||||
}}
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<>
|
||||
struct less_equal_impl< integral_c_tag,integral_c_tag >
|
||||
{
|
||||
template< typename N1, typename N2 > struct apply
|
||||
|
||||
{
|
||||
BOOST_STATIC_CONSTANT(bool, value =
|
||||
( BOOST_MPL_AUX_VALUE_WKND(N1)::value <=
|
||||
BOOST_MPL_AUX_VALUE_WKND(N2)::value )
|
||||
);
|
||||
typedef bool_<value> type;
|
||||
};
|
||||
};
|
||||
|
||||
}}
|
||||
@@ -0,0 +1,78 @@
|
||||
subroutine msksoftsymw(zz,aa,bb,id,nterms,ierror,rxdata,nhard0,nhardsync0)
|
||||
|
||||
include 'wsprlf_params.f90'
|
||||
|
||||
complex zz(NS+ND) !Complex symbol values (intermediate)
|
||||
complex z,z0
|
||||
real rxdata(ND) !Soft symbols
|
||||
real aa(20),bb(20) !Fitted polyco's
|
||||
integer id(NS+ND) !NRZ values (+/-1) for Sync and Data
|
||||
integer ierror(NS+ND)
|
||||
|
||||
n=0
|
||||
ierror=0
|
||||
ierr=0
|
||||
jz=(NS+ND+1)/2
|
||||
do j=1,jz
|
||||
xx=j*2.0/jz - 1.0
|
||||
yii=1.
|
||||
yqq=0.
|
||||
if(nterms.gt.0) then
|
||||
yii=aa(1)
|
||||
yqq=bb(1)
|
||||
do i=2,nterms
|
||||
yii=yii + aa(i)*xx**(i-1)
|
||||
yqq=yqq + bb(i)*xx**(i-1)
|
||||
enddo
|
||||
endif
|
||||
z0=cmplx(yii,yqq)
|
||||
z=zz(j)*conjg(z0)
|
||||
p=real(z)
|
||||
if(abs(id(j)).eq.2) then
|
||||
if(real(z)*id(j).lt.0) then !Sync bit
|
||||
nhardsync0=nhardsync0+1
|
||||
ierror(j)=2
|
||||
endif
|
||||
else
|
||||
n=n+1 !Data bit
|
||||
rxdata(n)=p
|
||||
ierr=0
|
||||
if(id(j)*p.lt.0) then
|
||||
ierr=1
|
||||
ierror(j)=1
|
||||
endif
|
||||
nhard0=nhard0+ierr
|
||||
endif
|
||||
! write(41,3301) j,id(j),ierror(j),ierr,n,p,p*id(j)
|
||||
!3301 format(5i6,2f10.3)
|
||||
enddo
|
||||
|
||||
do j=jz+1,NS+ND
|
||||
xx=(j-jz+0.5)*2.0/jz - 1.0
|
||||
yii=1.
|
||||
yqq=0.
|
||||
if(nterms.gt.0) then
|
||||
yii=aa(1)
|
||||
yqq=bb(1)
|
||||
do i=2,nterms
|
||||
yii=yii + aa(i)*xx**(i-1)
|
||||
yqq=yqq + bb(i)*xx**(i-1)
|
||||
enddo
|
||||
endif
|
||||
z0=cmplx(yii,yqq)
|
||||
z=zz(j)*conjg(z0)
|
||||
p=aimag(z)
|
||||
n=n+1
|
||||
if(n.gt.ND) exit
|
||||
rxdata(n)=p
|
||||
ierr=0
|
||||
if(id(j)*p.lt.0) then
|
||||
ierr=1
|
||||
ierror(j)=1
|
||||
endif
|
||||
nhard0=nhard0+ierr
|
||||
! write(41,3301) j,id(j),ierror(j),ierr,n,p,p*id(j)
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine msksoftsymw
|
||||
@@ -0,0 +1,155 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2011.
|
||||
# * (C) Copyright Edward Diener 2011,2014.
|
||||
# * 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_LIST_TO_ARRAY_HPP
|
||||
# define BOOST_PREPROCESSOR_LIST_TO_ARRAY_HPP
|
||||
#
|
||||
# include <boost/preprocessor/arithmetic/dec.hpp>
|
||||
# include <boost/preprocessor/arithmetic/inc.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/control/while.hpp>
|
||||
# include <boost/preprocessor/list/adt.hpp>
|
||||
# include <boost/preprocessor/tuple/elem.hpp>
|
||||
# include <boost/preprocessor/tuple/rem.hpp>
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# include <boost/preprocessor/control/iif.hpp>
|
||||
# endif
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO \
|
||||
) \
|
||||
(list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_EMPTY(list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_VC8ORLESS_DO(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY(list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE, list)
|
||||
# endif
|
||||
|
||||
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
|
||||
# define BOOST_PP_LIST_TO_ARRAY_I(w, list) \
|
||||
BOOST_PP_LIST_TO_ARRAY_II(((BOOST_PP_TUPLE_REM_CTOR( \
|
||||
3, \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
)))) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II(p) BOOST_PP_LIST_TO_ARRAY_II_B(p)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II_B(p) BOOST_PP_LIST_TO_ARRAY_II_C ## p
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II_C(p) BOOST_PP_LIST_TO_ARRAY_III p
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY_I(w, list) \
|
||||
BOOST_PP_LIST_TO_ARRAY_II(BOOST_PP_TUPLE_REM_CTOR( \
|
||||
3, \
|
||||
w(BOOST_PP_LIST_TO_ARRAY_P, BOOST_PP_LIST_TO_ARRAY_O, (list, 1, (~))) \
|
||||
)) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_II(im) BOOST_PP_LIST_TO_ARRAY_III(im)
|
||||
# endif
|
||||
# if BOOST_PP_VARIADICS
|
||||
# define BOOST_PP_LIST_TO_ARRAY_III(list, size, tuple) (BOOST_PP_DEC(size), BOOST_PP_LIST_TO_ARRAY_IV tuple)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV(_, ...) (__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY_III(list, size, tuple) (BOOST_PP_DEC(size), BOOST_PP_LIST_TO_ARRAY_IV_ ## size tuple)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_2(_, e0) (e0)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_3(_, e0, e1) (e0, e1)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_4(_, e0, e1, e2) (e0, e1, e2)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_5(_, e0, e1, e2, e3) (e0, e1, e2, e3)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_6(_, e0, e1, e2, e3, e4) (e0, e1, e2, e3, e4)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_7(_, e0, e1, e2, e3, e4, e5) (e0, e1, e2, e3, e4, e5)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_8(_, e0, e1, e2, e3, e4, e5, e6) (e0, e1, e2, e3, e4, e5, e6)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_9(_, e0, e1, e2, e3, e4, e5, e6, e7) (e0, e1, e2, e3, e4, e5, e6, e7)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_10(_, e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, e1, e2, e3, e4, e5, e6, e7, e8)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_11(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_12(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_13(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_14(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_15(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_16(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_17(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_18(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_19(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_20(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_21(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_22(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_23(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_24(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_25(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_26(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_27(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_28(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_29(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_30(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_31(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_32(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_33(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_34(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_35(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_36(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_37(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_38(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_39(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_40(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_41(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_42(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_43(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_44(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_45(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_46(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_47(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_48(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_49(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_50(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_51(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_52(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_53(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_54(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_55(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_56(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_57(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_58(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_59(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_60(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_61(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_62(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_63(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_IV_64(_, e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62) (e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, e32, e33, e34, e35, e36, e37, e38, e39, e40, e41, e42, e43, e44, e45, e46, e47, e48, e49, e50, e51, e52, e53, e54, e55, e56, e57, e58, e59, e60, e61, e62)
|
||||
# endif
|
||||
# define BOOST_PP_LIST_TO_ARRAY_P(d, state) BOOST_PP_LIST_IS_CONS(BOOST_PP_TUPLE_ELEM(3, 0, state))
|
||||
# define BOOST_PP_LIST_TO_ARRAY_O(d, state) BOOST_PP_LIST_TO_ARRAY_O_I state
|
||||
# define BOOST_PP_LIST_TO_ARRAY_O_I(list, size, tuple) (BOOST_PP_LIST_REST(list), BOOST_PP_INC(size), (BOOST_PP_TUPLE_REM(size) tuple, BOOST_PP_LIST_FIRST(list)))
|
||||
#
|
||||
# /* BOOST_PP_LIST_TO_ARRAY_D */
|
||||
#
|
||||
# if BOOST_PP_VARIADICS && BOOST_PP_VARIADICS_MSVC && (_MSC_VER <= 1400)
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) \
|
||||
BOOST_PP_IIF \
|
||||
( \
|
||||
BOOST_PP_LIST_IS_NIL(list), \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY, \
|
||||
BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO \
|
||||
) \
|
||||
(d, list) \
|
||||
/**/
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_EMPTY(d, list) (0,())
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D_VC8ORLESS_DO(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# else
|
||||
# define BOOST_PP_LIST_TO_ARRAY_D(d, list) BOOST_PP_LIST_TO_ARRAY_I(BOOST_PP_WHILE_ ## d, list)
|
||||
# endif
|
||||
#
|
||||
# endif /* BOOST_PREPROCESSOR_LIST_TO_ARRAY_HPP */
|
||||
@@ -0,0 +1,38 @@
|
||||
//=======================================================================
|
||||
// Copyright 2002 Indiana University.
|
||||
// Authors: Andrew Lumsdaine, Lie-Quan Lee, Jeremy G. Siek
|
||||
//
|
||||
// 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_GRAPH_SELECTORS_HPP
|
||||
#define BOOST_GRAPH_SELECTORS_HPP
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
//===========================================================================
|
||||
// Selectors for the Directed template parameter of adjacency_list
|
||||
// and adjacency_matrix.
|
||||
|
||||
struct directedS { enum { is_directed = true, is_bidir = false };
|
||||
typedef mpl::true_ is_directed_t;
|
||||
typedef mpl::false_ is_bidir_t;
|
||||
};
|
||||
struct undirectedS {
|
||||
enum { is_directed = false, is_bidir = false };
|
||||
typedef mpl::false_ is_directed_t;
|
||||
typedef mpl::false_ is_bidir_t;
|
||||
};
|
||||
struct bidirectionalS {
|
||||
enum { is_directed = true, is_bidir = true };
|
||||
typedef mpl::true_ is_directed_t;
|
||||
typedef mpl::true_ is_bidir_t;
|
||||
};
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_GRAPH_SELECTORS_HPP
|
||||
@@ -0,0 +1,96 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014.
|
||||
//
|
||||
// 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/allocator_traits.hpp>
|
||||
#include <boost/container/detail/iterators.hpp>
|
||||
#include <boost/container/detail/value_init.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace container {
|
||||
|
||||
//In place construction
|
||||
|
||||
template<class Allocator, class T, class InpIt>
|
||||
BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T* dest, InpIt source)
|
||||
{ boost::container::allocator_traits<Allocator>::construct(a, dest, *source); }
|
||||
|
||||
template<class Allocator, class T, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, value_init_construct_iterator<U, D>)
|
||||
{
|
||||
boost::container::allocator_traits<Allocator>::construct(a, dest);
|
||||
}
|
||||
|
||||
template <class T, class Difference>
|
||||
class default_init_construct_iterator;
|
||||
|
||||
template<class Allocator, class T, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, default_init_construct_iterator<U, D>)
|
||||
{
|
||||
boost::container::allocator_traits<Allocator>::construct(a, dest, default_init);
|
||||
}
|
||||
|
||||
template <class T, class EmplaceFunctor, class Difference>
|
||||
class emplace_iterator;
|
||||
|
||||
template<class Allocator, class T, class U, class EF, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void construct_in_place(Allocator &a, T *dest, emplace_iterator<U, EF, D> ei)
|
||||
{
|
||||
ei.construct_in_place(a, dest);
|
||||
}
|
||||
|
||||
//Assignment
|
||||
|
||||
template<class DstIt, class InpIt>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, InpIt source)
|
||||
{ *dest = *source; }
|
||||
|
||||
template<class DstIt, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, value_init_construct_iterator<U, D>)
|
||||
{
|
||||
container_detail::value_init<U> val;
|
||||
*dest = boost::move(val.get());
|
||||
}
|
||||
|
||||
template <class DstIt, class Difference>
|
||||
class default_init_construct_iterator;
|
||||
|
||||
template<class DstIt, class U, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, default_init_construct_iterator<U, D>)
|
||||
{
|
||||
U u;
|
||||
*dest = boost::move(u);
|
||||
}
|
||||
|
||||
template <class T, class EmplaceFunctor, class Difference>
|
||||
class emplace_iterator;
|
||||
|
||||
template<class DstIt, class U, class EF, class D>
|
||||
BOOST_CONTAINER_FORCEINLINE void assign_in_place(DstIt dest, emplace_iterator<U, EF, D> ei)
|
||||
{
|
||||
ei.assign_in_place(dest);
|
||||
}
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_CONTAINER_DETAIL_CONSTRUCT_IN_PLACE_HPP
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,48 @@
|
||||
subroutine baseline(s,nfa,nfb,sbase)
|
||||
|
||||
! Fit baseline to spectrum (for FT8)
|
||||
! Input: s(npts) Linear scale in power
|
||||
! Output: sbase(npts) Baseline
|
||||
|
||||
implicit real*8 (a-h,o-z)
|
||||
real*4 s(1920)
|
||||
real*4 sbase(1920)
|
||||
real*4 base
|
||||
real*8 x(1000),y(1000),a(5)
|
||||
data nseg/10/,npct/10/
|
||||
|
||||
df=12000.0/3840.0 !3.125 Hz
|
||||
ia=max(1,nint(nfa/df))
|
||||
ib=nint(nfb/df)
|
||||
do i=ia,ib
|
||||
s(i)=10.0*log10(s(i)) !Convert to dB scale
|
||||
enddo
|
||||
|
||||
nterms=5
|
||||
nlen=(ib-ia+1)/nseg !Length of test segment
|
||||
i0=(ib-ia+1)/2 !Midpoint
|
||||
k=0
|
||||
do n=1,nseg !Loop over all segments
|
||||
ja=ia + (n-1)*nlen
|
||||
jb=ja+nlen-1
|
||||
call pctile(s(ja),nlen,npct,base) !Find lowest npct of points
|
||||
do i=ja,jb
|
||||
if(s(i).le.base) then
|
||||
if (k.lt.1000) k=k+1 !Save all "lower envelope" points
|
||||
x(k)=i-i0
|
||||
y(k)=s(i)
|
||||
endif
|
||||
enddo
|
||||
enddo
|
||||
kz=k
|
||||
a=0.
|
||||
call polyfit(x,y,y,kz,nterms,0,a,chisqr) !Fit a low-order polynomial
|
||||
do i=ia,ib
|
||||
t=i-i0
|
||||
sbase(i)=a(1)+t*(a(2)+t*(a(3)+t*(a(4)+t*(a(5))))) + 0.65
|
||||
! write(51,3051) i*df,s(i),sbase(i)
|
||||
!3051 format(3f12.3)
|
||||
enddo
|
||||
|
||||
return
|
||||
end subroutine baseline
|
||||
Binary file not shown.
@@ -0,0 +1,322 @@
|
||||
program jt9
|
||||
|
||||
! Decoder for JT9. Can run stand-alone, reading data from *.wav files;
|
||||
! or as the back end of wsjt-x, with data placed in a shared memory region.
|
||||
|
||||
use options
|
||||
use prog_args
|
||||
use, intrinsic :: iso_c_binding
|
||||
use FFTW3
|
||||
use timer_module, only: timer
|
||||
use timer_impl, only: init_timer, fini_timer
|
||||
use readwav
|
||||
|
||||
include 'jt9com.f90'
|
||||
|
||||
integer(C_INT) iret
|
||||
type(wav_header) wav
|
||||
real*4 s(NSMAX)
|
||||
character c
|
||||
character(len=500) optarg, infile
|
||||
character wisfile*80
|
||||
!### ndepth was defined as 60001. Why???
|
||||
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700, &
|
||||
fhigh=4000,nrxfreq=1500,ntrperiod=1,ndepth=1,nexp_decode=0
|
||||
logical :: read_files = .true., tx9 = .false., display_help = .false.
|
||||
type (option) :: long_options(25) = [ &
|
||||
option ('help', .false., 'h', 'Display this help message', ''), &
|
||||
option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), &
|
||||
option ('tr-period', .true., 'p', 'Tx/Rx period, default MINUTES=1', &
|
||||
'MINUTES'), &
|
||||
option ('executable-path', .true., 'e', &
|
||||
'Location of subordinate executables (KVASD) default PATH="."', &
|
||||
'PATH'), &
|
||||
option ('data-path', .true., 'a', &
|
||||
'Location of writeable data files, default PATH="."', 'PATH'), &
|
||||
option ('temp-path', .true., 't', &
|
||||
'Temporary files path, default PATH="."', 'PATH'), &
|
||||
option ('lowest', .true., 'L', &
|
||||
'Lowest frequency decoded (JT65), default HERTZ=200', 'HERTZ'), &
|
||||
option ('highest', .true., 'H', &
|
||||
'Highest frequency decoded, default HERTZ=4007', 'HERTZ'), &
|
||||
option ('split', .true., 'S', &
|
||||
'Lowest JT9 frequency decoded, default HERTZ=2700', 'HERTZ'), &
|
||||
option ('rx-frequency', .true., 'f', &
|
||||
'Receive frequency offset, default HERTZ=1500', 'HERTZ'), &
|
||||
option ('patience', .true., 'w', &
|
||||
'FFTW3 planing patience (0-4), default PATIENCE=1', 'PATIENCE'), &
|
||||
option ('fft-threads', .true., 'm', &
|
||||
'Number of threads to process large FFTs, default THREADS=1', &
|
||||
'THREADS'), &
|
||||
option ('jt65', .false., '6', 'JT65 mode', ''), &
|
||||
option ('jt9', .false., '9', 'JT9 mode', ''), &
|
||||
option ('ft8', .false., '8', 'FT8 mode', ''), &
|
||||
option ('jt4', .false., '4', 'JT4 mode', ''), &
|
||||
option ('qra64', .false., 'q', 'QRA64 mode', ''), &
|
||||
option ('sub-mode', .true., 'b', 'Sub mode, default SUBMODE=A', 'A'), &
|
||||
option ('depth', .true., 'd', &
|
||||
'JT9 decoding depth (1-3), default DEPTH=1', 'DEPTH'), &
|
||||
option ('tx-jt9', .false., 'T', 'Tx mode is JT9', ''), &
|
||||
option ('my-call', .true., 'c', 'my callsign', 'CALL'), &
|
||||
option ('my-grid', .true., 'G', 'my grid locator', 'GRID'), &
|
||||
option ('his-call', .true., 'x', 'his callsign', 'CALL'), &
|
||||
option ('his-grid', .true., 'g', 'his grid locator', 'GRID'), &
|
||||
option ('experience-decode', .true., 'X', &
|
||||
'experience based decoding flags (1..n), default FLAGS=0', &
|
||||
'FLAGS') ]
|
||||
|
||||
type(dec_data), allocatable :: shared_data
|
||||
character(len=12) :: mycall, hiscall
|
||||
character(len=6) :: mygrid, hisgrid
|
||||
common/patience/npatience,nthreads
|
||||
common/decstats/ntry65a,ntry65b,n65a,n65b,num9,numfano
|
||||
data npatience/1/,nthreads/1/
|
||||
|
||||
nsubmode = 0
|
||||
|
||||
do
|
||||
call getopt('hs:e:a:b:r:m:p:d:f:w:t:9864qTL:S:H:c:G:x:g:X:', &
|
||||
long_options,c,optarg,arglen,stat,offset,remain,.true.)
|
||||
if (stat .ne. 0) then
|
||||
exit
|
||||
end if
|
||||
select case (c)
|
||||
case ('h')
|
||||
display_help = .true.
|
||||
case ('s')
|
||||
read_files = .false.
|
||||
shm_key = optarg(:arglen)
|
||||
case ('e')
|
||||
exe_dir = optarg(:arglen)
|
||||
case ('a')
|
||||
data_dir = optarg(:arglen)
|
||||
case ('b')
|
||||
nsubmode = ichar (optarg(:1)) - ichar ('A')
|
||||
case ('t')
|
||||
temp_dir = optarg(:arglen)
|
||||
case ('m')
|
||||
read (optarg(:arglen), *) nthreads
|
||||
case ('p')
|
||||
read (optarg(:arglen), *) ntrperiod
|
||||
case ('d')
|
||||
read (optarg(:arglen), *) ndepth
|
||||
case ('f')
|
||||
read (optarg(:arglen), *) nrxfreq
|
||||
case ('L')
|
||||
read (optarg(:arglen), *) flow
|
||||
case ('S')
|
||||
read (optarg(:arglen), *) fsplit
|
||||
case ('H')
|
||||
read (optarg(:arglen), *) fhigh
|
||||
case ('q')
|
||||
mode = 164
|
||||
case ('4')
|
||||
mode = 4
|
||||
case ('6')
|
||||
if (mode.lt.65) mode = mode + 65
|
||||
case ('9')
|
||||
if (mode.lt.9.or.mode.eq.65) mode = mode + 9
|
||||
case ('8')
|
||||
mode = 8
|
||||
case ('T')
|
||||
tx9 = .true.
|
||||
case ('w')
|
||||
read (optarg(:arglen), *) npatience
|
||||
case ('c')
|
||||
read (optarg(:arglen), *) mycall
|
||||
case ('G')
|
||||
read (optarg(:arglen), *) mygrid
|
||||
case ('x')
|
||||
read (optarg(:arglen), *) hiscall
|
||||
case ('g')
|
||||
read (optarg(:arglen), *) hisgrid
|
||||
case ('X')
|
||||
read (optarg(:arglen), *) nexp_decode
|
||||
end select
|
||||
end do
|
||||
|
||||
if (display_help .or. stat .lt. 0 &
|
||||
.or. (.not. read_files .and. remain .gt. 0) &
|
||||
.or. (read_files .and. remain .lt. 1)) then
|
||||
|
||||
print *, 'Usage: jt9 [OPTIONS] file1 [file2 ...]'
|
||||
print *, ' Reads data from *.wav files.'
|
||||
print *, ''
|
||||
print *, ' jt9 -s <key> [-w patience] [-m threads] [-e path] [-a path] [-t path]'
|
||||
print *, ' Gets data from shared memory region with key==<key>'
|
||||
print *, ''
|
||||
print *, 'OPTIONS:'
|
||||
print *, ''
|
||||
do i = 1, size (long_options)
|
||||
call long_options(i) % print (6)
|
||||
end do
|
||||
go to 999
|
||||
endif
|
||||
|
||||
iret=fftwf_init_threads() !Initialize FFTW threading
|
||||
|
||||
! Default to 1 thread, but use nthreads for the big ones
|
||||
call fftwf_plan_with_nthreads(1)
|
||||
|
||||
! Import FFTW wisdom, if available
|
||||
wisfile=trim(data_dir)//'/jt9_wisdom.dat'// C_NULL_CHAR
|
||||
iret=fftwf_import_wisdom_from_filename(wisfile)
|
||||
open(19,file=trim(data_dir)//'/false_decodes.txt',status='unknown', &
|
||||
position='append')
|
||||
|
||||
ntry65a=0
|
||||
ntry65b=0
|
||||
n65a=0
|
||||
n65b=0
|
||||
num9=0
|
||||
numfano=0
|
||||
|
||||
if (.not. read_files) then
|
||||
call jt9a() !We're running under control of WSJT-X
|
||||
go to 999
|
||||
endif
|
||||
|
||||
allocate(shared_data)
|
||||
nflatten=0
|
||||
|
||||
do iarg = offset + 1, offset + remain
|
||||
call get_command_argument (iarg, optarg, arglen)
|
||||
infile = optarg(:arglen)
|
||||
call wav%read (infile)
|
||||
nfsample=wav%audio_format%sample_rate
|
||||
i1=index(infile,'.wav')
|
||||
if(i1.lt.1) i1=index(infile,'.WAV')
|
||||
if(infile(i1-5:i1-5).eq.'_') then
|
||||
read(infile(i1-4:i1-1),*,err=1) nutc
|
||||
else
|
||||
read(infile(i1-6:i1-1),*,err=1) nutc
|
||||
endif
|
||||
go to 2
|
||||
1 nutc=0
|
||||
2 nsps=0
|
||||
if(ntrperiod.eq.1) then
|
||||
nsps=6912
|
||||
shared_data%params%nzhsym=181
|
||||
else if(ntrperiod.eq.2) then
|
||||
nsps=15360
|
||||
shared_data%params%nzhsym=178
|
||||
else if(ntrperiod.eq.5) then
|
||||
nsps=40960
|
||||
shared_data%params%nzhsym=172
|
||||
else if(ntrperiod.eq.10) then
|
||||
nsps=82944
|
||||
shared_data%params%nzhsym=171
|
||||
else if(ntrperiod.eq.30) then
|
||||
nsps=252000
|
||||
shared_data%params%nzhsym=167
|
||||
endif
|
||||
if(nsps.eq.0) stop 'Error: bad TRperiod'
|
||||
|
||||
kstep=nsps/2
|
||||
k=0
|
||||
nhsym0=-999
|
||||
npts=(60*ntrperiod-6)*12000
|
||||
if(iarg .eq. offset + 1) then
|
||||
call init_timer (trim(data_dir)//'/timer.out')
|
||||
call timer('jt9 ',0)
|
||||
endif
|
||||
|
||||
shared_data%id2=0 !??? Why is this necessary ???
|
||||
|
||||
do iblk=1,npts/kstep
|
||||
k=iblk*kstep
|
||||
if(mode.eq.8 .and. k.gt.179712) exit
|
||||
call timer('read_wav',0)
|
||||
read(unit=wav%lun,end=3) shared_data%id2(k-kstep+1:k)
|
||||
go to 4
|
||||
3 call timer('read_wav',1)
|
||||
print*,'EOF on input file ',infile
|
||||
exit
|
||||
4 call timer('read_wav',1)
|
||||
nhsym=(k-2048)/kstep
|
||||
if(nhsym.ge.1 .and. nhsym.ne.nhsym0) then
|
||||
if(mode.eq.9 .or. mode.eq.74) then
|
||||
! Compute rough symbol spectra for the JT9 decoder
|
||||
ingain=0
|
||||
call timer('symspec ',0)
|
||||
nminw=1
|
||||
call symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb, &
|
||||
s,df3,ihsym,npts8,pxdbmax)
|
||||
call timer('symspec ',1)
|
||||
endif
|
||||
nhsym0=nhsym
|
||||
if(nhsym.ge.181) exit
|
||||
endif
|
||||
enddo
|
||||
close(unit=wav%lun)
|
||||
shared_data%params%nutc=nutc
|
||||
shared_data%params%ndiskdat=.true.
|
||||
shared_data%params%ntr=60
|
||||
shared_data%params%nfqso=nrxfreq
|
||||
shared_data%params%newdat=.true.
|
||||
shared_data%params%npts8=74736
|
||||
shared_data%params%nfa=flow
|
||||
shared_data%params%nfsplit=fsplit
|
||||
shared_data%params%nfb=fhigh
|
||||
shared_data%params%ntol=20
|
||||
shared_data%params%kin=64800
|
||||
shared_data%params%nzhsym=181
|
||||
shared_data%params%ndepth=ndepth
|
||||
shared_data%params%lapon=.true.
|
||||
shared_data%params%napwid=75
|
||||
shared_data%params%dttol=3.
|
||||
|
||||
! shared_data%params%minsync=0 !### TEST ONLY
|
||||
! shared_data%params%nfqso=1500 !### TEST ONLY
|
||||
! mycall="G3WDG " !### TEST ONLY
|
||||
! hiscall="VK7MO " !### TEST ONLY
|
||||
! hisgrid="QE37 " !### TEST ONLY
|
||||
if(mode.eq.164 .and. nsubmode.lt.100) nsubmode=nsubmode+100
|
||||
|
||||
shared_data%params%naggressive=0
|
||||
shared_data%params%n2pass=2
|
||||
! shared_data%params%nranera=8 !### ntrials=10000
|
||||
shared_data%params%nranera=6 !### ntrials=3000
|
||||
shared_data%params%nrobust=.false.
|
||||
shared_data%params%nexp_decode=nexp_decode
|
||||
shared_data%params%mycall=mycall
|
||||
shared_data%params%mygrid=mygrid
|
||||
shared_data%params%hiscall=hiscall
|
||||
shared_data%params%hisgrid=hisgrid
|
||||
if (shared_data%params%mycall == '') shared_data%params%mycall='K1ABC'
|
||||
if (shared_data%params%hiscall == '') shared_data%params%hiscall='W9XYZ'
|
||||
if (shared_data%params%hisgrid == '') shared_data%params%hiscall='EN37'
|
||||
if (tx9) then
|
||||
shared_data%params%ntxmode=9
|
||||
else
|
||||
shared_data%params%ntxmode=65
|
||||
end if
|
||||
if (mode.eq.0) then
|
||||
shared_data%params%nmode=65+9
|
||||
else
|
||||
shared_data%params%nmode=mode
|
||||
end if
|
||||
shared_data%params%nsubmode=nsubmode
|
||||
shared_data%params%datetime="2013-Apr-16 15:13" !### Temp
|
||||
if(mode.eq.9 .and. fsplit.ne.2700) shared_data%params%nfa=fsplit
|
||||
call multimode_decoder(shared_data%ss,shared_data%id2,shared_data%params,nfsample)
|
||||
enddo
|
||||
|
||||
call timer('jt9 ',1)
|
||||
call timer('jt9 ',101)
|
||||
|
||||
999 continue
|
||||
! Output decoder statistics
|
||||
call fini_timer ()
|
||||
! open (unit=12, file=trim(data_dir)//'/timer.out', status='unknown', position='append')
|
||||
! write(12,1100) n65a,ntry65a,n65b,ntry65b,numfano,num9
|
||||
!1100 format(58('-')/' JT65_1 Tries_1 JT65_2 Tries_2 JT9 Tries'/ &
|
||||
! 58('-')/6i8)
|
||||
|
||||
! Save wisdom and free memory
|
||||
iret=fftwf_export_wisdom_to_filename(wisfile)
|
||||
call four2a(a,-1,1,1,1)
|
||||
call filbig(a,-1,1,0.0,0,0,0,0,0) !used for FFT plans
|
||||
call fftwf_cleanup_threads()
|
||||
call fftwf_cleanup()
|
||||
end program jt9
|
||||
@@ -0,0 +1,29 @@
|
||||
// Status=review
|
||||
|
||||
Source code for _WSJT-X_ is available from a public repository at
|
||||
{devsvn}. To compile the program you will need to install at least the
|
||||
following packages:
|
||||
|
||||
- Subversion 1.8 or later
|
||||
- Qt 5.2 or later
|
||||
- g++ 4.8 or later
|
||||
- gfortran 4.8 or later
|
||||
- fftw3
|
||||
- MinGW (for Windows only)
|
||||
|
||||
Source code for _WSJT-X_ v{VERSION} can be downloaded with the command:
|
||||
|
||||
=====
|
||||
svn co svn://svn.code.sf.net/p/wsjt/wsjt/tags/wsjtx-{VERSION}
|
||||
=====
|
||||
|
||||
and for the current development branch,
|
||||
|
||||
=====
|
||||
svn co svn://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx
|
||||
=====
|
||||
|
||||
If you are interested in contributing to the development and
|
||||
documentation of _WSJT_ and its sister programs, please join the
|
||||
developer's email list {devmail} and let us know of your areas of
|
||||
interest.
|
||||
@@ -0,0 +1,456 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2000-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)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/apply_wrap.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl {
|
||||
|
||||
template<
|
||||
int N, typename F
|
||||
>
|
||||
struct apply_wrap_impl0;
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
0
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
/// since the defaults are "lost", we have to pass *something* even for nullary
|
||||
/// metafunction classes
|
||||
na
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
1
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
2
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
3
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
4
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap_impl0<
|
||||
5
|
||||
, F
|
||||
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
|
||||
na, na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F
|
||||
>
|
||||
struct apply_wrap0
|
||||
: apply_wrap_impl0<
|
||||
::boost::mpl::aux::arity< F,0 >::value
|
||||
, F
|
||||
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1;
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
1
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
2
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
3
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
4
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap_impl1<
|
||||
5
|
||||
, F
|
||||
, T1
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1
|
||||
, na, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1
|
||||
>
|
||||
struct apply_wrap1
|
||||
: apply_wrap_impl1<
|
||||
::boost::mpl::aux::arity< F,1 >::value
|
||||
, F
|
||||
, T1
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
2
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
3
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
4
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap_impl2<
|
||||
5
|
||||
, F
|
||||
, T1, T2
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2
|
||||
|
||||
, na, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2
|
||||
>
|
||||
struct apply_wrap2
|
||||
: apply_wrap_impl2<
|
||||
::boost::mpl::aux::arity< F,2 >::value
|
||||
, F
|
||||
, T1, T2
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
3
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
4
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap_impl3<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3
|
||||
|
||||
, na, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3
|
||||
>
|
||||
struct apply_wrap3
|
||||
: apply_wrap_impl3<
|
||||
::boost::mpl::aux::arity< F,3 >::value
|
||||
, F
|
||||
, T1, T2, T3
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4<
|
||||
4
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap_impl4<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4
|
||||
|
||||
, na
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
>
|
||||
struct apply_wrap4
|
||||
: apply_wrap_impl4<
|
||||
::boost::mpl::aux::arity< F,4 >::value
|
||||
, F
|
||||
, T1, T2, T3, T4
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
template<
|
||||
int N, typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap_impl5;
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap_impl5<
|
||||
5
|
||||
, F
|
||||
, T1, T2, T3, T4, T5
|
||||
>
|
||||
{
|
||||
typedef typename F::template apply<
|
||||
T1, T2, T3, T4, T5
|
||||
|
||||
> type;
|
||||
};
|
||||
|
||||
template<
|
||||
typename F, typename T1, typename T2, typename T3, typename T4
|
||||
, typename T5
|
||||
>
|
||||
struct apply_wrap5
|
||||
: apply_wrap_impl5<
|
||||
::boost::mpl::aux::arity< F,5 >::value
|
||||
, F
|
||||
, T1, T2, T3, T4, T5
|
||||
>::type
|
||||
{
|
||||
};
|
||||
|
||||
}}
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,39 @@
|
||||
find_program (GZIP_EXECUTABLE NAMES gzip)
|
||||
|
||||
string (TIMESTAMP ts "%w, %d [%m] %Y %H:%M:%S +0000" UTC)
|
||||
|
||||
set (__days Sun Mon Tue Wed Thu Fri Sat)
|
||||
string (SUBSTRING ${ts} 0 1 __index)
|
||||
list (GET __days ${__index} __day)
|
||||
string (REPLACE "${__index}," "${__day}," ts ${ts})
|
||||
|
||||
set (__months Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
|
||||
string (SUBSTRING ${ts} 9 2 __month_index)
|
||||
math (EXPR __index "${__month_index} - 1")
|
||||
list (GET __months "${__index}" __month)
|
||||
string (REPLACE "[${__month_index}]" "${__month}" ts ${ts})
|
||||
|
||||
set (deb_changelog changelog.Debian)
|
||||
configure_file (
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/${deb_changelog}.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/${deb_changelog}"
|
||||
@ONLY)
|
||||
|
||||
add_custom_target (debian
|
||||
COMMAND ${GZIP_EXECUTABLE} -cf9 ${deb_changelog} > ${deb_changelog}.gz
|
||||
DEPENDS ${deb_changelog}.in
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Compressing Debian changelog"
|
||||
)
|
||||
|
||||
configure_file (
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/copyright.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/copyright"
|
||||
@ONLY)
|
||||
|
||||
install (FILES
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${deb_changelog}.gz
|
||||
${CMAKE_CURRENT_BINARY_DIR}/copyright
|
||||
DESTINATION ${CMAKE_INSTALL_DOCDIR}
|
||||
#COMPONENT Debian
|
||||
)
|
||||
@@ -0,0 +1,77 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2001-2011 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)
|
||||
|
||||
This is an auto-generated file. Do not edit!
|
||||
==============================================================================*/
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct fusion_sequence_tag;
|
||||
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9>
|
||||
struct set : sequence_base<set<T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9> >
|
||||
{
|
||||
struct category : forward_traversal_tag, associative_tag {};
|
||||
typedef set_tag fusion_tag;
|
||||
typedef fusion_sequence_tag tag;
|
||||
typedef mpl::false_ is_view;
|
||||
typedef vector<
|
||||
T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9>
|
||||
storage_type;
|
||||
typedef typename storage_type::size size;
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set()
|
||||
: data() {}
|
||||
template <typename Sequence>
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(Sequence const& rhs
|
||||
, typename enable_if<traits::is_sequence<Sequence>, detail::enabler_>::type = detail::enabler)
|
||||
: data(rhs) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit
|
||||
set(typename detail::call_param<T0 >::type arg0)
|
||||
: data(arg0) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1)
|
||||
: data(arg0 , arg1) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2)
|
||||
: data(arg0 , arg1 , arg2) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3)
|
||||
: data(arg0 , arg1 , arg2 , arg3) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8) {}
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set(typename detail::call_param<T0 >::type arg0 , typename detail::call_param<T1 >::type arg1 , typename detail::call_param<T2 >::type arg2 , typename detail::call_param<T3 >::type arg3 , typename detail::call_param<T4 >::type arg4 , typename detail::call_param<T5 >::type arg5 , typename detail::call_param<T6 >::type arg6 , typename detail::call_param<T7 >::type arg7 , typename detail::call_param<T8 >::type arg8 , typename detail::call_param<T9 >::type arg9)
|
||||
: data(arg0 , arg1 , arg2 , arg3 , arg4 , arg5 , arg6 , arg7 , arg8 , arg9) {}
|
||||
template <typename T>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
set&
|
||||
operator=(T const& rhs)
|
||||
{
|
||||
data = rhs;
|
||||
return *this;
|
||||
}
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
storage_type& get_data() { return data; }
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
storage_type const& get_data() const { return data; }
|
||||
private:
|
||||
storage_type data;
|
||||
};
|
||||
}}
|
||||
@@ -0,0 +1,241 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2005-2012. 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 code are taken from boost::filesystem library
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright (C) 2002 Beman Dawes
|
||||
// Copyright (C) 2001 Dietmar Kuehl
|
||||
// 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)
|
||||
//
|
||||
// See library home page at http://www.boost.org/libs/filesystem
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef BOOST_INTERPROCESS_ERRORS_HPP
|
||||
#define BOOST_INTERPROCESS_ERRORS_HPP
|
||||
|
||||
#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 <stdarg.h>
|
||||
#include <string>
|
||||
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
# include <boost/interprocess/detail/win32_api.hpp>
|
||||
#else
|
||||
# ifdef BOOST_HAS_UNISTD_H
|
||||
# include <errno.h> //Errors
|
||||
# include <cstring> //strerror
|
||||
# else //ifdef BOOST_HAS_UNISTD_H
|
||||
# error Unknown platform
|
||||
# endif //ifdef BOOST_HAS_UNISTD_H
|
||||
#endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
|
||||
//!\file
|
||||
//!Describes the error numbering of interprocess classes
|
||||
|
||||
namespace boost {
|
||||
namespace interprocess {
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
inline int system_error_code() // artifact of POSIX and WINDOWS error reporting
|
||||
{
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
return winapi::get_last_error();
|
||||
#else
|
||||
return errno; // GCC 3.1 won't accept ::errno
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
inline void fill_system_message(int sys_err_code, std::string &str)
|
||||
{
|
||||
void *lpMsgBuf;
|
||||
winapi::format_message(
|
||||
winapi::format_message_allocate_buffer |
|
||||
winapi::format_message_from_system |
|
||||
winapi::format_message_ignore_inserts,
|
||||
0,
|
||||
sys_err_code,
|
||||
winapi::make_lang_id(winapi::lang_neutral, winapi::sublang_default), // Default language
|
||||
reinterpret_cast<char *>(&lpMsgBuf),
|
||||
0,
|
||||
0
|
||||
);
|
||||
str += static_cast<const char*>(lpMsgBuf);
|
||||
winapi::local_free( lpMsgBuf ); // free the buffer
|
||||
while ( str.size()
|
||||
&& (str[str.size()-1] == '\n' || str[str.size()-1] == '\r') )
|
||||
str.erase( str.size()-1 );
|
||||
}
|
||||
# else
|
||||
inline void fill_system_message( int system_error, std::string &str)
|
||||
{ str = std::strerror(system_error); }
|
||||
# endif
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
|
||||
enum error_code_t
|
||||
{
|
||||
no_error = 0,
|
||||
system_error, // system generated error; if possible, is translated
|
||||
// to one of the more specific errors below.
|
||||
other_error, // library generated error
|
||||
security_error, // includes access rights, permissions failures
|
||||
read_only_error,
|
||||
io_error,
|
||||
path_error,
|
||||
not_found_error,
|
||||
// not_directory_error,
|
||||
busy_error, // implies trying again might succeed
|
||||
already_exists_error,
|
||||
not_empty_error,
|
||||
is_directory_error,
|
||||
out_of_space_error,
|
||||
out_of_memory_error,
|
||||
out_of_resource_error,
|
||||
lock_error,
|
||||
sem_error,
|
||||
mode_error,
|
||||
size_error,
|
||||
corrupted_error,
|
||||
not_such_file_or_directory,
|
||||
invalid_argument,
|
||||
timeout_when_locking_error,
|
||||
timeout_when_waiting_error,
|
||||
owner_dead_error
|
||||
};
|
||||
|
||||
typedef int native_error_t;
|
||||
|
||||
#if !defined(BOOST_INTERPROCESS_DOXYGEN_INVOKED)
|
||||
struct ec_xlate
|
||||
{
|
||||
native_error_t sys_ec;
|
||||
error_code_t ec;
|
||||
};
|
||||
|
||||
static const ec_xlate ec_table[] =
|
||||
{
|
||||
#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
{ /*ERROR_ACCESS_DENIED*/5L, security_error },
|
||||
{ /*ERROR_INVALID_ACCESS*/12L, security_error },
|
||||
{ /*ERROR_SHARING_VIOLATION*/32L, security_error },
|
||||
{ /*ERROR_LOCK_VIOLATION*/33L, security_error },
|
||||
{ /*ERROR_LOCKED*/212L, security_error },
|
||||
{ /*ERROR_NOACCESS*/998L, security_error },
|
||||
{ /*ERROR_WRITE_PROTECT*/19L, read_only_error },
|
||||
{ /*ERROR_NOT_READY*/21L, io_error },
|
||||
{ /*ERROR_SEEK*/25L, io_error },
|
||||
{ /*ERROR_READ_FAULT*/30L, io_error },
|
||||
{ /*ERROR_WRITE_FAULT*/29L, io_error },
|
||||
{ /*ERROR_CANTOPEN*/1011L, io_error },
|
||||
{ /*ERROR_CANTREAD*/1012L, io_error },
|
||||
{ /*ERROR_CANTWRITE*/1013L, io_error },
|
||||
{ /*ERROR_DIRECTORY*/267L, path_error },
|
||||
{ /*ERROR_INVALID_NAME*/123L, path_error },
|
||||
{ /*ERROR_FILE_NOT_FOUND*/2L, not_found_error },
|
||||
{ /*ERROR_PATH_NOT_FOUND*/3L, not_found_error },
|
||||
{ /*ERROR_DEV_NOT_EXIST*/55L, not_found_error },
|
||||
{ /*ERROR_DEVICE_IN_USE*/2404L, busy_error },
|
||||
{ /*ERROR_OPEN_FILES*/2401L, busy_error },
|
||||
{ /*ERROR_BUSY_DRIVE*/142L, busy_error },
|
||||
{ /*ERROR_BUSY*/170L, busy_error },
|
||||
{ /*ERROR_FILE_EXISTS*/80L, already_exists_error },
|
||||
{ /*ERROR_ALREADY_EXISTS*/183L, already_exists_error },
|
||||
{ /*ERROR_DIR_NOT_EMPTY*/145L, not_empty_error },
|
||||
{ /*ERROR_HANDLE_DISK_FULL*/39L, out_of_space_error },
|
||||
{ /*ERROR_DISK_FULL*/112L, out_of_space_error },
|
||||
{ /*ERROR_OUTOFMEMORY*/14L, out_of_memory_error },
|
||||
{ /*ERROR_NOT_ENOUGH_MEMORY*/8L, out_of_memory_error },
|
||||
{ /*ERROR_TOO_MANY_OPEN_FILES*/4L, out_of_resource_error },
|
||||
{ /*ERROR_INVALID_ADDRESS*/487L, busy_error }
|
||||
#else //#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
{ EACCES, security_error },
|
||||
{ EROFS, read_only_error },
|
||||
{ EIO, io_error },
|
||||
{ ENAMETOOLONG, path_error },
|
||||
{ ENOENT, not_found_error },
|
||||
// { ENOTDIR, not_directory_error },
|
||||
{ EAGAIN, busy_error },
|
||||
{ EBUSY, busy_error },
|
||||
{ ETXTBSY, busy_error },
|
||||
{ EEXIST, already_exists_error },
|
||||
{ ENOTEMPTY, not_empty_error },
|
||||
{ EISDIR, is_directory_error },
|
||||
{ ENOSPC, out_of_space_error },
|
||||
{ ENOMEM, out_of_memory_error },
|
||||
{ EMFILE, out_of_resource_error },
|
||||
{ ENOENT, not_such_file_or_directory },
|
||||
{ EINVAL, invalid_argument }
|
||||
#endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
|
||||
};
|
||||
|
||||
inline error_code_t lookup_error(native_error_t err)
|
||||
{
|
||||
const ec_xlate *cur = &ec_table[0],
|
||||
*end = cur + sizeof(ec_table)/sizeof(ec_xlate);
|
||||
for (;cur != end; ++cur ){
|
||||
if ( err == cur->sys_ec ) return cur->ec;
|
||||
}
|
||||
return system_error; // general system error code
|
||||
}
|
||||
|
||||
struct error_info
|
||||
{
|
||||
error_info(error_code_t ec = other_error )
|
||||
: m_nat(0), m_ec(ec)
|
||||
{}
|
||||
|
||||
error_info(native_error_t sys_err_code)
|
||||
: m_nat(sys_err_code), m_ec(lookup_error(sys_err_code))
|
||||
{}
|
||||
|
||||
error_info & operator =(error_code_t ec)
|
||||
{
|
||||
m_nat = 0;
|
||||
m_ec = ec;
|
||||
return *this;
|
||||
}
|
||||
|
||||
error_info & operator =(native_error_t sys_err_code)
|
||||
{
|
||||
m_nat = sys_err_code;
|
||||
m_ec = lookup_error(sys_err_code);
|
||||
return *this;
|
||||
}
|
||||
|
||||
native_error_t get_native_error()const
|
||||
{ return m_nat; }
|
||||
|
||||
error_code_t get_error_code()const
|
||||
{ return m_ec; }
|
||||
|
||||
private:
|
||||
native_error_t m_nat;
|
||||
error_code_t m_ec;
|
||||
};
|
||||
#endif //#ifndef BOOST_INTERPROCESS_DOXYGEN_INVOKED
|
||||
|
||||
} // namespace interprocess {
|
||||
} // namespace boost
|
||||
|
||||
#include <boost/interprocess/detail/config_end.hpp>
|
||||
|
||||
#endif // BOOST_INTERPROCESS_ERRORS_HPP
|
||||
@@ -0,0 +1,167 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/integrate/detail/integrate_const.hpp
|
||||
|
||||
[begin_description]
|
||||
integrate const implementation
|
||||
[end_description]
|
||||
|
||||
Copyright 2012-2015 Mario Mulansky
|
||||
Copyright 2012 Christoph Koke
|
||||
Copyright 2012 Karsten Ahnert
|
||||
|
||||
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_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_CONST_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_CONST_HPP_INCLUDED
|
||||
|
||||
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
|
||||
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
|
||||
#include <boost/numeric/odeint/util/unit_helper.hpp>
|
||||
#include <boost/numeric/odeint/integrate/detail/integrate_adaptive.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/util/detail/less_with_sign.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
namespace detail {
|
||||
|
||||
// forward declaration
|
||||
template< class Stepper , class System , class State , class Time , class Observer >
|
||||
size_t integrate_adaptive(
|
||||
Stepper stepper , System system , State &start_state ,
|
||||
Time &start_time , Time end_time , Time &dt ,
|
||||
Observer observer , controlled_stepper_tag
|
||||
);
|
||||
|
||||
|
||||
template< class Stepper , class System , class State , class Time , class Observer >
|
||||
size_t integrate_const(
|
||||
Stepper stepper , System system , State &start_state ,
|
||||
Time start_time , Time end_time , Time dt ,
|
||||
Observer observer , stepper_tag
|
||||
)
|
||||
{
|
||||
|
||||
typename odeint::unwrap_reference< Observer >::type &obs = observer;
|
||||
typename odeint::unwrap_reference< Stepper >::type &st = stepper;
|
||||
|
||||
Time time = start_time;
|
||||
int step = 0;
|
||||
// cast time+dt explicitely in case of expression templates (e.g. multiprecision)
|
||||
while( less_eq_with_sign( static_cast<Time>(time+dt) , end_time , dt ) )
|
||||
{
|
||||
obs( start_state , time );
|
||||
st.do_step( system , start_state , time , dt );
|
||||
// direct computation of the time avoids error propagation happening when using time += dt
|
||||
// we need clumsy type analysis to get boost units working here
|
||||
++step;
|
||||
time = start_time + static_cast< typename unit_value_type<Time>::type >(step) * dt;
|
||||
}
|
||||
obs( start_state , time );
|
||||
|
||||
return step;
|
||||
}
|
||||
|
||||
|
||||
|
||||
template< class Stepper , class System , class State , class Time , class Observer >
|
||||
size_t integrate_const(
|
||||
Stepper stepper , System system , State &start_state ,
|
||||
Time start_time , Time end_time , Time dt ,
|
||||
Observer observer , controlled_stepper_tag
|
||||
)
|
||||
{
|
||||
typename odeint::unwrap_reference< Observer >::type &obs = observer;
|
||||
|
||||
Time time = start_time;
|
||||
const Time time_step = dt;
|
||||
int real_steps = 0;
|
||||
int step = 0;
|
||||
|
||||
while( less_eq_with_sign( static_cast<Time>(time+time_step) , end_time , dt ) )
|
||||
{
|
||||
obs( start_state , time );
|
||||
// integrate_adaptive_checked uses the given checker to throw if an overflow occurs
|
||||
real_steps += detail::integrate_adaptive(stepper, system, start_state, time,
|
||||
static_cast<Time>(time + time_step), dt,
|
||||
null_observer(), controlled_stepper_tag());
|
||||
// direct computation of the time avoids error propagation happening when using time += dt
|
||||
// we need clumsy type analysis to get boost units working here
|
||||
step++;
|
||||
time = start_time + static_cast< typename unit_value_type<Time>::type >(step) * time_step;
|
||||
}
|
||||
obs( start_state , time );
|
||||
|
||||
return real_steps;
|
||||
}
|
||||
|
||||
|
||||
template< class Stepper , class System , class State , class Time , class Observer >
|
||||
size_t integrate_const(
|
||||
Stepper stepper , System system , State &start_state ,
|
||||
Time start_time , Time end_time , Time dt ,
|
||||
Observer observer , dense_output_stepper_tag
|
||||
)
|
||||
{
|
||||
typename odeint::unwrap_reference< Observer >::type &obs = observer;
|
||||
typename odeint::unwrap_reference< Stepper >::type &st = stepper;
|
||||
|
||||
Time time = start_time;
|
||||
|
||||
st.initialize( start_state , time , dt );
|
||||
obs( start_state , time );
|
||||
time += dt;
|
||||
|
||||
int obs_step( 1 );
|
||||
int real_step( 0 );
|
||||
|
||||
while( less_eq_with_sign( static_cast<Time>(time+dt) , end_time , dt ) )
|
||||
{
|
||||
while( less_eq_with_sign( time , st.current_time() , dt ) )
|
||||
{
|
||||
st.calc_state( time , start_state );
|
||||
obs( start_state , time );
|
||||
++obs_step;
|
||||
// direct computation of the time avoids error propagation happening when using time += dt
|
||||
// we need clumsy type analysis to get boost units working here
|
||||
time = start_time + static_cast< typename unit_value_type<Time>::type >(obs_step) * dt;
|
||||
}
|
||||
// we have not reached the end, do another real step
|
||||
if( less_with_sign( static_cast<Time>(st.current_time()+st.current_time_step()) ,
|
||||
end_time ,
|
||||
st.current_time_step() ) )
|
||||
{
|
||||
while( less_eq_with_sign( st.current_time() , time , dt ) )
|
||||
{
|
||||
st.do_step( system );
|
||||
++real_step;
|
||||
}
|
||||
}
|
||||
else if( less_with_sign( st.current_time() , end_time , st.current_time_step() ) )
|
||||
{ // do the last step ending exactly on the end point
|
||||
st.initialize( st.current_state() , st.current_time() , end_time - st.current_time() );
|
||||
st.do_step( system );
|
||||
++real_step;
|
||||
}
|
||||
|
||||
}
|
||||
// last observation, if we are still in observation interval
|
||||
// might happen due to finite precision problems when computing the the time
|
||||
if( less_eq_with_sign( time , end_time , dt ) )
|
||||
{
|
||||
st.calc_state( time , start_state );
|
||||
obs( start_state , time );
|
||||
}
|
||||
|
||||
return real_step;
|
||||
}
|
||||
|
||||
|
||||
} } } }
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,52 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2011 Eric Niebler
|
||||
|
||||
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_SEGMENTED_FOR_EACH_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_SEGMENTED_FOR_EACH_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/fusion/support/void.hpp>
|
||||
#include <boost/fusion/algorithm/iteration/for_each_fwd.hpp>
|
||||
#include <boost/fusion/support/segmented_fold_until.hpp>
|
||||
|
||||
namespace boost { namespace fusion { namespace detail
|
||||
{
|
||||
template <typename Fun>
|
||||
struct segmented_for_each_fun
|
||||
{
|
||||
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
explicit segmented_for_each_fun(Fun const& f)
|
||||
: fun(f)
|
||||
{}
|
||||
|
||||
Fun const& fun;
|
||||
|
||||
template <typename Sequence, typename State, typename Context>
|
||||
struct apply
|
||||
{
|
||||
typedef void_ type;
|
||||
typedef mpl::true_ continue_type;
|
||||
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
static type call(Sequence& seq, State const&, Context const&, segmented_for_each_fun const& fun)
|
||||
{
|
||||
fusion::for_each(seq, fun.fun);
|
||||
return void_();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
template <typename Sequence, typename F>
|
||||
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
|
||||
inline void
|
||||
for_each(Sequence& seq, F const& f, mpl::true_) // segmented implementation
|
||||
{
|
||||
fusion::segmented_fold_until(seq, void_(), segmented_for_each_fun<F>(f));
|
||||
}
|
||||
}}}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,49 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// 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).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_BIT_XOR_HPP_INCLUDED
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_bit_xor
|
||||
#define BOOST_TT_TRAIT_OP ^
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
(\
|
||||
/* Lhs==fundamental and Rhs==fundamental and (Lhs!=integral or Rhs!=integral) */\
|
||||
(\
|
||||
::boost::is_fundamental< Lhs_nocv >::value && \
|
||||
::boost::is_fundamental< Rhs_nocv >::value && \
|
||||
( \
|
||||
(! ::boost::is_integral< Lhs_noref >::value ) || \
|
||||
(! ::boost::is_integral< Rhs_noref >::value )\
|
||||
)\
|
||||
)||\
|
||||
/* Lhs==fundamental and Rhs==pointer */\
|
||||
(\
|
||||
::boost::is_fundamental< Lhs_nocv >::value && \
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
)||\
|
||||
/* Rhs==fundamental and Lhs==pointer */\
|
||||
(\
|
||||
::boost::is_fundamental< Rhs_nocv >::value && \
|
||||
::boost::is_pointer< Lhs_noref >::value\
|
||||
)||\
|
||||
/* Lhs==pointer and Rhs==pointer */\
|
||||
(\
|
||||
::boost::is_pointer< Lhs_noref >::value && \
|
||||
::boost::is_pointer< Rhs_noref >::value\
|
||||
)\
|
||||
)
|
||||
|
||||
|
||||
#include <boost/type_traits/detail/has_binary_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user