Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
TAGS
tags
+1
View File
@@ -0,0 +1 @@
12
+1
View File
@@ -0,0 +1 @@
12
@@ -0,0 +1,16 @@
/*=============================================================================
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 void_;
template <
typename T0 = void_ , typename T1 = void_ , typename T2 = void_ , typename T3 = void_ , typename T4 = void_ , typename T5 = void_ , typename T6 = void_ , typename T7 = void_ , typename T8 = void_ , typename T9 = void_ , typename T10 = void_ , typename T11 = void_ , typename T12 = void_ , typename T13 = void_ , typename T14 = void_ , typename T15 = void_ , typename T16 = void_ , typename T17 = void_ , typename T18 = void_ , typename T19 = void_
>
struct tuple;
}}
@@ -0,0 +1,205 @@
// (C) Copyright John Maddock 2001 - 2003.
// (C) Copyright Jens Maurer 2001.
// (C) Copyright David Abrahams 2003.
// (C) Copyright Boris Gubenko 2007.
// 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 for most recent version.
// Rogue Wave std lib:
#define BOOST_RW_STDLIB 1
#if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
# include <boost/config/no_tr1/utility.hpp>
# if !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER)
# error This is not the Rogue Wave standard library
# endif
#endif
//
// figure out a consistent version number:
//
#ifndef _RWSTD_VER
# define BOOST_RWSTD_VER 0x010000
#elif _RWSTD_VER < 0x010000
# define BOOST_RWSTD_VER (_RWSTD_VER << 8)
#else
# define BOOST_RWSTD_VER _RWSTD_VER
#endif
#ifndef _RWSTD_VER
# define BOOST_STDLIB "Rogue Wave standard library version (Unknown version)"
#elif _RWSTD_VER < 0x04010200
# define BOOST_STDLIB "Rogue Wave standard library version " BOOST_STRINGIZE(_RWSTD_VER)
#else
# ifdef _RWSTD_VER_STR
# define BOOST_STDLIB "Apache STDCXX standard library version " _RWSTD_VER_STR
# else
# define BOOST_STDLIB "Apache STDCXX standard library version " BOOST_STRINGIZE(_RWSTD_VER)
# endif
#endif
//
// Prior to version 2.2.0 the primary template for std::numeric_limits
// does not have compile time constants, even though specializations of that
// template do:
//
#if BOOST_RWSTD_VER < 0x020200
# define BOOST_NO_LIMITS_COMPILE_TIME_CONSTANTS
#endif
// Sun CC 5.5 patch 113817-07 adds long long specialization, but does not change the
// library version number (http://sunsolve6.sun.com/search/document.do?assetkey=1-21-113817):
#if BOOST_RWSTD_VER <= 0x020101 && (!defined(__SUNPRO_CC) || (__SUNPRO_CC < 0x550))
# define BOOST_NO_LONG_LONG_NUMERIC_LIMITS
# endif
//
// Borland version of numeric_limits lacks __int64 specialisation:
//
#ifdef __BORLANDC__
# define BOOST_NO_MS_INT64_NUMERIC_LIMITS
#endif
//
// No std::iterator if it can't figure out default template args:
//
#if defined(_RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || defined(RWSTD_NO_SIMPLE_DEFAULT_TEMPLATES) || (BOOST_RWSTD_VER < 0x020000)
# define BOOST_NO_STD_ITERATOR
#endif
//
// No iterator traits without partial specialization:
//
#if defined(_RWSTD_NO_CLASS_PARTIAL_SPEC) || defined(RWSTD_NO_CLASS_PARTIAL_SPEC)
# define BOOST_NO_STD_ITERATOR_TRAITS
#endif
//
// Prior to version 2.0, std::auto_ptr was buggy, and there were no
// new-style iostreams, and no conformant std::allocator:
//
#if (BOOST_RWSTD_VER < 0x020000)
# define BOOST_NO_AUTO_PTR
# define BOOST_NO_STRINGSTREAM
# define BOOST_NO_STD_ALLOCATOR
# define BOOST_NO_STD_LOCALE
#endif
//
// No template iterator constructors without member template support:
//
#if defined(RWSTD_NO_MEMBER_TEMPLATES) || defined(_RWSTD_NO_MEMBER_TEMPLATES)
# define BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS
#endif
//
// RW defines _RWSTD_ALLOCATOR if the allocator is conformant and in use
// (the or _HPACC_ part is a hack - the library seems to define _RWSTD_ALLOCATOR
// on HP aCC systems even though the allocator is in fact broken):
//
#if !defined(_RWSTD_ALLOCATOR) || (defined(__HP_aCC) && __HP_aCC <= 33100)
# define BOOST_NO_STD_ALLOCATOR
#endif
//
// If we have a std::locale, we still may not have std::use_facet:
//
#if defined(_RWSTD_NO_TEMPLATE_ON_RETURN_TYPE) && !defined(BOOST_NO_STD_LOCALE)
# define BOOST_NO_STD_USE_FACET
# define BOOST_HAS_TWO_ARG_USE_FACET
#endif
//
// There's no std::distance prior to version 2, or without
// partial specialization support:
//
#if (BOOST_RWSTD_VER < 0x020000) || defined(_RWSTD_NO_CLASS_PARTIAL_SPEC)
#define BOOST_NO_STD_DISTANCE
#endif
//
// Some versions of the rogue wave library don't have assignable
// OutputIterators:
//
#if BOOST_RWSTD_VER < 0x020100
# define BOOST_NO_STD_OUTPUT_ITERATOR_ASSIGN
#endif
//
// Disable BOOST_HAS_LONG_LONG when the library has no support for it.
//
#if !defined(_RWSTD_LONG_LONG) && defined(BOOST_HAS_LONG_LONG)
# undef BOOST_HAS_LONG_LONG
#endif
//
// check that on HP-UX, the proper RW library is used
//
#if defined(__HP_aCC) && !defined(_HP_NAMESPACE_STD)
# error "Boost requires Standard RW library. Please compile and link with -AA"
#endif
//
// Define macros specific to RW V2.2 on HP-UX
//
#if defined(__HP_aCC) && (BOOST_RWSTD_VER == 0x02020100)
# ifndef __HP_TC1_MAKE_PAIR
# define __HP_TC1_MAKE_PAIR
# endif
# ifndef _HP_INSTANTIATE_STD2_VL
# define _HP_INSTANTIATE_STD2_VL
# endif
#endif
#if _RWSTD_VER < 0x05000000
# define BOOST_NO_CXX11_HDR_ARRAY
#endif
// type_traits header is incomplete:
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
//
// C++0x headers not yet implemented
//
# define BOOST_NO_CXX11_HDR_CHRONO
# define BOOST_NO_CXX11_HDR_CODECVT
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
# define BOOST_NO_CXX11_HDR_FUTURE
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
# define BOOST_NO_CXX11_HDR_MUTEX
# define BOOST_NO_CXX11_HDR_RANDOM
# define BOOST_NO_CXX11_HDR_RATIO
# define BOOST_NO_CXX11_HDR_REGEX
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
# define BOOST_NO_CXX11_HDR_THREAD
# define BOOST_NO_CXX11_HDR_TUPLE
# define BOOST_NO_CXX11_HDR_TYPEINDEX
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
# define BOOST_NO_CXX11_NUMERIC_LIMITS
# define BOOST_NO_CXX11_ALLOCATOR
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
# define BOOST_NO_CXX11_SMART_PTR
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
# define BOOST_NO_CXX11_HDR_ATOMIC
# define BOOST_NO_CXX11_STD_ALIGN
# define BOOST_NO_CXX11_ADDRESSOF
#if defined(__has_include)
#if !__has_include(<shared_mutex>)
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#elif __cplusplus < 201402
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
#else
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
#endif
// C++14 features
# define BOOST_NO_CXX14_STD_EXCHANGE
// C++17 features
# define BOOST_NO_CXX17_STD_APPLY
# define BOOST_NO_CXX17_STD_INVOKE
@@ -0,0 +1,42 @@
subroutine ft8_downsample(dd,newdat,f0,c1)
! Downconvert to complex data sampled at 200 Hz ==> 32 samples/symbol
parameter (NMAX=15*12000,NSPS=1920)
parameter (NFFT1=192000,NFFT2=3200) !192000/60 = 3200
logical newdat
complex c1(0:NFFT2-1)
complex cx(0:NFFT1/2)
real dd(NMAX),x(NFFT1)
equivalence (x,cx)
save cx
if(newdat) then
! Data in dd have changed, recompute the long FFT
x(1:NMAX)=dd
x(NMAX+1:NFFT1)=0. !Zero-pad the x array
call four2a(cx,NFFT1,1,-1,0) !r2c FFT to freq domain
newdat=.false.
endif
df=12000.0/NFFT1
baud=12000.0/NSPS
i0=nint(f0/df)
ft=f0+8.0*baud
it=min(nint(ft/df),NFFT1/2)
fb=f0-1.0*baud
ib=max(1,nint(fb/df))
k=0
c1=0.
do i=ib,it
c1(k)=cx(i)
k=k+1
enddo
c1=cshift(c1,i0-ib)
call four2a(c1,NFFT2,1,1,1) !c2c FFT back to time domain
fac=1.0/sqrt(float(NFFT1)*NFFT2)
c1=fac*c1
return
end subroutine ft8_downsample
@@ -0,0 +1,85 @@
//////////////////////////////////////////////////////////////////////////////
//
// (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.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP
#define BOOST_INTERPROCESS_CREATION_TAGS_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>
namespace boost {
namespace interprocess {
//!Tag to indicate that the resource must
//!be only created
struct create_only_t {};
//!Tag to indicate that the resource must
//!be only opened
struct open_only_t {};
//!Tag to indicate that the resource must
//!be only opened for reading
struct open_read_only_t {};
//!Tag to indicate that the resource must
//!be only opened privately for reading
struct open_read_private_t {};
//!Tag to indicate that the resource must
//!be only opened for reading
struct open_copy_on_write_t {};
//!Tag to indicate that the resource must
//!be created. If already created, it must be opened.
struct open_or_create_t {};
//!Value to indicate that the resource must
//!be only created
static const create_only_t create_only = create_only_t();
//!Value to indicate that the resource must
//!be only opened
static const open_only_t open_only = open_only_t();
//!Value to indicate that the resource must
//!be only opened for reading
static const open_read_only_t open_read_only = open_read_only_t();
//!Value to indicate that the resource must
//!be created. If already created, it must be opened.
static const open_or_create_t open_or_create = open_or_create_t();
//!Value to indicate that the resource must
//!be only opened for reading
static const open_copy_on_write_t open_copy_on_write = open_copy_on_write_t();
namespace ipcdetail {
enum create_enum_t
{ DoCreate, DoOpen, DoOpenOrCreate };
} //namespace ipcdetail {
} //namespace interprocess {
} //namespace boost {
#include <boost/interprocess/detail/config_end.hpp>
#endif //#ifndef BOOST_INTERPROCESS_CREATION_TAGS_HPP
@@ -0,0 +1,350 @@
// Copyright Aleksey Gurtovoy 2000-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)
//
// Preprocessed version of "boost/mpl/map/map10.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<>
struct m_at_impl<0>
{
template< typename Map > struct result_
{
typedef typename Map::item0 type;
};
};
template<>
struct m_item_impl<1>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item0;
};
};
template<
typename P0
>
struct map1
: m_item<
1
, typename P0::first
, typename P0::second
, map0< >
>
{
typedef map1 type;
};
template<>
struct m_at_impl<1>
{
template< typename Map > struct result_
{
typedef typename Map::item1 type;
};
};
template<>
struct m_item_impl<2>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item1;
};
};
template<
typename P0, typename P1
>
struct map2
: m_item<
2
, typename P1::first
, typename P1::second
, map1<P0>
>
{
typedef map2 type;
};
template<>
struct m_at_impl<2>
{
template< typename Map > struct result_
{
typedef typename Map::item2 type;
};
};
template<>
struct m_item_impl<3>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item2;
};
};
template<
typename P0, typename P1, typename P2
>
struct map3
: m_item<
3
, typename P2::first
, typename P2::second
, map2< P0,P1 >
>
{
typedef map3 type;
};
template<>
struct m_at_impl<3>
{
template< typename Map > struct result_
{
typedef typename Map::item3 type;
};
};
template<>
struct m_item_impl<4>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item3;
};
};
template<
typename P0, typename P1, typename P2, typename P3
>
struct map4
: m_item<
4
, typename P3::first
, typename P3::second
, map3< P0,P1,P2 >
>
{
typedef map4 type;
};
template<>
struct m_at_impl<4>
{
template< typename Map > struct result_
{
typedef typename Map::item4 type;
};
};
template<>
struct m_item_impl<5>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item4;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
>
struct map5
: m_item<
5
, typename P4::first
, typename P4::second
, map4< P0,P1,P2,P3 >
>
{
typedef map5 type;
};
template<>
struct m_at_impl<5>
{
template< typename Map > struct result_
{
typedef typename Map::item5 type;
};
};
template<>
struct m_item_impl<6>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item5;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
, typename P5
>
struct map6
: m_item<
6
, typename P5::first
, typename P5::second
, map5< P0,P1,P2,P3,P4 >
>
{
typedef map6 type;
};
template<>
struct m_at_impl<6>
{
template< typename Map > struct result_
{
typedef typename Map::item6 type;
};
};
template<>
struct m_item_impl<7>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item6;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
, typename P5, typename P6
>
struct map7
: m_item<
7
, typename P6::first
, typename P6::second
, map6< P0,P1,P2,P3,P4,P5 >
>
{
typedef map7 type;
};
template<>
struct m_at_impl<7>
{
template< typename Map > struct result_
{
typedef typename Map::item7 type;
};
};
template<>
struct m_item_impl<8>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item7;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
, typename P5, typename P6, typename P7
>
struct map8
: m_item<
8
, typename P7::first
, typename P7::second
, map7< P0,P1,P2,P3,P4,P5,P6 >
>
{
typedef map8 type;
};
template<>
struct m_at_impl<8>
{
template< typename Map > struct result_
{
typedef typename Map::item8 type;
};
};
template<>
struct m_item_impl<9>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item8;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
, typename P5, typename P6, typename P7, typename P8
>
struct map9
: m_item<
9
, typename P8::first
, typename P8::second
, map8< P0,P1,P2,P3,P4,P5,P6,P7 >
>
{
typedef map9 type;
};
template<>
struct m_at_impl<9>
{
template< typename Map > struct result_
{
typedef typename Map::item9 type;
};
};
template<>
struct m_item_impl<10>
{
template< typename Key, typename T, typename Base > struct result_
: m_item_< Key,T,Base >
{
typedef pair< Key,T > item9;
};
};
template<
typename P0, typename P1, typename P2, typename P3, typename P4
, typename P5, typename P6, typename P7, typename P8, typename P9
>
struct map10
: m_item<
10
, typename P9::first
, typename P9::second
, map9< P0,P1,P2,P3,P4,P5,P6,P7,P8 >
>
{
typedef map10 type;
};
}}
@@ -0,0 +1,91 @@
#ifndef BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
#define BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_iserializer.hpp: extenstion of type_info required for serialization.
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// 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 http://www.boost.org for updates, documentation, and revision history.
#include <cstdlib> // NULL
#include <boost/config.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/archive/detail/decl.hpp>
#include <boost/archive/detail/basic_serializer.hpp>
#include <boost/archive/detail/auto_link_archive.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable : 4511 4512)
#endif
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
// forward declarations
namespace archive {
namespace detail {
class basic_iarchive;
class basic_pointer_iserializer;
class BOOST_SYMBOL_VISIBLE basic_iserializer :
public basic_serializer
{
private:
basic_pointer_iserializer *m_bpis;
protected:
explicit BOOST_ARCHIVE_DECL basic_iserializer(
const boost::serialization::extended_type_info & type
);
virtual BOOST_ARCHIVE_DECL ~basic_iserializer();
public:
bool serialized_as_pointer() const {
return m_bpis != NULL;
}
void set_bpis(basic_pointer_iserializer *bpis){
m_bpis = bpis;
}
const basic_pointer_iserializer * get_bpis_ptr() const {
return m_bpis;
}
virtual void load_object_data(
basic_iarchive & ar,
void *x,
const unsigned int file_version
) const = 0;
// returns true if class_info should be saved
virtual bool class_info() const = 0 ;
// returns true if objects should be tracked
virtual bool tracking(const unsigned int) const = 0 ;
// returns class version
virtual version_type version() const = 0 ;
// returns true if this class is polymorphic
virtual bool is_polymorphic() const = 0;
virtual void destroy(/*const*/ void *address) const = 0 ;
};
} // namespae detail
} // namespace archive
} // namespace boost
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif // BOOST_ARCHIVE_DETAIL_BASIC_ISERIALIZER_HPP
@@ -0,0 +1,431 @@
/*
[auto_generated]
boost/numeric/odeint/stepper/base/symplectic_rkn_stepper_base.hpp
[begin_description]
Base class for symplectic Runge-Kutta-Nystrom steppers.
[end_description]
Copyright 2011-2013 Karsten Ahnert
Copyright 2011-2013 Mario Mulansky
Copyright 2012 Christoph Koke
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_STEPPER_BASE_SYMPLECTIC_RKN_STEPPER_BASE_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_STEPPER_BASE_SYMPLECTIC_RKN_STEPPER_BASE_HPP_INCLUDED
#include <boost/array.hpp>
#include <boost/numeric/odeint/util/bind.hpp>
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
#include <boost/numeric/odeint/util/copy.hpp>
#include <boost/numeric/odeint/util/is_pair.hpp>
#include <boost/numeric/odeint/util/state_wrapper.hpp>
#include <boost/numeric/odeint/util/resizer.hpp>
#include <boost/numeric/odeint/stepper/stepper_categories.hpp>
#include <boost/numeric/odeint/stepper/base/algebra_stepper_base.hpp>
namespace boost {
namespace numeric {
namespace odeint {
template<
size_t NumOfStages ,
unsigned short Order ,
class Coor ,
class Momentum ,
class Value ,
class CoorDeriv ,
class MomentumDeriv ,
class Time ,
class Algebra ,
class Operations ,
class Resizer
>
class symplectic_nystroem_stepper_base : public algebra_stepper_base< Algebra , Operations >
{
public:
typedef algebra_stepper_base< Algebra , Operations > algebra_stepper_base_type;
typedef typename algebra_stepper_base_type::algebra_type algebra_type;
typedef typename algebra_stepper_base_type::operations_type operations_type;
const static size_t num_of_stages = NumOfStages;
typedef Coor coor_type;
typedef Momentum momentum_type;
typedef std::pair< coor_type , momentum_type > state_type;
typedef CoorDeriv coor_deriv_type;
typedef state_wrapper< coor_deriv_type> wrapped_coor_deriv_type;
typedef MomentumDeriv momentum_deriv_type;
typedef state_wrapper< momentum_deriv_type > wrapped_momentum_deriv_type;
typedef std::pair< coor_deriv_type , momentum_deriv_type > deriv_type;
typedef Value value_type;
typedef Time time_type;
typedef Resizer resizer_type;
typedef stepper_tag stepper_category;
#ifndef DOXYGEN_SKIP
typedef symplectic_nystroem_stepper_base< NumOfStages , Order , Coor , Momentum , Value ,
CoorDeriv , MomentumDeriv , Time , Algebra , Operations , Resizer > internal_stepper_base_type;
#endif
typedef unsigned short order_type;
static const order_type order_value = Order;
typedef boost::array< value_type , num_of_stages > coef_type;
symplectic_nystroem_stepper_base( const coef_type &coef_a , const coef_type &coef_b , const algebra_type &algebra = algebra_type() )
: algebra_stepper_base_type( algebra ) , m_coef_a( coef_a ) , m_coef_b( coef_b ) ,
m_dqdt_resizer() , m_dpdt_resizer() , m_dqdt() , m_dpdt()
{ }
order_type order( void ) const
{
return order_value;
}
/*
* Version 1 : do_step( system , x , t , dt )
*
* This version does not solve the forwarding problem, boost.range can not be used.
*/
template< class System , class StateInOut >
void do_step( System system , const StateInOut &state , time_type t , time_type dt )
{
typedef typename odeint::unwrap_reference< System >::type system_type;
do_step_impl( system , state , t , state , dt , typename is_pair< system_type >::type() );
}
/**
* \brief Same function as above. It differs only in a different const specifier in order
* to solve the forwarding problem, can be used with Boost.Range.
*/
template< class System , class StateInOut >
void do_step( System system , StateInOut &state , time_type t , time_type dt )
{
typedef typename odeint::unwrap_reference< System >::type system_type;
do_step_impl( system , state , t , state , dt , typename is_pair< system_type >::type() );
}
/*
* Version 2 : do_step( system , q , p , t , dt );
*
* For Convenience
*
* The two overloads are needed in order to solve the forwarding problem.
*/
template< class System , class CoorInOut , class MomentumInOut >
void do_step( System system , CoorInOut &q , MomentumInOut &p , time_type t , time_type dt )
{
do_step( system , std::make_pair( detail::ref( q ) , detail::ref( p ) ) , t , dt );
}
/**
* \brief Same function as do_step( system , q , p , t , dt ). It differs only in a different const specifier in order
* to solve the forwarding problem, can be called with Boost.Range.
*/
template< class System , class CoorInOut , class MomentumInOut >
void do_step( System system , const CoorInOut &q , const MomentumInOut &p , time_type t , time_type dt )
{
do_step( system , std::make_pair( detail::ref( q ) , detail::ref( p ) ) , t , dt );
}
/*
* Version 3 : do_step( system , in , t , out , dt )
*
* The forwarding problem is not solved in this version
*/
template< class System , class StateIn , class StateOut >
void do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
{
typedef typename odeint::unwrap_reference< System >::type system_type;
do_step_impl( system , in , t , out , dt , typename is_pair< system_type >::type() );
}
template< class StateType >
void adjust_size( const StateType &x )
{
resize_dqdt( x );
resize_dpdt( x );
}
/** \brief Returns the coefficients a. */
const coef_type& coef_a( void ) const { return m_coef_a; }
/** \brief Returns the coefficients b. */
const coef_type& coef_b( void ) const { return m_coef_b; }
private:
// stepper for systems with function for dq/dt = f(p) and dp/dt = -f(q)
template< class System , class StateIn , class StateOut >
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , boost::mpl::true_ )
{
typedef typename odeint::unwrap_reference< System >::type system_type;
typedef typename odeint::unwrap_reference< typename system_type::first_type >::type coor_deriv_func_type;
typedef typename odeint::unwrap_reference< typename system_type::second_type >::type momentum_deriv_func_type;
system_type &sys = system;
coor_deriv_func_type &coor_func = sys.first;
momentum_deriv_func_type &momentum_func = sys.second;
typedef typename odeint::unwrap_reference< StateIn >::type state_in_type;
typedef typename odeint::unwrap_reference< typename state_in_type::first_type >::type coor_in_type;
typedef typename odeint::unwrap_reference< typename state_in_type::second_type >::type momentum_in_type;
const state_in_type &state_in = in;
const coor_in_type &coor_in = state_in.first;
const momentum_in_type &momentum_in = state_in.second;
typedef typename odeint::unwrap_reference< StateOut >::type state_out_type;
typedef typename odeint::unwrap_reference< typename state_out_type::first_type >::type coor_out_type;
typedef typename odeint::unwrap_reference< typename state_out_type::second_type >::type momentum_out_type;
state_out_type &state_out = out;
coor_out_type &coor_out = state_out.first;
momentum_out_type &momentum_out = state_out.second;
m_dqdt_resizer.adjust_size( coor_in , detail::bind( &internal_stepper_base_type::template resize_dqdt< coor_in_type > , detail::ref( *this ) , detail::_1 ) );
m_dpdt_resizer.adjust_size( momentum_in , detail::bind( &internal_stepper_base_type::template resize_dpdt< momentum_in_type > , detail::ref( *this ) , detail::_1 ) );
// ToDo: check sizes?
for( size_t l=0 ; l<num_of_stages ; ++l )
{
if( l == 0 )
{
coor_func( momentum_in , m_dqdt.m_v );
this->m_algebra.for_each3( coor_out , coor_in , m_dqdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_a[l] * dt ) );
momentum_func( coor_out , m_dpdt.m_v );
this->m_algebra.for_each3( momentum_out , momentum_in , m_dpdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_b[l] * dt ) );
}
else
{
coor_func( momentum_out , m_dqdt.m_v );
this->m_algebra.for_each3( coor_out , coor_out , m_dqdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_a[l] * dt ) );
momentum_func( coor_out , m_dpdt.m_v );
this->m_algebra.for_each3( momentum_out , momentum_out , m_dpdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_b[l] * dt ) );
}
}
}
// stepper for systems with only function dp /dt = -f(q), dq/dt = p, time not required but still expected for compatibility reasons
template< class System , class StateIn , class StateOut >
void do_step_impl( System system , const StateIn &in , time_type /* t */ , StateOut &out , time_type dt , boost::mpl::false_ )
{
typedef typename odeint::unwrap_reference< System >::type momentum_deriv_func_type;
momentum_deriv_func_type &momentum_func = system;
typedef typename odeint::unwrap_reference< StateIn >::type state_in_type;
typedef typename odeint::unwrap_reference< typename state_in_type::first_type >::type coor_in_type;
typedef typename odeint::unwrap_reference< typename state_in_type::second_type >::type momentum_in_type;
const state_in_type &state_in = in;
const coor_in_type &coor_in = state_in.first;
const momentum_in_type &momentum_in = state_in.second;
typedef typename odeint::unwrap_reference< StateOut >::type state_out_type;
typedef typename odeint::unwrap_reference< typename state_out_type::first_type >::type coor_out_type;
typedef typename odeint::unwrap_reference< typename state_out_type::second_type >::type momentum_out_type;
state_out_type &state_out = out;
coor_out_type &coor_out = state_out.first;
momentum_out_type &momentum_out = state_out.second;
// m_dqdt not required when called with momentum_func only - don't resize
// m_dqdt_resizer.adjust_size( coor_in , detail::bind( &internal_stepper_base_type::template resize_dqdt< coor_in_type > , detail::ref( *this ) , detail::_1 ) );
m_dpdt_resizer.adjust_size( momentum_in , detail::bind( &internal_stepper_base_type::template resize_dpdt< momentum_in_type > , detail::ref( *this ) , detail::_1 ) );
// ToDo: check sizes?
// step 0
this->m_algebra.for_each3( coor_out , coor_in , momentum_in ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_a[0] * dt ) );
momentum_func( coor_out , m_dpdt.m_v );
this->m_algebra.for_each3( momentum_out , momentum_in , m_dpdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_b[0] * dt ) );
for( size_t l=1 ; l<num_of_stages ; ++l )
{
this->m_algebra.for_each3( coor_out , coor_out , momentum_out ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_a[l] * dt ) );
momentum_func( coor_out , m_dpdt.m_v );
this->m_algebra.for_each3( momentum_out , momentum_out , m_dpdt.m_v ,
typename operations_type::template scale_sum2< value_type , time_type >( 1.0 , m_coef_b[l] * dt ) );
}
}
template< class StateIn >
bool resize_dqdt( const StateIn &x )
{
return adjust_size_by_resizeability( m_dqdt , x , typename is_resizeable<coor_deriv_type>::type() );
}
template< class StateIn >
bool resize_dpdt( const StateIn &x )
{
return adjust_size_by_resizeability( m_dpdt , x , typename is_resizeable<momentum_deriv_type>::type() );
}
const coef_type m_coef_a;
const coef_type m_coef_b;
resizer_type m_dqdt_resizer;
resizer_type m_dpdt_resizer;
wrapped_coor_deriv_type m_dqdt;
wrapped_momentum_deriv_type m_dpdt;
};
/********* DOXYGEN *********/
/**
* \class symplectic_nystroem_stepper_base
* \brief Base class for all symplectic steppers of Nystroem type.
*
* This class is the base class for the symplectic Runge-Kutta-Nystroem steppers. Symplectic steppers are usually
* used to solve Hamiltonian systems and they conserve the phase space volume, see
* <a href="http://en.wikipedia.org/wiki/Symplectic_integrator">en.wikipedia.org/wiki/Symplectic_integrator</a>.
* Furthermore, the energy is conserved
* in average. In detail this class of steppers can be used to solve separable Hamiltonian systems which can be written
* in the form H(q,p) = H1(p) + H2(q). q is usually called the coordinate, while p is the momentum. The equations of motion
* are dq/dt = dH1/dp, dp/dt = -dH2/dq.
*
* ToDo : add formula for solver and explanation of the coefficients
*
* symplectic_nystroem_stepper_base uses odeints algebra and operation system. Step size and error estimation are not
* provided for this class of solvers. It derives from algebra_stepper_base. Several `do_step` variants are provided:
*
* - `do_step( sys , x , t , dt )` - The classical `do_step` method. The sys can be either a pair of function objects
* for the coordinate or the momentum part or one function object for the momentum part. `x` is a pair of coordinate
* and momentum. The state is updated in-place.
* - `do_step( sys , q , p , t , dt )` - This method is similar to the method above with the difference that the coordinate
* and the momentum are passed explicitly and not packed into a pair.
* - `do_step( sys , x_in , t , x_out , dt )` - This method transforms the state out-of-place. `x_in` and `x_out` are here pairs
* of coordinate and momentum.
*
* \tparam NumOfStages Number of stages.
* \tparam Order The order of the stepper.
* \tparam Coor The type representing the coordinates q.
* \tparam Momentum The type representing the coordinates p.
* \tparam Value The basic value type. Should be something like float, double or a high-precision type.
* \tparam CoorDeriv The type representing the time derivative of the coordinate dq/dt.
* \tparam MomemtnumDeriv The type representing the time derivative of the momentum dp/dt.
* \tparam Time The type representing the time t.
* \tparam Algebra The algebra.
* \tparam Operations The operations.
* \tparam Resizer The resizer policy.
*/
/**
* \fn symplectic_nystroem_stepper_base::symplectic_nystroem_stepper_base( const coef_type &coef_a , const coef_type &coef_b , const algebra_type &algebra )
* \brief Constructs a symplectic_nystroem_stepper_base class. The parameters of the specific Nystroem method and the
* algebra have to be passed.
* \param coef_a The coefficients a.
* \param coef_b The coefficients b.
* \param algebra A copy of algebra is made and stored inside explicit_stepper_base.
*/
/**
* \fn symplectic_nystroem_stepper_base::order( void ) const
* \return Returns the order of the stepper.
*/
/**
* \fn symplectic_nystroem_stepper_base::do_step( System system , const StateInOut &state , time_type t , time_type dt )
* \brief This method performs one step. The system can be either a pair of two function object
* describing the momentum part and the coordinate part or one function object describing only
* the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
* is updated in-place.
*
* \note boost::ref or std::ref can be used for the system as well as for the state. So, it is correct
* to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , make_pair( std::ref( q ) , std::ref( p ) ) , t , dt )`.
*
* \note This method solves the forwarding problem.
*
* \param system The system, can be represented as a pair of two function object or one function object. See above.
* \param state The state of the ODE. It is a pair of Coor and Momentum. The state is updated in-place, therefore, the
* new value of the state will be written into this variable.
* \param t The time of the ODE. It is not advanced by this method.
* \param dt The time step.
*/
/**
* \fn symplectic_nystroem_stepper_base::do_step( System system , CoorInOut &q , MomentumInOut &p , time_type t , time_type dt )
* \brief This method performs one step. The system can be either a pair of two function object
* describing the momentum part and the coordinate part or one function object describing only
* the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
* is updated in-place.
*
* \note boost::ref or std::ref can be used for the system. So, it is correct
* to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , q , p , t , dt )`.
*
* \note This method solves the forwarding problem.
*
* \param system The system, can be represented as a pair of two function object or one function object. See above.
* \param q The coordinate of the ODE. It is updated in-place. Therefore, the new value of the coordinate will be written
* into this variable.
* \param p The momentum of the ODE. It is updated in-place. Therefore, the new value of the momentum will be written info
* this variable.
* \param t The time of the ODE. It is not advanced by this method.
* \param dt The time step.
*/
/**
* \fn symplectic_nystroem_stepper_base::do_step( System system , const StateIn &in , time_type t , StateOut &out , time_type dt )
* \brief This method performs one step. The system can be either a pair of two function object
* describing the momentum part and the coordinate part or one function object describing only
* the momentum part. In this case the coordinate is assumed to be trivial dq/dt = p. The state
* is updated out-of-place.
*
* \note boost::ref or std::ref can be used for the system. So, it is correct
* to write `stepper.do_step( make_pair( std::ref( fq ) , std::ref( fp ) ) , x_in , t , x_out , dt )`.
*
* \note This method NOT solve the forwarding problem.
*
* \param system The system, can be represented as a pair of two function object or one function object. See above.
* \param in The state of the ODE, which is a pair of coordinate and momentum. The state is updated out-of-place, therefore the
* new value is written into out
* \param t The time of the ODE. It is not advanced by this method.
* \param out The new state of the ODE.
* \param dt The time step.
*/
/**
* \fn symplectic_nystroem_stepper_base::adjust_size( const StateType &x )
* \brief Adjust the size of all temporaries in the stepper manually.
* \param x A state from which the size of the temporaries to be resized is deduced.
*/
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_STEPPER_BASE_SYMPLECTIC_RKN_STEPPER_BASE_HPP_INCLUDED
@@ -0,0 +1,21 @@
/*==============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Thomas Heller
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_PHOENIX_HPP
#define BOOST_PHOENIX_PHOENIX_HPP
#include <boost/phoenix/core.hpp>
#include <boost/phoenix/function.hpp>
#include <boost/phoenix/operator.hpp>
#include <boost/phoenix/statement.hpp>
#include <boost/phoenix/object.hpp>
#include <boost/phoenix/scope.hpp>
#include <boost/phoenix/bind.hpp>
#include <boost/phoenix/stl.hpp>
#include <boost/phoenix/fusion.hpp>
#endif
@@ -0,0 +1,33 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_SI_FREQUENCY_HPP
#define BOOST_UNITS_SI_FREQUENCY_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/frequency.hpp>
namespace boost {
namespace units {
namespace si {
typedef unit<frequency_dimension,si::system> frequency;
BOOST_UNITS_STATIC_CONSTANT(hertz,frequency);
} // namespace si
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_SI_FREQUENCY_HPP
@@ -0,0 +1,229 @@
///////////////////////////////////////////////////////////////
// Copyright 2013 John Maddock. 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_
//
// Comparison operators for cpp_int_backend:
//
#ifndef BOOST_MP_DETAIL_BITSCAN_HPP
#define BOOST_MP_DETAIL_BITSCAN_HPP
#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
#include <intrin.h>
#endif
namespace boost{ namespace multiprecision{ namespace detail{
template <class Unsigned>
inline unsigned find_lsb(Unsigned mask, const mpl::int_<0>&)
{
unsigned result = 0;
while(!(mask & 1u))
{
mask >>= 1;
++result;
}
return result;
}
template <class Unsigned>
inline unsigned find_msb(Unsigned mask, const mpl::int_<0>&)
{
unsigned index = 0;
while(mask)
{
++index;
mask >>= 1;
}
return --index;
}
#if (defined(BOOST_MSVC) || (defined(__clang__) && defined(__c2__)) || (defined(BOOST_INTEL) && defined(_MSC_VER))) && (defined(_M_IX86) || defined(_M_X64))
#pragma intrinsic(_BitScanForward,_BitScanReverse)
BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, const mpl::int_<1>&)
{
unsigned long result;
_BitScanForward(&result, mask);
return result;
}
BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, const mpl::int_<1>&)
{
unsigned long result;
_BitScanReverse(&result, mask);
return result;
}
#ifdef _M_X64
#pragma intrinsic(_BitScanForward64,_BitScanReverse64)
BOOST_FORCEINLINE unsigned find_lsb(unsigned __int64 mask, const mpl::int_<2>&)
{
unsigned long result;
_BitScanForward64(&result, mask);
return result;
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_msb(Unsigned mask, const mpl::int_<2>&)
{
unsigned long result;
_BitScanReverse64(&result, mask);
return result;
}
#endif
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned long),
mpl::int_<1>,
#ifdef _M_X64
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(__int64),
mpl::int_<2>,
mpl::int_<0>
>::type
#else
mpl::int_<0>
#endif
>::type tag_type;
return find_lsb(static_cast<ui_type>(mask), tag_type());
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned long),
mpl::int_<1>,
#ifdef _M_X64
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(__int64),
mpl::int_<2>,
mpl::int_<0>
>::type
#else
mpl::int_<0>
#endif
>::type tag_type;
return find_msb(static_cast<ui_type>(mask), tag_type());
}
#elif defined(BOOST_GCC) || defined(__clang__) || (defined(BOOST_INTEL) && defined(__GNUC__))
BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
{
return __builtin_ctz(mask);
}
BOOST_FORCEINLINE unsigned find_lsb(unsigned long mask, mpl::int_<2> const&)
{
return __builtin_ctzl(mask);
}
BOOST_FORCEINLINE unsigned find_lsb(boost::ulong_long_type mask, mpl::int_<3> const&)
{
return __builtin_ctzll(mask);
}
BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
{
return sizeof(unsigned) * CHAR_BIT - 1 - __builtin_clz(mask);
}
BOOST_FORCEINLINE unsigned find_msb(unsigned long mask, mpl::int_<2> const&)
{
return sizeof(unsigned long) * CHAR_BIT - 1 - __builtin_clzl(mask);
}
BOOST_FORCEINLINE unsigned find_msb(boost::ulong_long_type mask, mpl::int_<3> const&)
{
return sizeof(boost::ulong_long_type) * CHAR_BIT - 1 - __builtin_clzll(mask);
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned),
mpl::int_<1>,
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned long),
mpl::int_<2>,
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
mpl::int_<3>,
mpl::int_<0>
>::type
>::type
>::type tag_type;
return find_lsb(static_cast<ui_type>(mask), tag_type());
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned),
mpl::int_<1>,
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned long),
mpl::int_<2>,
typename mpl::if_c<
sizeof(Unsigned) <= sizeof(boost::ulong_long_type),
mpl::int_<3>,
mpl::int_<0>
>::type
>::type
>::type tag_type;
return find_msb(static_cast<ui_type>(mask), tag_type());
}
#elif defined(BOOST_INTEL)
BOOST_FORCEINLINE unsigned find_lsb(unsigned mask, mpl::int_<1> const&)
{
return _bit_scan_forward(mask);
}
BOOST_FORCEINLINE unsigned find_msb(unsigned mask, mpl::int_<1> const&)
{
return _bit_scan_reverse(mask);
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned),
mpl::int_<1>,
mpl::int_<0>
>::type tag_type;
return find_lsb(static_cast<ui_type>(mask), tag_type());
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
{
typedef typename make_unsigned<Unsigned>::type ui_type;
typedef typename mpl::if_c<
sizeof(Unsigned) <= sizeof(unsigned),
mpl::int_<1>,
mpl::int_<0>
>::type tag_type;
return find_msb(static_cast<ui_type>(mask), tag_type());
}
#else
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_lsb(Unsigned mask)
{
return find_lsb(mask, mpl::int_<0>());
}
template <class Unsigned>
BOOST_FORCEINLINE unsigned find_msb(Unsigned mask)
{
return find_msb(mask, mpl::int_<0>());
}
#endif
}}}
#endif
@@ -0,0 +1,120 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_DETAIL_EMPTY_HPP
#define BOOST_RANGE_DETAIL_EMPTY_HPP
#include <boost/range/detail/common.hpp>
namespace boost
{
namespace range_detail
{
template< typename T >
struct range_empty;
//////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////
template<>
struct range_empty<std_container_>
{
template< typename C >
static bool fun( C& c )
{
return c.empty();
};
};
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template<>
struct range_empty<std_pair_>
{
template< typename P >
static bool fun( const P& p )
{
return p.first == p.second;
}
};
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template<>
struct range_empty<array_>
{
template< typename T, std::size_t sz >
static bool fun( T BOOST_ARRAY_REF[sz] )
{
if( boost_range_array == 0 )
return true;
return false;
}
};
//////////////////////////////////////////////////////////////////////
// string
//////////////////////////////////////////////////////////////////////
template<>
struct range_empty<char_ptr_>
{
static bool fun( const char* s )
{
return s == 0 || s[0] == 0;
}
};
template<>
struct range_empty<const_char_ptr_>
{
static bool fun( const char* s )
{
return s == 0 || s[0] == 0;
}
};
template<>
struct range_empty<wchar_t_ptr_>
{
static bool fun( const wchar_t* s )
{
return s == 0 || s[0] == 0;
}
};
template<>
struct range_empty<const_wchar_t_ptr_>
{
static bool fun( const wchar_t* s )
{
return s == 0 || s[0] == 0;
}
};
} // namespace 'range_detail'
template< typename C >
inline bool
empty( const C& c )
{
return range_detail::range_empty< BOOST_RANGE_DEDUCED_TYPENAME range_detail::range<C>::type >::fun( c );
}
} // namespace 'boost'
#endif
@@ -0,0 +1,44 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef SLICE_NIL_DWA2002620_HPP
# define SLICE_NIL_DWA2002620_HPP
# include <boost/python/detail/prefix.hpp>
# include <boost/python/object_core.hpp>
namespace boost { namespace python { namespace api {
class slice_nil : public object
{
public:
slice_nil() : object() {}
};
# ifndef _ // Watch out for GNU gettext users, who #define _(x)
static const slice_nil _ = slice_nil();
# endif
template <class T>
struct slice_bound
{
typedef object type;
};
template <>
struct slice_bound<slice_nil>
{
typedef slice_nil type;
};
}
using api::slice_nil;
# ifndef _ // Watch out for GNU gettext users, who #define _(x)
using api::_;
# endif
}} // namespace boost::python
#endif // SLICE_NIL_DWA2002620_HPP
@@ -0,0 +1,847 @@
// Copyright John Maddock 2007.
// Copyright Paul A. Bristow 2007.
// 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_MATH_POLICY_ERROR_HANDLING_HPP
#define BOOST_MATH_POLICY_ERROR_HANDLING_HPP
#include <stdexcept>
#include <iomanip>
#include <string>
#include <cstring>
#include <typeinfo>
#include <cerrno>
#include <boost/config/no_tr1/complex.hpp>
#include <boost/config/no_tr1/cmath.hpp>
#include <stdexcept>
#include <boost/math/tools/config.hpp>
#include <boost/math/policies/policy.hpp>
#include <boost/math/tools/precision.hpp>
#include <boost/throw_exception.hpp>
#include <boost/cstdint.hpp>
#ifdef BOOST_MSVC
# pragma warning(push) // Quiet warnings in boost/format.hpp
# pragma warning(disable: 4996) // _SCL_SECURE_NO_DEPRECATE
# pragma warning(disable: 4512) // assignment operator could not be generated.
# pragma warning(disable: 4127) // conditional expression is constant
// And warnings in error handling:
# pragma warning(disable: 4702) // unreachable code.
// Note that this only occurs when the compiler can deduce code is unreachable,
// for example when policy macros are used to ignore errors rather than throw.
#endif
#include <sstream>
namespace boost{ namespace math{
class evaluation_error : public std::runtime_error
{
public:
evaluation_error(const std::string& s) : std::runtime_error(s){}
};
class rounding_error : public std::runtime_error
{
public:
rounding_error(const std::string& s) : std::runtime_error(s){}
};
namespace policies{
//
// Forward declarations of user error handlers,
// it's up to the user to provide the definition of these:
//
template <class T>
T user_domain_error(const char* function, const char* message, const T& val);
template <class T>
T user_pole_error(const char* function, const char* message, const T& val);
template <class T>
T user_overflow_error(const char* function, const char* message, const T& val);
template <class T>
T user_underflow_error(const char* function, const char* message, const T& val);
template <class T>
T user_denorm_error(const char* function, const char* message, const T& val);
template <class T>
T user_evaluation_error(const char* function, const char* message, const T& val);
template <class T, class TargetType>
T user_rounding_error(const char* function, const char* message, const T& val, const TargetType& t);
template <class T>
T user_indeterminate_result_error(const char* function, const char* message, const T& val);
namespace detail
{
template <class T>
std::string prec_format(const T& val)
{
typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type prec_type;
std::stringstream ss;
if(prec_type::value)
{
int prec = 2 + (prec_type::value * 30103UL) / 100000UL;
ss << std::setprecision(prec);
}
ss << val;
return ss.str();
}
inline void replace_all_in_string(std::string& result, const char* what, const char* with)
{
std::string::size_type pos = 0;
std::string::size_type slen = std::strlen(what);
std::string::size_type rlen = std::strlen(with);
while((pos = result.find(what, pos)) != std::string::npos)
{
result.replace(pos, slen, with);
pos += rlen;
}
}
template <class T>
inline const char* name_of()
{
#ifndef BOOST_NO_RTTI
return typeid(T).name();
#else
return "unknown";
#endif
}
template <> inline const char* name_of<float>(){ return "float"; }
template <> inline const char* name_of<double>(){ return "double"; }
template <> inline const char* name_of<long double>(){ return "long double"; }
#ifdef BOOST_MATH_USE_FLOAT128
template <>
inline const char* name_of<BOOST_MATH_FLOAT128_TYPE>()
{
return "__float128";
}
#endif
template <class E, class T>
void raise_error(const char* pfunction, const char* message)
{
if(pfunction == 0)
pfunction = "Unknown function operating on type %1%";
if(message == 0)
message = "Cause unknown";
std::string function(pfunction);
std::string msg("Error in function ");
#ifndef BOOST_NO_RTTI
replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>());
#else
replace_all_in_string(function, "%1%", "Unknown");
#endif
msg += function;
msg += ": ";
msg += message;
E e(msg);
boost::throw_exception(e);
}
template <class E, class T>
void raise_error(const char* pfunction, const char* pmessage, const T& val)
{
if(pfunction == 0)
pfunction = "Unknown function operating on type %1%";
if(pmessage == 0)
pmessage = "Cause unknown: error caused by bad argument with value %1%";
std::string function(pfunction);
std::string message(pmessage);
std::string msg("Error in function ");
#ifndef BOOST_NO_RTTI
replace_all_in_string(function, "%1%", boost::math::policies::detail::name_of<T>());
#else
replace_all_in_string(function, "%1%", "Unknown");
#endif
msg += function;
msg += ": ";
std::string sval = prec_format(val);
replace_all_in_string(message, "%1%", sval.c_str());
msg += message;
E e(msg);
boost::throw_exception(e);
}
template <class T>
inline T raise_domain_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::domain_error, T>(function, message, val);
// we never get here:
return std::numeric_limits<T>::quiet_NaN();
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_domain_error(
const char* ,
const char* ,
const T& ,
const ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return std::numeric_limits<T>::quiet_NaN();
}
template <class T>
inline T raise_domain_error(
const char* ,
const char* ,
const T& ,
const ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = EDOM;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return std::numeric_limits<T>::quiet_NaN();
}
template <class T>
inline T raise_domain_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::domain_error< ::boost::math::policies::user_error>&)
{
return user_domain_error(function, message, val);
}
template <class T>
inline T raise_pole_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::pole_error< ::boost::math::policies::throw_on_error>&)
{
return boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::throw_on_error>());
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_pole_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::pole_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::ignore_error>());
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_pole_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::pole_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
return ::boost::math::policies::detail::raise_domain_error(function, message, val, ::boost::math::policies::domain_error< ::boost::math::policies::errno_on_error>());
}
template <class T>
inline T raise_pole_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::pole_error< ::boost::math::policies::user_error>&)
{
return user_pole_error(function, message, val);
}
template <class T>
inline T raise_overflow_error(
const char* function,
const char* message,
const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::overflow_error, T>(function, message ? message : "numeric overflow");
// We should never get here:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline T raise_overflow_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::overflow_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::overflow_error, T>(function, message ? message : "numeric overflow", val);
// We should never get here:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_overflow_error(
const char* ,
const char* ,
const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_overflow_error(
const char* ,
const char* ,
const T&,
const ::boost::math::policies::overflow_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline T raise_overflow_error(
const char* ,
const char* ,
const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline T raise_overflow_error(
const char* ,
const char* ,
const T&,
const ::boost::math::policies::overflow_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : boost::math::tools::max_value<T>();
}
template <class T>
inline T raise_overflow_error(
const char* function,
const char* message,
const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&)
{
return user_overflow_error(function, message, std::numeric_limits<T>::infinity());
}
template <class T>
inline T raise_overflow_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::overflow_error< ::boost::math::policies::user_error>&)
{
std::string m(message ? message : "");
std::string sval = prec_format(val);
replace_all_in_string(m, "%1%", sval.c_str());
return user_overflow_error(function, m.c_str(), std::numeric_limits<T>::infinity());
}
template <class T>
inline T raise_underflow_error(
const char* function,
const char* message,
const ::boost::math::policies::underflow_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::underflow_error, T>(function, message ? message : "numeric underflow");
// We should never get here:
return 0;
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_underflow_error(
const char* ,
const char* ,
const ::boost::math::policies::underflow_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return T(0);
}
template <class T>
inline T raise_underflow_error(
const char* /* function */,
const char* /* message */,
const ::boost::math::policies::underflow_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return T(0);
}
template <class T>
inline T raise_underflow_error(
const char* function,
const char* message,
const ::boost::math::policies::underflow_error< ::boost::math::policies::user_error>&)
{
return user_underflow_error(function, message, T(0));
}
template <class T>
inline T raise_denorm_error(
const char* function,
const char* message,
const T& /* val */,
const ::boost::math::policies::denorm_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::underflow_error, T>(function, message ? message : "denormalised result");
// we never get here:
return T(0);
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_denorm_error(
const char* ,
const char* ,
const T& val,
const ::boost::math::policies::denorm_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return val;
}
template <class T>
inline T raise_denorm_error(
const char* ,
const char* ,
const T& val,
const ::boost::math::policies::denorm_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return val;
}
template <class T>
inline T raise_denorm_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::denorm_error< ::boost::math::policies::user_error>&)
{
return user_denorm_error(function, message, val);
}
template <class T>
inline T raise_evaluation_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::evaluation_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<boost::math::evaluation_error, T>(function, message, val);
// we never get here:
return T(0);
}
template <class T>
inline BOOST_MATH_CONSTEXPR T raise_evaluation_error(
const char* ,
const char* ,
const T& val,
const ::boost::math::policies::evaluation_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return val;
}
template <class T>
inline T raise_evaluation_error(
const char* ,
const char* ,
const T& val,
const ::boost::math::policies::evaluation_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = EDOM;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return val;
}
template <class T>
inline T raise_evaluation_error(
const char* function,
const char* message,
const T& val,
const ::boost::math::policies::evaluation_error< ::boost::math::policies::user_error>&)
{
return user_evaluation_error(function, message, val);
}
template <class T, class TargetType>
inline TargetType raise_rounding_error(
const char* function,
const char* message,
const T& val,
const TargetType&,
const ::boost::math::policies::rounding_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<boost::math::rounding_error, T>(function, message, val);
// we never get here:
return TargetType(0);
}
template <class T, class TargetType>
inline BOOST_MATH_CONSTEXPR TargetType raise_rounding_error(
const char* ,
const char* ,
const T& val,
const TargetType&,
const ::boost::math::policies::rounding_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
BOOST_STATIC_ASSERT(std::numeric_limits<TargetType>::is_specialized);
return val > 0 ? (std::numeric_limits<TargetType>::max)() : (std::numeric_limits<TargetType>::is_integer ? (std::numeric_limits<TargetType>::min)() : -(std::numeric_limits<TargetType>::max)());
}
template <class T, class TargetType>
inline TargetType raise_rounding_error(
const char* ,
const char* ,
const T& val,
const TargetType&,
const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
BOOST_STATIC_ASSERT(std::numeric_limits<TargetType>::is_specialized);
return val > 0 ? (std::numeric_limits<TargetType>::max)() : (std::numeric_limits<TargetType>::is_integer ? (std::numeric_limits<TargetType>::min)() : -(std::numeric_limits<TargetType>::max)());
}
template <class T>
inline T raise_rounding_error(
const char* ,
const char* ,
const T& val,
const T&,
const ::boost::math::policies::rounding_error< ::boost::math::policies::errno_on_error>&) BOOST_MATH_NOEXCEPT(T)
{
errno = ERANGE;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return val > 0 ? boost::math::tools::max_value<T>() : -boost::math::tools::max_value<T>();
}
template <class T, class TargetType>
inline TargetType raise_rounding_error(
const char* function,
const char* message,
const T& val,
const TargetType& t,
const ::boost::math::policies::rounding_error< ::boost::math::policies::user_error>&)
{
return user_rounding_error(function, message, val, t);
}
template <class T, class R>
inline T raise_indeterminate_result_error(
const char* function,
const char* message,
const T& val,
const R& ,
const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::throw_on_error>&)
{
raise_error<std::domain_error, T>(function, message, val);
// we never get here:
return std::numeric_limits<T>::quiet_NaN();
}
template <class T, class R>
inline BOOST_MATH_CONSTEXPR T raise_indeterminate_result_error(
const char* ,
const char* ,
const T& ,
const R& result,
const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::ignore_error>&) BOOST_MATH_NOEXCEPT(T)
{
// This may or may not do the right thing, but the user asked for the error
// to be ignored so here we go anyway:
return result;
}
template <class T, class R>
inline T raise_indeterminate_result_error(
const char* ,
const char* ,
const T& ,
const R& result,
const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::errno_on_error>&)
{
errno = EDOM;
// This may or may not do the right thing, but the user asked for the error
// to be silent so here we go anyway:
return result;
}
template <class T, class R>
inline T raise_indeterminate_result_error(
const char* function,
const char* message,
const T& val,
const R& ,
const ::boost::math::policies::indeterminate_result_error< ::boost::math::policies::user_error>&)
{
return user_indeterminate_result_error(function, message, val);
}
} // namespace detail
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_domain_error(const char* function, const char* message, const T& val, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::domain_error_type policy_type;
return detail::raise_domain_error(
function, message ? message : "Domain Error evaluating function at %1%",
val, policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_pole_error(const char* function, const char* message, const T& val, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::pole_error_type policy_type;
return detail::raise_pole_error(
function, message ? message : "Evaluation of function at pole %1%",
val, policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_overflow_error(const char* function, const char* message, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::overflow_error_type policy_type;
return detail::raise_overflow_error<T>(
function, message ? message : "Overflow Error",
policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_overflow_error(const char* function, const char* message, const T& val, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::overflow_error_type policy_type;
return detail::raise_overflow_error(
function, message ? message : "Overflow evaluating function at %1%",
val, policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_underflow_error(const char* function, const char* message, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::underflow_error_type policy_type;
return detail::raise_underflow_error<T>(
function, message ? message : "Underflow Error",
policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_denorm_error(const char* function, const char* message, const T& val, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::denorm_error_type policy_type;
return detail::raise_denorm_error<T>(
function, message ? message : "Denorm Error",
val,
policy_type());
}
template <class T, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_evaluation_error(const char* function, const char* message, const T& val, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::evaluation_error_type policy_type;
return detail::raise_evaluation_error(
function, message ? message : "Internal Evaluation Error, best value so far was %1%",
val, policy_type());
}
template <class T, class TargetType, class Policy>
inline BOOST_MATH_CONSTEXPR TargetType raise_rounding_error(const char* function, const char* message, const T& val, const TargetType& t, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::rounding_error_type policy_type;
return detail::raise_rounding_error(
function, message ? message : "Value %1% can not be represented in the target integer type.",
val, t, policy_type());
}
template <class T, class R, class Policy>
inline BOOST_MATH_CONSTEXPR T raise_indeterminate_result_error(const char* function, const char* message, const T& val, const R& result, const Policy&) BOOST_NOEXCEPT_IF(is_noexcept_error_policy<Policy>::value && BOOST_MATH_IS_FLOAT(T))
{
typedef typename Policy::indeterminate_result_error_type policy_type;
return detail::raise_indeterminate_result_error(
function, message ? message : "Indeterminate result with value %1%",
val, result, policy_type());
}
//
// checked_narrowing_cast:
//
namespace detail
{
template <class R, class T, class Policy>
inline bool check_overflow(T val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
BOOST_MATH_STD_USING
if(fabs(val) > tools::max_value<R>())
{
boost::math::policies::detail::raise_overflow_error<R>(function, 0, pol);
*result = static_cast<R>(val);
return true;
}
return false;
}
template <class R, class T, class Policy>
inline bool check_overflow(std::complex<T> val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
typedef typename R::value_type r_type;
r_type re, im;
bool r = check_overflow<r_type>(val.real(), &re, function, pol);
r = check_overflow<r_type>(val.imag(), &im, function, pol) || r;
*result = R(re, im);
return r;
}
template <class R, class T, class Policy>
inline bool check_underflow(T val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
if((val != 0) && (static_cast<R>(val) == 0))
{
*result = static_cast<R>(boost::math::policies::detail::raise_underflow_error<R>(function, 0, pol));
return true;
}
return false;
}
template <class R, class T, class Policy>
inline bool check_underflow(std::complex<T> val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
typedef typename R::value_type r_type;
r_type re, im;
bool r = check_underflow<r_type>(val.real(), &re, function, pol);
r = check_underflow<r_type>(val.imag(), &im, function, pol) || r;
*result = R(re, im);
return r;
}
template <class R, class T, class Policy>
inline bool check_denorm(T val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
BOOST_MATH_STD_USING
if((fabs(val) < static_cast<T>(tools::min_value<R>())) && (static_cast<R>(val) != 0))
{
*result = static_cast<R>(boost::math::policies::detail::raise_denorm_error<R>(function, 0, static_cast<R>(val), pol));
return true;
}
return false;
}
template <class R, class T, class Policy>
inline bool check_denorm(std::complex<T> val, R* result, const char* function, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && (Policy::value != throw_on_error) && (Policy::value != user_error))
{
typedef typename R::value_type r_type;
r_type re, im;
bool r = check_denorm<r_type>(val.real(), &re, function, pol);
r = check_denorm<r_type>(val.imag(), &im, function, pol) || r;
*result = R(re, im);
return r;
}
// Default instantiations with ignore_error policy.
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_overflow(T /* val */, R* /* result */, const char* /* function */, const overflow_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_overflow(std::complex<T> /* val */, R* /* result */, const char* /* function */, const overflow_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_underflow(T /* val */, R* /* result */, const char* /* function */, const underflow_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_underflow(std::complex<T> /* val */, R* /* result */, const char* /* function */, const underflow_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_denorm(T /* val */, R* /* result*/, const char* /* function */, const denorm_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
template <class R, class T>
inline BOOST_MATH_CONSTEXPR bool check_denorm(std::complex<T> /* val */, R* /* result*/, const char* /* function */, const denorm_error<ignore_error>&) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T))
{ return false; }
} // namespace detail
template <class R, class Policy, class T>
inline R checked_narrowing_cast(T val, const char* function) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(R) && BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy<Policy>::value)
{
typedef typename Policy::overflow_error_type overflow_type;
typedef typename Policy::underflow_error_type underflow_type;
typedef typename Policy::denorm_error_type denorm_type;
//
// Most of what follows will evaluate to a no-op:
//
R result = 0;
if(detail::check_overflow<R>(val, &result, function, overflow_type()))
return result;
if(detail::check_underflow<R>(val, &result, function, underflow_type()))
return result;
if(detail::check_denorm<R>(val, &result, function, denorm_type()))
return result;
return static_cast<R>(val);
}
template <class T, class Policy>
inline void check_series_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy<Policy>::value)
{
if(max_iter >= policies::get_max_series_iterations<Policy>())
raise_evaluation_error<T>(
function,
"Series evaluation exceeded %1% iterations, giving up now.", static_cast<T>(static_cast<double>(max_iter)), pol);
}
template <class T, class Policy>
inline void check_root_iterations(const char* function, boost::uintmax_t max_iter, const Policy& pol) BOOST_NOEXCEPT_IF(BOOST_MATH_IS_FLOAT(T) && is_noexcept_error_policy<Policy>::value)
{
if(max_iter >= policies::get_max_root_iterations<Policy>())
raise_evaluation_error<T>(
function,
"Root finding evaluation exceeded %1% iterations, giving up now.", static_cast<T>(static_cast<double>(max_iter)), pol);
}
} //namespace policies
namespace detail{
//
// Simple helper function to assist in returning a pair from a single value,
// that value usually comes from one of the error handlers above:
//
template <class T>
std::pair<T, T> pair_from_single(const T& val) BOOST_MATH_NOEXCEPT(T)
{
return std::make_pair(val, val);
}
}
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
}} // namespaces boost/math
#endif // BOOST_MATH_POLICY_ERROR_HANDLING_HPP
@@ -0,0 +1,194 @@
// Copyright John Maddock 2006, 2007.
// Copyright Paul A. Bristow 2006, 2007, 2012.
// 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_MATH_DISTRIBUTIONS_COMMON_ERROR_HANDLING_HPP
#define BOOST_MATH_DISTRIBUTIONS_COMMON_ERROR_HANDLING_HPP
#include <boost/math/policies/error_handling.hpp>
#include <boost/math/special_functions/fpclassify.hpp>
// using boost::math::isfinite;
// using boost::math::isnan;
namespace boost{ namespace math{ namespace detail
{
template <class RealType, class Policy>
inline bool check_probability(const char* function, RealType const& prob, RealType* result, const Policy& pol)
{
if((prob < 0) || (prob > 1) || !(boost::math::isfinite)(prob))
{
*result = policies::raise_domain_error<RealType>(
function,
"Probability argument is %1%, but must be >= 0 and <= 1 !", prob, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_df(const char* function, RealType const& df, RealType* result, const Policy& pol)
{ // df > 0 but NOT +infinity allowed.
if((df <= 0) || !(boost::math::isfinite)(df))
{
*result = policies::raise_domain_error<RealType>(
function,
"Degrees of freedom argument is %1%, but must be > 0 !", df, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_df_gt0_to_inf(const char* function, RealType const& df, RealType* result, const Policy& pol)
{ // df > 0 or +infinity are allowed.
if( (df <= 0) || (boost::math::isnan)(df) )
{ // is bad df <= 0 or NaN or -infinity.
*result = policies::raise_domain_error<RealType>(
function,
"Degrees of freedom argument is %1%, but must be > 0 !", df, pol);
return false;
}
return true;
} // check_df_gt0_to_inf
template <class RealType, class Policy>
inline bool check_scale(
const char* function,
RealType scale,
RealType* result,
const Policy& pol)
{
if((scale <= 0) || !(boost::math::isfinite)(scale))
{ // Assume scale == 0 is NOT valid for any distribution.
*result = policies::raise_domain_error<RealType>(
function,
"Scale parameter is %1%, but must be > 0 !", scale, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_location(
const char* function,
RealType location,
RealType* result,
const Policy& pol)
{
if(!(boost::math::isfinite)(location))
{
*result = policies::raise_domain_error<RealType>(
function,
"Location parameter is %1%, but must be finite!", location, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_x(
const char* function,
RealType x,
RealType* result,
const Policy& pol)
{
// Note that this test catches both infinity and NaN.
// Some distributions permit x to be infinite, so these must be tested 1st and return,
// leaving this test to catch any NaNs.
// See Normal, Logistic, Laplace and Cauchy for example.
if(!(boost::math::isfinite)(x))
{
*result = policies::raise_domain_error<RealType>(
function,
"Random variate x is %1%, but must be finite!", x, pol);
return false;
}
return true;
} // bool check_x
template <class RealType, class Policy>
inline bool check_x_gt0(
const char* function,
RealType x,
RealType* result,
const Policy& pol)
{
if(x <= 0)
{
*result = policies::raise_domain_error<RealType>(
function,
"Random variate x is %1%, but must be > 0!", x, pol);
return false;
}
return true;
// Note that this test catches both infinity and NaN.
// Some special cases permit x to be infinite, so these must be tested 1st,
// leaving this test to catch any NaNs. See Normal and cauchy for example.
} // bool check_x_gt0
template <class RealType, class Policy>
inline bool check_positive_x(
const char* function,
RealType x,
RealType* result,
const Policy& pol)
{
if(!(boost::math::isfinite)(x) || (x < 0))
{
*result = policies::raise_domain_error<RealType>(
function,
"Random variate x is %1%, but must be finite and >= 0!", x, pol);
return false;
}
return true;
// Note that this test catches both infinity and NaN.
// Some special cases permit x to be infinite, so these must be tested 1st,
// leaving this test to catch any NaNs. see Normal and cauchy for example.
}
template <class RealType, class Policy>
inline bool check_non_centrality(
const char* function,
RealType ncp,
RealType* result,
const Policy& pol)
{
if((ncp < 0) || !(boost::math::isfinite)(ncp))
{ // Assume scale == 0 is NOT valid for any distribution.
*result = policies::raise_domain_error<RealType>(
function,
"Non centrality parameter is %1%, but must be > 0 !", ncp, pol);
return false;
}
return true;
}
template <class RealType, class Policy>
inline bool check_finite(
const char* function,
RealType x,
RealType* result,
const Policy& pol)
{
if(!(boost::math::isfinite)(x))
{ // Assume scale == 0 is NOT valid for any distribution.
*result = policies::raise_domain_error<RealType>(
function,
"Parameter is %1%, but must be finite !", x, pol);
return false;
}
return true;
}
} // namespace detail
} // namespace math
} // namespace boost
#endif // BOOST_MATH_DISTRIBUTIONS_COMMON_ERROR_HANDLING_HPP
@@ -0,0 +1,50 @@
/*=============================================================================
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)
==============================================================================*/
#if !defined(FUSION_CONVERT_09232005_1341)
#define FUSION_CONVERT_09232005_1341
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/set/detail/as_set.hpp>
#include <boost/fusion/container/set/detail/convert_impl.hpp>
#include <boost/fusion/container/set/set.hpp>
#include <boost/fusion/sequence/intrinsic/begin.hpp>
#include <boost/fusion/sequence/intrinsic/size.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence>
struct as_set
{
typedef typename detail::as_set<result_of::size<Sequence>::value> gen;
typedef typename gen::
template apply<typename result_of::begin<Sequence>::type>::type
type;
};
}
template <typename Sequence>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::as_set<Sequence>::type
as_set(Sequence& seq)
{
typedef typename result_of::as_set<Sequence>::gen gen;
return gen::call(fusion::begin(seq));
}
template <typename Sequence>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::as_set<Sequence const>::type
as_set(Sequence const& seq)
{
typedef typename result_of::as_set<Sequence const>::gen gen;
return gen::call(fusion::begin(seq));
}
}}
#endif
@@ -0,0 +1,51 @@
#ifndef WSJTX_MESSAGE_AGGREGATOR_MAIN_WINDOW_MODEL_HPP__
#define WSJTX_MESSAGE_AGGREGATOR_MAIN_WINDOW_MODEL_HPP__
#include <QMainWindow>
#include <QHash>
#include <QString>
#include "MessageServer.hpp"
class QDateTime;
class QStandardItemModel;
class QMenu;
class DecodesModel;
class BeaconsModel;
class QLineEdit;
class QTableView;
class ClientWidget;
using Frequency = MessageServer::Frequency;
class MessageAggregatorMainWindow
: public QMainWindow
{
Q_OBJECT;
public:
MessageAggregatorMainWindow ();
Q_SLOT void log_qso (QString const& /*id*/, QDateTime timeOff, QString const& dx_call, QString const& dx_grid
, Frequency dial_frequency, QString const& mode, QString const& report_sent
, QString const& report_received, QString const& tx_power, QString const& comments
, QString const& name, QDateTime timeOn);
private:
void add_client (QString const& id, QString const& version, QString const& revision);
void remove_client (QString const& id);
QStandardItemModel * log_;
QMenu * view_menu_;
DecodesModel * decodes_model_;
BeaconsModel * beacons_model_;
MessageServer * server_;
QLineEdit * multicast_group_line_edit_;
QTableView * log_table_view_;
// maps client id to widgets
using ClientsDictionary = QHash<QString, ClientWidget *>;
ClientsDictionary dock_widgets_;
};
#endif
@@ -0,0 +1,15 @@
/*=============================================================================
Copyright (c) 2006 Daniel Wallin
Copyright (c) 2005 Dan Marsden
Copyright (c) 2007 Joel de Guzman
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#ifndef BOOST_PHOENIX_STL_HPP
#define BOOST_PHOENIX_STL_HPP
#include <boost/phoenix/stl/algorithm.hpp>
#include <boost/phoenix/stl/container.hpp>
#endif
@@ -0,0 +1,107 @@
/*=============================================================================
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)
==============================================================================*/
#if !defined(FUSION_SET_09162005_1104)
#define FUSION_SET_09162005_1104
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/void.hpp>
#include <boost/fusion/support/detail/enabler.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/fusion/support/sequence_base.hpp>
#include <boost/fusion/support/category_of.hpp>
#include <boost/fusion/support/detail/access.hpp>
#include <boost/fusion/container/set/set_fwd.hpp>
#include <boost/fusion/container/set/detail/begin_impl.hpp>
#include <boost/fusion/container/set/detail/end_impl.hpp>
#include <boost/fusion/container/set/detail/value_of_impl.hpp>
#include <boost/fusion/container/set/detail/deref_data_impl.hpp>
#include <boost/fusion/container/set/detail/deref_impl.hpp>
#include <boost/fusion/container/set/detail/key_of_impl.hpp>
#include <boost/fusion/container/set/detail/value_of_data_impl.hpp>
#include <boost/fusion/container/vector/vector.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/core/enable_if.hpp>
#if !defined(BOOST_FUSION_DONT_USE_PREPROCESSED_FILES)
#include <boost/fusion/container/set/detail/cpp03/preprocessed/set.hpp>
#else
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/set" FUSION_MAX_SET_SIZE_STR ".hpp")
#endif
/*=============================================================================
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!
==============================================================================*/
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
namespace boost { namespace fusion
{
struct fusion_sequence_tag;
template <BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, typename T)>
struct set : sequence_base<set<BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)> >
{
struct category : forward_traversal_tag, associative_tag {};
typedef set_tag fusion_tag;
typedef fusion_sequence_tag tag; // this gets picked up by MPL
typedef mpl::false_ is_view;
typedef vector<
BOOST_PP_ENUM_PARAMS(FUSION_MAX_SET_SIZE, T)>
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) {}
#include <boost/fusion/container/set/detail/cpp03/set_forward_ctor.hpp>
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;
};
}}
#if defined(__WAVE__) && defined(BOOST_FUSION_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#endif // BOOST_FUSION_DONT_USE_PREPROCESSED_FILES
#endif
@@ -0,0 +1,112 @@
subroutine subtract65(dd,npts,f0,dt)
! Subtract a jt65 signal
!
! Measured signal : dd(t) = a(t)cos(2*pi*f0*t+theta(t))
! Reference signal : cref(t) = exp( j*(2*pi*f0*t+phi(t)) )
! Complex amp : cfilt(t) = LPF[ dd(t)*CONJG(cref(t)) ]
! Subtract : dd(t) = dd(t) - 2*REAL{cref*cfilt}
use packjt
use timer_module, only: timer
integer correct(63)
parameter (NMAX=60*12000) !Samples per 60 s
parameter (NFILT=1600)
real*4 dd(NMAX), window(-NFILT/2:NFILT/2)
complex cref,camp,cfilt,cw
integer nprc(126)
real*8 dphi,phi
logical first
data nprc/ &
1,0,0,1,1,0,0,0,1,1,1,1,1,1,0,1,0,1,0,0, &
0,1,0,1,1,0,0,1,0,0,0,1,1,1,0,0,1,1,1,1, &
0,1,1,0,1,1,1,1,0,0,0,1,1,0,1,0,1,0,1,1, &
0,0,1,1,0,1,0,1,0,1,0,0,1,0,0,0,0,0,0,1, &
1,0,0,0,0,0,0,0,1,1,0,1,0,0,1,0,1,1,0,1, &
0,1,0,1,0,0,1,1,0,0,1,0,0,1,0,0,0,0,1,1, &
1,1,1,1,1,1/
data first/.true./
common/chansyms65/correct
common/heap1/cref(NMAX),camp(NMAX),cfilt(NMAX),cw(NMAX)
save first
pi=4.0*atan(1.0)
! Symbol duration is 4096/11025 s.
! Sample rate is 12000/s, so 12000*(4096/11025)=4458.23 samples/symbol.
! For now, call it 4458 samples/symbol. Over the message duration, we'll be off
! by about (4458.23-4458)*126=28.98 samples; 29 samples, or 0.7% of 1 symbol.
! Could eliminate accumulated error by injecting one extra sample every
! 5 or so symbols... Maybe try this later.
nstart=dt*12000+1;
nsym=126
ns=4458
nref=nsym*ns
nend=nstart+nref-1
phi=0.0
iref=1
ind=1
isym=1
call timer('subtr_1 ',0)
do k=1,nsym
if( nprc(k) .eq. 1 ) then
omega=2*pi*f0
else
omega=2*pi*(f0+2.6917*(correct(isym)+2))
isym=isym+1
endif
dphi=omega/12000.0
do i=1,ns
cref(ind)=cexp(cmplx(0.0,phi))
phi=modulo(phi+dphi,2*pi)
id=nstart-1+ind
if(id.ge.1) camp(ind)=dd(id)*conjg(cref(ind))
ind=ind+1
enddo
enddo
call timer('subtr_1 ',1)
call timer('subtr_2 ',0)
! Smoothing filter: do the convolution by means of FFTs. Ignore end-around
! cyclic effects for now.
nfft=564480
if(first) then
! Create and normalize the filter
sum=0.0
do j=-NFILT/2,NFILT/2
window(j)=cos(pi*j/NFILT)**2
sum=sum+window(j)
enddo
cw=0.
do i=-NFILT/2,NFILT/2
j=i+1
if(j.lt.1) j=j+nfft
cw(j)=window(i)/sum
enddo
call four2a(cw,nfft,1,-1,1)
first=.false.
endif
nz=561708
cfilt(1:nz)=camp(1:nz)
cfilt(nz+1:nfft)=0.
call four2a(cfilt,nfft,1,-1,1)
fac=1.0/float(nfft)
cfilt(1:nfft)=fac*cfilt(1:nfft)*cw(1:nfft)
call four2a(cfilt,nfft,1,1,1)
call timer('subtr_2 ',1)
! Subtract the reconstructed signal
call timer('subtr_3 ',0)
do i=1,nref
j=nstart+i-1
if(j.ge.1 .and. j.le.npts) dd(j)=dd(j)-2*REAL(cfilt(i)*cref(i))
enddo
call timer('subtr_3 ',1)
return
end subroutine subtract65
@@ -0,0 +1,68 @@
#ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
#define BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
// MS compatible compilers support #pragma once
#if defined(_MSC_VER) && (_MSC_VER >= 1020)
# pragma once
#endif
//
// boost/detail/spinlock.hpp
//
// Copyright (c) 2008 Peter Dimov
//
// 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)
//
// struct spinlock
// {
// void lock();
// bool try_lock();
// void unlock();
//
// class scoped_lock;
// };
//
// #define BOOST_DETAIL_SPINLOCK_INIT <unspecified>
//
#include <boost/config.hpp>
#include <boost/smart_ptr/detail/sp_has_sync.hpp>
#if defined( BOOST_SP_USE_STD_ATOMIC )
# if !defined( __clang__ )
# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
# else
// Clang (at least up to 3.4) can't compile spinlock_pool when
// using std::atomic, so substitute the __sync implementation instead.
# include <boost/smart_ptr/detail/spinlock_sync.hpp>
# endif
#elif defined( BOOST_SP_USE_PTHREADS )
# include <boost/smart_ptr/detail/spinlock_pt.hpp>
#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC )
# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp>
#elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ )
# include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp>
#elif defined( BOOST_SP_HAS_SYNC )
# include <boost/smart_ptr/detail/spinlock_sync.hpp>
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
# include <boost/smart_ptr/detail/spinlock_w32.hpp>
#elif defined(BOOST_HAS_PTHREADS)
# include <boost/smart_ptr/detail/spinlock_pt.hpp>
#elif !defined(BOOST_HAS_THREADS)
# include <boost/smart_ptr/detail/spinlock_nt.hpp>
#else
# error Unrecognized threading platform
#endif
#endif // #ifndef BOOST_SMART_PTR_DETAIL_SPINLOCK_HPP_INCLUDED
@@ -0,0 +1,5 @@
kern.sysv.shmmax=33554432
kern.sysv.shmmin=1
kern.sysv.shmmni=128
kern.sysv.shmseg=32
kern.sysv.shmall=8192
@@ -0,0 +1,54 @@
/*=============================================================================
Copyright (c) 2001-2007 Joel de Guzman
Copyright (c) 2007 Dan Marsden
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(BOOST_FUSION_FOR_EACH_20070527_0943)
#define BOOST_FUSION_FOR_EACH_20070527_0943
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/algorithm/iteration/detail/for_each.hpp>
#include <boost/fusion/algorithm/iteration/detail/segmented_for_each.hpp>
#include <boost/fusion/support/is_segmented.hpp>
#include <boost/fusion/support/is_sequence.hpp>
#include <boost/utility/enable_if.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename Sequence, typename F>
struct for_each
{
typedef void type;
};
}
template <typename Sequence, typename F>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence& seq, F const& f)
{
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
}
template <typename Sequence, typename F>
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename
enable_if<
traits::is_sequence<Sequence>
, void
>::type
for_each(Sequence const& seq, F const& f)
{
detail::for_each(seq, f, typename traits::is_segmented<Sequence>::type());
}
}}
#endif
@@ -0,0 +1,8 @@
kvasd with xlambda=12.000
-26.0 0.017
-25.5 0.085
-25.0 0.282
-24.5 0.600
-24.0 0.865
-23.5 0.975
-23.0 0.9988
@@ -0,0 +1,56 @@
/*=============================================================================
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)
==============================================================================*/
#ifndef BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
#define BOOST_FUSION_ALGORITHM_ITERATION_FOLD_FWD_HPP
namespace boost { namespace fusion
{
namespace result_of
{
template<typename Seq, typename State, typename F>
struct fold;
}
template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq
, State const
, F
>::type
fold(Seq& seq, State const& state, F f);
template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq const
, State const
, F
>::type
fold(Seq const& seq, State const& state, F f);
template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq
, State
, F
>::type
fold(Seq& seq, State& state, F f);
template<typename Seq, typename State, typename F>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline typename result_of::fold<
Seq const
, State
, F
>::type
fold(Seq const& seq, State& state, F f);
}}
#endif
@@ -0,0 +1,219 @@
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#ifndef NO_BOOST_DATE_TIME_INLINE
#undef BOOST_DATE_TIME_INLINE
#define BOOST_DATE_TIME_INLINE inline
#endif
namespace boost {
namespace date_time {
//! Return the day of the week (0==Sunday, 1==Monday, etc)
/*! Converts a year-month-day into a day of the week number
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
unsigned short
gregorian_calendar_base<ymd_type_,date_int_type_>::day_of_week(const ymd_type& ymd) {
unsigned short a = static_cast<unsigned short>((14-ymd.month)/12);
unsigned short y = static_cast<unsigned short>(ymd.year - a);
unsigned short m = static_cast<unsigned short>(ymd.month + 12*a - 2);
unsigned short d = static_cast<unsigned short>((ymd.day + y + (y/4) - (y/100) + (y/400) + (31*m)/12) % 7);
//std::cout << year << "-" << month << "-" << day << " is day: " << d << "\n";
return d;
}
//!Return the iso week number for the date
/*!Implements the rules associated with the iso 8601 week number.
Basically the rule is that Week 1 of the year is the week that contains
January 4th or the week that contains the first Thursday in January.
Reference for this algorithm is the Calendar FAQ by Claus Tondering, April 2000.
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
int
gregorian_calendar_base<ymd_type_,date_int_type_>::week_number(const ymd_type& ymd) {
unsigned long julianbegin = julian_day_number(ymd_type(ymd.year,1,1));
unsigned long juliantoday = julian_day_number(ymd);
unsigned long day = (julianbegin + 3) % 7;
unsigned long week = (juliantoday + day - julianbegin + 4)/7;
if ((week >= 1) && (week <= 52)) {
return static_cast<int>(week);
}
if (week == 53) {
if((day==6) ||(day == 5 && is_leap_year(ymd.year))) {
return static_cast<int>(week); //under these circumstances week == 53.
} else {
return 1; //monday - wednesday is in week 1 of next year
}
}
//if the week is not in current year recalculate using the previous year as the beginning year
else if (week == 0) {
julianbegin = julian_day_number(ymd_type(static_cast<unsigned short>(ymd.year-1),1,1));
juliantoday = julian_day_number(ymd);
day = (julianbegin + 3) % 7;
week = (juliantoday + day - julianbegin + 4)/7;
return static_cast<int>(week);
}
return static_cast<int>(week); //not reachable -- well except if day == 5 and is_leap_year != true
}
//! Convert a ymd_type into a day number
/*! The day number is an absolute number of days since the start of count
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
date_int_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::day_number(const ymd_type& ymd)
{
unsigned short a = static_cast<unsigned short>((14-ymd.month)/12);
unsigned short y = static_cast<unsigned short>(ymd.year + 4800 - a);
unsigned short m = static_cast<unsigned short>(ymd.month + 12*a - 3);
unsigned long d = ymd.day + ((153*m + 2)/5) + 365*y + (y/4) - (y/100) + (y/400) - 32045;
return static_cast<date_int_type>(d);
}
//! Convert a year-month-day into the julian day number
/*! Since this implementation uses julian day internally, this is the same as the day_number.
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
date_int_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::julian_day_number(const ymd_type& ymd)
{
return day_number(ymd);
}
//! Convert year-month-day into a modified julian day number
/*! The day number is an absolute number of days.
* MJD 0 thus started on 17 Nov 1858(Gregorian) at 00:00:00 UTC
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
date_int_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::modjulian_day_number(const ymd_type& ymd)
{
return julian_day_number(ymd)-2400001; //prerounded
}
//! Change a day number into a year-month-day
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
ymd_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::from_day_number(date_int_type dayNumber)
{
date_int_type a = dayNumber + 32044;
date_int_type b = (4*a + 3)/146097;
date_int_type c = a-((146097*b)/4);
date_int_type d = (4*c + 3)/1461;
date_int_type e = c - (1461*d)/4;
date_int_type m = (5*e + 2)/153;
unsigned short day = static_cast<unsigned short>(e - ((153*m + 2)/5) + 1);
unsigned short month = static_cast<unsigned short>(m + 3 - 12 * (m/10));
year_type year = static_cast<unsigned short>(100*b + d - 4800 + (m/10));
//std::cout << year << "-" << month << "-" << day << "\n";
return ymd_type(static_cast<unsigned short>(year),month,day);
}
//! Change a day number into a year-month-day
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
ymd_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::from_julian_day_number(date_int_type dayNumber)
{
date_int_type a = dayNumber + 32044;
date_int_type b = (4*a+3)/146097;
date_int_type c = a - ((146097*b)/4);
date_int_type d = (4*c + 3)/1461;
date_int_type e = c - ((1461*d)/4);
date_int_type m = (5*e + 2)/153;
unsigned short day = static_cast<unsigned short>(e - ((153*m + 2)/5) + 1);
unsigned short month = static_cast<unsigned short>(m + 3 - 12 * (m/10));
year_type year = static_cast<year_type>(100*b + d - 4800 + (m/10));
//std::cout << year << "-" << month << "-" << day << "\n";
return ymd_type(year,month,day);
}
//! Change a modified julian day number into a year-month-day
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
ymd_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::from_modjulian_day_number(date_int_type dayNumber) {
date_int_type jd = dayNumber + 2400001; //is 2400000.5 prerounded
return from_julian_day_number(jd);
}
//! Determine if the provided year is a leap year
/*!
*@return true if year is a leap year, false otherwise
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
bool
gregorian_calendar_base<ymd_type_,date_int_type_>::is_leap_year(year_type year)
{
//divisible by 4, not if divisible by 100, but true if divisible by 400
return (!(year % 4)) && ((year % 100) || (!(year % 400)));
}
//! Calculate the last day of the month
/*! Find the day which is the end of the month given year and month
* No error checking is performed.
*/
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
unsigned short
gregorian_calendar_base<ymd_type_,date_int_type_>::end_of_month_day(year_type year,
month_type month)
{
switch (month) {
case 2:
if (is_leap_year(year)) {
return 29;
} else {
return 28;
};
case 4:
case 6:
case 9:
case 11:
return 30;
default:
return 31;
};
}
//! Provide the ymd_type specification for the calandar start
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
ymd_type_
gregorian_calendar_base<ymd_type_,date_int_type_>::epoch()
{
return ymd_type(1400,1,1);
}
//! Defines length of a week for week calculations
template<typename ymd_type_, typename date_int_type_>
BOOST_DATE_TIME_INLINE
unsigned short
gregorian_calendar_base<ymd_type_,date_int_type_>::days_in_week()
{
return 7;
}
} } //namespace gregorian
@@ -0,0 +1,107 @@
subroutine astro(nyear,month,nday,uth,freq8,Mygrid, &
NStation,MoonDX,AzSun,ElSun,AzMoon0,ElMoon0, &
ntsky,doppler00,doppler,dbMoon,RAMoon,DecMoon,HA,Dgrd,sd, &
poloffset,xnr,day,lon,lat,LST,techo)
! Computes astronomical quantities for display and tracking.
! NB: may want to smooth the Tsky map to 10 degrees or so.
character*6 MyGrid,HisGrid
real*8 freq8
real LST
real lat,lon
integer*2 nt144(180)
! common/echo/xdop(2),techo,AzMoon,ElMoon,mjd
real xdop(2)
data rad/57.2957795/
data nt144/ &
234, 246, 257, 267, 275, 280, 283, 286, 291, 298, &
305, 313, 322, 331, 341, 351, 361, 369, 376, 381, &
383, 382, 379, 374, 370, 366, 363, 361, 363, 368, &
376, 388, 401, 415, 428, 440, 453, 467, 487, 512, &
544, 579, 607, 618, 609, 588, 563, 539, 512, 482, &
450, 422, 398, 379, 363, 349, 334, 319, 302, 282, &
262, 242, 226, 213, 205, 200, 198, 197, 196, 197, &
200, 202, 204, 205, 204, 203, 202, 201, 203, 206, &
212, 218, 223, 227, 231, 236, 240, 243, 247, 257, &
276, 301, 324, 339, 346, 344, 339, 331, 323, 316, &
312, 310, 312, 317, 327, 341, 358, 375, 392, 407, &
422, 437, 451, 466, 480, 494, 511, 530, 552, 579, &
612, 653, 702, 768, 863,1008,1232,1557,1966,2385, &
2719,2924,3018,3038,2986,2836,2570,2213,1823,1461, &
1163, 939, 783, 677, 602, 543, 494, 452, 419, 392, &
373, 360, 353, 350, 350, 350, 350, 350, 350, 348, &
344, 337, 329, 319, 307, 295, 284, 276, 272, 272, &
273, 274, 274, 271, 266, 260, 252, 245, 238, 231/
save
call grid2deg(MyGrid,elon,lat)
lon=-elon
call sun(nyear,month,nday,uth,lon,lat,RASun,DecSun,LST, &
AzSun,ElSun,mjd,day)
call MoonDopJPL(nyear,month,nday,uth,lon,lat,RAMoon,DecMoon, &
LST,HA,AzMoon,ElMoon,vr,techo)
RAMoon=rad*RAMoon
DecMoon=rad*DecMoon
dist=2.99792458d5*techo/2.d0
! Compute spatial polarization offset
xx=sin(lat/rad)*cos(ElMoon/rad) - cos(lat/rad)* &
cos(AzMoon/rad)*sin(ElMoon/rad)
yy=cos(lat/rad)*sin(AzMoon/rad)
if(NStation.eq.1) poloffset1=rad*atan2(yy,xx)
if(NStation.eq.2) poloffset2=rad*atan2(yy,xx)
doppler=-freq8*vr/2.99792458e5 !One-way Doppler
call coord(0.,0.,-1.570796,1.161639,RAMoon/rad,DecMoon/rad,el,eb)
longecl_half=nint(rad*el/2.0)
if(longecl_half.lt.1 .or. longecl_half.gt.180) longecl_half=180
t144=nt144(longecl_half)
tsky=(t144-2.7)*(144.0d6/freq8)**2.6 + 2.7 !Tsky for obs freq
xdop(NStation)=doppler
if(NStation.eq.2) then
HisGrid=MyGrid
go to 900
endif
doppler00=2.0*xdop(1)
doppler=xdop(1)+xdop(2)
! if(mode.eq.3) doppler=2.0*xdop(1)
dBMoon=-40.0*log10(dist/356903.)
sd=16.23*370152.0/dist
! if(NStation.eq.1 .and. MoonDX.ne.0 .and.
! + (mode.eq.2 .or. mode.eq.5)) then
if(NStation.eq.1 .and. MoonDX.ne.0) then
poloffset=mod(poloffset2-poloffset1+720.0,180.0)
if(poloffset.gt.90.0) poloffset=poloffset-180.0
x1=abs(cos(2*poloffset/rad))
if(x1.lt.0.056234) x1=0.056234
xnr=-20.0*log10(x1)
if(HisGrid(1:1).lt.'A' .or. HisGrid(1:1).gt.'R') xnr=0
endif
tr=80.0 !Good preamp
tskymin=13.0*(408.0d6/freq8)**2.6 !Cold sky temperature
tsysmin=tskymin+tr
tsys=tsky+tr
dgrd=-10.0*log10(tsys/tsysmin) + dbMoon
900 AzMoon0=Azmoon
ElMoon0=Elmoon
ntsky=nint(tsky)
! auxHA = 15.0*(LST-auxra) !HA in degrees
! pi=3.14159265
! pio2=0.5*pi
! call coord(pi,pio2-lat/rad,0.0,lat/rad,auxha*pi/180.0,
! + auxdec/rad,azaux,elaux)
! AzAux=azaux*rad
! ElAux=ElAux*rad
return
end subroutine astro
@@ -0,0 +1,76 @@
# Set paths
EXE_DIR = C:/JTSDK/wsjtx_exp/install/Debug/bin
QT_DIR = /usr/include/qt5
INCPATH = -I${QT_DIR} -I${QT_DIR}/QtCore
CC = gcc
CXX = g++
FC = gfortran
AR = ar cr
MKDIR = mkdir -p
CP = cp
RANLIB = ranlib
RM = rm -f
FFLAGS = -O2 -Wall -Wno-conversion -fno-second-underscore
CFLAGS = -I. -fbounds-check -fPIE -DBIGSYM
# Default rules
%.o: %.c
${CC} ${CFLAGS} -c $<
%.o: %.f
${FC} ${FFLAGS} -c $<
%.o: %.F
${FC} ${FFLAGS} -c $<
%.o: %.f90
${FC} ${FFLAGS} -c $<
%.o: %.F90
${FC} ${FFLAGS} -c $<
all: libjt9.a jt65 jt65sim
OBJS1 = astrosub.o astro0.o astro.o sun.o coord.o tmoonsub.o \
fmtmsg.o deg2grid.o\
prog_args.o options.o pctile.o graycode.o sort.o chkmsg.o \
igray.o fftw3mod.o packjt.o\
four2a.o grid2deg.o wisdom.o \
symspec.o analytic.o db.o \
encode232.o interleave9.o \
entail.o fano232.o gran.o sync9.o decjt9.o \
fil3.o decoder.o timer.o exp_decode65.o fqso_first.o \
twkfreq.o symspec2.o shell.o sync65.o peakup.o slope.o xcor.o\
fillcom.o chkss2.o zplot9.o flat1.o flat2.o \
jt65a.o symspec65.o flat65.o ccf65.o decode65a.o \
filbig.o fil6521.o afc65b.o decode65b.o setup65.o \
extract.o fchisq65.o demod64a.o chkhist.o interleave63.o ccf2.o \
move.o indexx.o graycode65.o twkfreq65.o smo.o smo121.o \
wrapkarn.o init_rs.o encode_rs.o decode_rs.o gen65.o fil4.o \
flat4.o determ.o baddata.o subtract65.o
libjt9.a: $(OBJS1)
$(AR) libjt9.a $(OBJS1)
$(RANLIB) libjt9.a
OBJS7 = jt65.o
jt65: $(OBJS7) libjt9.a libsfrsd.a
$(FC) -o jt65 $(OBJS7) -L. -L./sfrsd2 -ljt9 -lsfrsd \
C:\JTSDK\fftw3f\libfftw3f-3.dll
OBJS2 = jt65sim.o wavhdr.o
jt65sim: $(OBJS2) libjt9.a
$(FC) -o jt65sim $(OBJS2) -L. -ljt9 C:\JTSDK\fftw3f\libfftw3f-3.dll
$(CP) jt65sim.exe $(EXE_DIR)
init_rs.o: init_rs.c
$(CC) -c -DBIGSYM=1 -o init_rs.o init_rs.c
encode_rs.o: encode_rs.c
$(CC) -c -DBIGSYM=1 -o encode_rs.o encode_rs.c
decode_rs.o: decode_rs.c
$(CC) -c -DBIGSYM=1 -o decode_rs.o decode_rs.c
.PHONY : clean
clean:
$(RM) *.o libjt9.a jt65
@@ -0,0 +1,288 @@
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
# /* Revised by Paul Mensonides (2002) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP
# define BOOST_PREPROCESSOR_LOGICAL_BOOL_HPP
#
# include <boost/preprocessor/config/config.hpp>
#
# /* BOOST_PP_BOOL */
#
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_I(x)
# else
# define BOOST_PP_BOOL(x) BOOST_PP_BOOL_OO((x))
# define BOOST_PP_BOOL_OO(par) BOOST_PP_BOOL_I ## par
# endif
#
# define BOOST_PP_BOOL_I(x) BOOST_PP_BOOL_ ## x
#
# define BOOST_PP_BOOL_0 0
# define BOOST_PP_BOOL_1 1
# define BOOST_PP_BOOL_2 1
# define BOOST_PP_BOOL_3 1
# define BOOST_PP_BOOL_4 1
# define BOOST_PP_BOOL_5 1
# define BOOST_PP_BOOL_6 1
# define BOOST_PP_BOOL_7 1
# define BOOST_PP_BOOL_8 1
# define BOOST_PP_BOOL_9 1
# define BOOST_PP_BOOL_10 1
# define BOOST_PP_BOOL_11 1
# define BOOST_PP_BOOL_12 1
# define BOOST_PP_BOOL_13 1
# define BOOST_PP_BOOL_14 1
# define BOOST_PP_BOOL_15 1
# define BOOST_PP_BOOL_16 1
# define BOOST_PP_BOOL_17 1
# define BOOST_PP_BOOL_18 1
# define BOOST_PP_BOOL_19 1
# define BOOST_PP_BOOL_20 1
# define BOOST_PP_BOOL_21 1
# define BOOST_PP_BOOL_22 1
# define BOOST_PP_BOOL_23 1
# define BOOST_PP_BOOL_24 1
# define BOOST_PP_BOOL_25 1
# define BOOST_PP_BOOL_26 1
# define BOOST_PP_BOOL_27 1
# define BOOST_PP_BOOL_28 1
# define BOOST_PP_BOOL_29 1
# define BOOST_PP_BOOL_30 1
# define BOOST_PP_BOOL_31 1
# define BOOST_PP_BOOL_32 1
# define BOOST_PP_BOOL_33 1
# define BOOST_PP_BOOL_34 1
# define BOOST_PP_BOOL_35 1
# define BOOST_PP_BOOL_36 1
# define BOOST_PP_BOOL_37 1
# define BOOST_PP_BOOL_38 1
# define BOOST_PP_BOOL_39 1
# define BOOST_PP_BOOL_40 1
# define BOOST_PP_BOOL_41 1
# define BOOST_PP_BOOL_42 1
# define BOOST_PP_BOOL_43 1
# define BOOST_PP_BOOL_44 1
# define BOOST_PP_BOOL_45 1
# define BOOST_PP_BOOL_46 1
# define BOOST_PP_BOOL_47 1
# define BOOST_PP_BOOL_48 1
# define BOOST_PP_BOOL_49 1
# define BOOST_PP_BOOL_50 1
# define BOOST_PP_BOOL_51 1
# define BOOST_PP_BOOL_52 1
# define BOOST_PP_BOOL_53 1
# define BOOST_PP_BOOL_54 1
# define BOOST_PP_BOOL_55 1
# define BOOST_PP_BOOL_56 1
# define BOOST_PP_BOOL_57 1
# define BOOST_PP_BOOL_58 1
# define BOOST_PP_BOOL_59 1
# define BOOST_PP_BOOL_60 1
# define BOOST_PP_BOOL_61 1
# define BOOST_PP_BOOL_62 1
# define BOOST_PP_BOOL_63 1
# define BOOST_PP_BOOL_64 1
# define BOOST_PP_BOOL_65 1
# define BOOST_PP_BOOL_66 1
# define BOOST_PP_BOOL_67 1
# define BOOST_PP_BOOL_68 1
# define BOOST_PP_BOOL_69 1
# define BOOST_PP_BOOL_70 1
# define BOOST_PP_BOOL_71 1
# define BOOST_PP_BOOL_72 1
# define BOOST_PP_BOOL_73 1
# define BOOST_PP_BOOL_74 1
# define BOOST_PP_BOOL_75 1
# define BOOST_PP_BOOL_76 1
# define BOOST_PP_BOOL_77 1
# define BOOST_PP_BOOL_78 1
# define BOOST_PP_BOOL_79 1
# define BOOST_PP_BOOL_80 1
# define BOOST_PP_BOOL_81 1
# define BOOST_PP_BOOL_82 1
# define BOOST_PP_BOOL_83 1
# define BOOST_PP_BOOL_84 1
# define BOOST_PP_BOOL_85 1
# define BOOST_PP_BOOL_86 1
# define BOOST_PP_BOOL_87 1
# define BOOST_PP_BOOL_88 1
# define BOOST_PP_BOOL_89 1
# define BOOST_PP_BOOL_90 1
# define BOOST_PP_BOOL_91 1
# define BOOST_PP_BOOL_92 1
# define BOOST_PP_BOOL_93 1
# define BOOST_PP_BOOL_94 1
# define BOOST_PP_BOOL_95 1
# define BOOST_PP_BOOL_96 1
# define BOOST_PP_BOOL_97 1
# define BOOST_PP_BOOL_98 1
# define BOOST_PP_BOOL_99 1
# define BOOST_PP_BOOL_100 1
# define BOOST_PP_BOOL_101 1
# define BOOST_PP_BOOL_102 1
# define BOOST_PP_BOOL_103 1
# define BOOST_PP_BOOL_104 1
# define BOOST_PP_BOOL_105 1
# define BOOST_PP_BOOL_106 1
# define BOOST_PP_BOOL_107 1
# define BOOST_PP_BOOL_108 1
# define BOOST_PP_BOOL_109 1
# define BOOST_PP_BOOL_110 1
# define BOOST_PP_BOOL_111 1
# define BOOST_PP_BOOL_112 1
# define BOOST_PP_BOOL_113 1
# define BOOST_PP_BOOL_114 1
# define BOOST_PP_BOOL_115 1
# define BOOST_PP_BOOL_116 1
# define BOOST_PP_BOOL_117 1
# define BOOST_PP_BOOL_118 1
# define BOOST_PP_BOOL_119 1
# define BOOST_PP_BOOL_120 1
# define BOOST_PP_BOOL_121 1
# define BOOST_PP_BOOL_122 1
# define BOOST_PP_BOOL_123 1
# define BOOST_PP_BOOL_124 1
# define BOOST_PP_BOOL_125 1
# define BOOST_PP_BOOL_126 1
# define BOOST_PP_BOOL_127 1
# define BOOST_PP_BOOL_128 1
# define BOOST_PP_BOOL_129 1
# define BOOST_PP_BOOL_130 1
# define BOOST_PP_BOOL_131 1
# define BOOST_PP_BOOL_132 1
# define BOOST_PP_BOOL_133 1
# define BOOST_PP_BOOL_134 1
# define BOOST_PP_BOOL_135 1
# define BOOST_PP_BOOL_136 1
# define BOOST_PP_BOOL_137 1
# define BOOST_PP_BOOL_138 1
# define BOOST_PP_BOOL_139 1
# define BOOST_PP_BOOL_140 1
# define BOOST_PP_BOOL_141 1
# define BOOST_PP_BOOL_142 1
# define BOOST_PP_BOOL_143 1
# define BOOST_PP_BOOL_144 1
# define BOOST_PP_BOOL_145 1
# define BOOST_PP_BOOL_146 1
# define BOOST_PP_BOOL_147 1
# define BOOST_PP_BOOL_148 1
# define BOOST_PP_BOOL_149 1
# define BOOST_PP_BOOL_150 1
# define BOOST_PP_BOOL_151 1
# define BOOST_PP_BOOL_152 1
# define BOOST_PP_BOOL_153 1
# define BOOST_PP_BOOL_154 1
# define BOOST_PP_BOOL_155 1
# define BOOST_PP_BOOL_156 1
# define BOOST_PP_BOOL_157 1
# define BOOST_PP_BOOL_158 1
# define BOOST_PP_BOOL_159 1
# define BOOST_PP_BOOL_160 1
# define BOOST_PP_BOOL_161 1
# define BOOST_PP_BOOL_162 1
# define BOOST_PP_BOOL_163 1
# define BOOST_PP_BOOL_164 1
# define BOOST_PP_BOOL_165 1
# define BOOST_PP_BOOL_166 1
# define BOOST_PP_BOOL_167 1
# define BOOST_PP_BOOL_168 1
# define BOOST_PP_BOOL_169 1
# define BOOST_PP_BOOL_170 1
# define BOOST_PP_BOOL_171 1
# define BOOST_PP_BOOL_172 1
# define BOOST_PP_BOOL_173 1
# define BOOST_PP_BOOL_174 1
# define BOOST_PP_BOOL_175 1
# define BOOST_PP_BOOL_176 1
# define BOOST_PP_BOOL_177 1
# define BOOST_PP_BOOL_178 1
# define BOOST_PP_BOOL_179 1
# define BOOST_PP_BOOL_180 1
# define BOOST_PP_BOOL_181 1
# define BOOST_PP_BOOL_182 1
# define BOOST_PP_BOOL_183 1
# define BOOST_PP_BOOL_184 1
# define BOOST_PP_BOOL_185 1
# define BOOST_PP_BOOL_186 1
# define BOOST_PP_BOOL_187 1
# define BOOST_PP_BOOL_188 1
# define BOOST_PP_BOOL_189 1
# define BOOST_PP_BOOL_190 1
# define BOOST_PP_BOOL_191 1
# define BOOST_PP_BOOL_192 1
# define BOOST_PP_BOOL_193 1
# define BOOST_PP_BOOL_194 1
# define BOOST_PP_BOOL_195 1
# define BOOST_PP_BOOL_196 1
# define BOOST_PP_BOOL_197 1
# define BOOST_PP_BOOL_198 1
# define BOOST_PP_BOOL_199 1
# define BOOST_PP_BOOL_200 1
# define BOOST_PP_BOOL_201 1
# define BOOST_PP_BOOL_202 1
# define BOOST_PP_BOOL_203 1
# define BOOST_PP_BOOL_204 1
# define BOOST_PP_BOOL_205 1
# define BOOST_PP_BOOL_206 1
# define BOOST_PP_BOOL_207 1
# define BOOST_PP_BOOL_208 1
# define BOOST_PP_BOOL_209 1
# define BOOST_PP_BOOL_210 1
# define BOOST_PP_BOOL_211 1
# define BOOST_PP_BOOL_212 1
# define BOOST_PP_BOOL_213 1
# define BOOST_PP_BOOL_214 1
# define BOOST_PP_BOOL_215 1
# define BOOST_PP_BOOL_216 1
# define BOOST_PP_BOOL_217 1
# define BOOST_PP_BOOL_218 1
# define BOOST_PP_BOOL_219 1
# define BOOST_PP_BOOL_220 1
# define BOOST_PP_BOOL_221 1
# define BOOST_PP_BOOL_222 1
# define BOOST_PP_BOOL_223 1
# define BOOST_PP_BOOL_224 1
# define BOOST_PP_BOOL_225 1
# define BOOST_PP_BOOL_226 1
# define BOOST_PP_BOOL_227 1
# define BOOST_PP_BOOL_228 1
# define BOOST_PP_BOOL_229 1
# define BOOST_PP_BOOL_230 1
# define BOOST_PP_BOOL_231 1
# define BOOST_PP_BOOL_232 1
# define BOOST_PP_BOOL_233 1
# define BOOST_PP_BOOL_234 1
# define BOOST_PP_BOOL_235 1
# define BOOST_PP_BOOL_236 1
# define BOOST_PP_BOOL_237 1
# define BOOST_PP_BOOL_238 1
# define BOOST_PP_BOOL_239 1
# define BOOST_PP_BOOL_240 1
# define BOOST_PP_BOOL_241 1
# define BOOST_PP_BOOL_242 1
# define BOOST_PP_BOOL_243 1
# define BOOST_PP_BOOL_244 1
# define BOOST_PP_BOOL_245 1
# define BOOST_PP_BOOL_246 1
# define BOOST_PP_BOOL_247 1
# define BOOST_PP_BOOL_248 1
# define BOOST_PP_BOOL_249 1
# define BOOST_PP_BOOL_250 1
# define BOOST_PP_BOOL_251 1
# define BOOST_PP_BOOL_252 1
# define BOOST_PP_BOOL_253 1
# define BOOST_PP_BOOL_254 1
# define BOOST_PP_BOOL_255 1
# define BOOST_PP_BOOL_256 1
#
# endif
@@ -0,0 +1,15 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// abi_suffix.hpp
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// 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 http://www.boost.org for updates, documentation, and revision history.
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/config/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
@@ -0,0 +1,32 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
#ifndef BOOST_FT_IS_FUNCTION_REFERENCE_HPP_INCLUDED
#define BOOST_FT_IS_FUNCTION_REFERENCE_HPP_INCLUDED
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/function_types/components.hpp>
namespace boost
{
namespace function_types
{
template< typename T, typename Tag = null_tag >
struct is_function_reference
: function_types::represents
< function_types::components<T>
, function_types::tag<Tag ,detail::reference_tag> >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,is_function_reference,(T,Tag))
};
}
}
#endif
@@ -0,0 +1,109 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_DETAIL_SORT_HPP
#define BOOST_UNITS_DETAIL_SORT_HPP
#include <boost/mpl/size.hpp>
#include <boost/mpl/begin.hpp>
#include <boost/mpl/next.hpp>
#include <boost/mpl/deref.hpp>
#include <boost/mpl/push_front.hpp>
#include <boost/mpl/less.hpp>
#include <boost/units/dimensionless_type.hpp>
#include <boost/units/detail/dimension_list.hpp>
namespace boost {
namespace units {
namespace detail {
template<int N>
struct insertion_sort_insert;
template<bool is_greater>
struct insertion_sort_comparison_impl;
// have to recursively add the element to the next sequence.
template<>
struct insertion_sort_comparison_impl<true> {
template<class Begin, int N, class T>
struct apply {
typedef list<
typename Begin::item,
typename insertion_sort_insert<N - 1>::template apply<
typename Begin::next,
T
>::type
> type;
};
};
// prepend the current element
template<>
struct insertion_sort_comparison_impl<false> {
template<class Begin, int N, class T>
struct apply {
typedef list<T, Begin> type;
};
};
template<int N>
struct insertion_sort_insert {
template<class Begin, class T>
struct apply {
typedef typename insertion_sort_comparison_impl<mpl::less<typename Begin::item, T>::value>::template apply<
Begin,
N,
T
>::type type;
};
};
template<>
struct insertion_sort_insert<0> {
template<class Begin, class T>
struct apply {
typedef list<T, dimensionless_type> type;
};
};
template<int N>
struct insertion_sort_impl {
template<class Begin>
struct apply {
typedef typename insertion_sort_impl<N - 1>::template apply<typename Begin::next>::type next;
typedef typename insertion_sort_insert<(next::size::value)>::template apply<next, typename Begin::item>::type type;
};
};
template<>
struct insertion_sort_impl<0> {
template<class Begin>
struct apply {
typedef dimensionless_type type;
};
};
template<class T>
struct insertion_sort
{
typedef typename insertion_sort_impl<T::size::value>::template apply<T>::type type;
};
} // namespace detail
} // namespace units
} // namespace boost
#endif
@@ -0,0 +1,166 @@
/* ALIST-TO-PCHK.C - Convert a parity check matrix to alist format. */
/* Copyright (c) 1995-2012 by Radford M. Neal.
*
* Permission is granted for anyone to copy, use, modify, and distribute
* these programs and accompanying documents for any purpose, provided
* this copyright notice is retained and prominently displayed, and note
* is made of any changes made to these programs. These programs and
* documents are distributed without any warranty, express or implied.
* As the programs were written for research purposes only, they have not
* been tested to the degree that would be advisable in any important
* application. All use of these programs is entirely at the user's own
* risk.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "alloc.h"
#include "open.h"
#include "mod2sparse.h"
#include "mod2dense.h"
#include "mod2convert.h"
#include "rcode.h"
void usage(void);
/* MAIN PROGRAM. */
int main
( int argc,
char **argv
)
{
char *alist_file, *pchk_file;
FILE *af, *pf;
int mxrw, mxcw;
int *rw, *cw;
int i, j, k;
mod2entry *e;
int trans;
int nozeros;
int last;
trans = 0;
nozeros = 0;
for (;;)
{
if (argc>1 && strcmp(argv[1],"-t")==0)
{ trans = 1;
argc -= 1;
argv += 1;
}
else if (argc>1 && strcmp(argv[1],"-z")==0)
{ nozeros = 1;
argc -= 1;
argv += 1;
}
else
{ break;
}
}
if (argc!=3)
{ usage();
}
pchk_file = argv[1];
alist_file = argv[2];
read_pchk(pchk_file);
if (trans)
{ mod2sparse *HT;
HT = H;
H = mod2sparse_allocate(N,M);
mod2sparse_transpose(HT,H);
M = mod2sparse_rows(H);
N = mod2sparse_cols(H);
}
af = open_file_std(alist_file,"wb");
if (af==NULL)
{ fprintf(stderr,"Can't create alist file: %s\n",alist_file);
exit(1);
}
fprintf(af,"%d %d\n",M,N);
rw = (int *) chk_alloc (M, sizeof *rw);
mxrw = 0;
for (i = 0; i<M; i++)
{ rw[i] = mod2sparse_count_row(H,i);
if (rw[i]>mxrw)
{ mxrw = rw[i];
}
}
cw = (int *) chk_alloc (N, sizeof *cw);
mxcw = 0;
for (j = 0; j<N; j++)
{ cw[j] = mod2sparse_count_col(H,j);
if (cw[j]>mxcw)
{ mxcw = cw[j];
}
}
fprintf(af,"%d %d\n",mxrw,mxcw);
for (i = 0; i<M; i++)
{ fprintf(af,"%d%c",rw[i],i==M-1?'\n':' ');
}
for (j = 0; j<N; j++)
{ fprintf(af,"%d%c",cw[j],j==N-1?'\n':' ');
}
for (i = 0; i<M; i++)
{ e = mod2sparse_first_in_row(H,i);
last = 0;
for (k = 0; !last; k++)
{ last = nozeros ? k==rw[i]-1 : k==mxrw-1;
fprintf (af, "%d%c", mod2sparse_at_end(e)?0:mod2sparse_col(e)+1,
last?'\n':' ');
if (!mod2sparse_at_end(e))
{ e = mod2sparse_next_in_row(e);
}
}
}
for (j = 0; j<N; j++)
{ e = mod2sparse_first_in_col(H,j);
last = 0;
for (k = 0; !last; k++)
{ last = nozeros ? k==cw[j]-1 : k==mxcw-1;
fprintf (af, "%d%c", mod2sparse_at_end(e)?0:mod2sparse_row(e)+1,
last?'\n':' ');
if (!mod2sparse_at_end(e))
{ e = mod2sparse_next_in_col(e);
}
}
}
if (ferror(af) || fclose(af)!=0)
{ fprintf(stderr,"Error writing to alist file %s\n",alist_file);
exit(1);
}
return 0;
}
/* PRINT USAGE MESSAGE AND EXIT. */
void usage(void)
{ fprintf(stderr,"Usage: pchk-to-alist [ -t ] [ -z ] pchk-file alist-file\n");
exit(1);
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,249 @@
/* Copyright 2003-2015 Joaquin M Lopez Munoz.
* 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/multi_index for library home page.
*/
#ifndef BOOST_MULTI_INDEX_DETAIL_INDEX_MATCHER_HPP
#define BOOST_MULTI_INDEX_DETAIL_INDEX_MATCHER_HPP
#if defined(_MSC_VER)
#pragma once
#endif
#include <boost/config.hpp> /* keep it first to prevent nasty warns in MSVC */
#include <algorithm>
#include <boost/noncopyable.hpp>
#include <boost/multi_index/detail/auto_space.hpp>
#include <boost/multi_index/detail/raw_ptr.hpp>
#include <cstddef>
#include <functional>
namespace boost{
namespace multi_index{
namespace detail{
/* index_matcher compares a sequence of elements against a
* base sequence, identifying those elements that belong to the
* longest subsequence which is ordered with respect to the base.
* For instance, if the base sequence is:
*
* 0 1 2 3 4 5 6 7 8 9
*
* and the compared sequence (not necesarilly the same length):
*
* 1 4 2 3 0 7 8 9
*
* the elements of the longest ordered subsequence are:
*
* 1 2 3 7 8 9
*
* The algorithm for obtaining such a subsequence is called
* Patience Sorting, described in ch. 1 of:
* Aldous, D., Diaconis, P.: "Longest increasing subsequences: from
* patience sorting to the Baik-Deift-Johansson Theorem", Bulletin
* of the American Mathematical Society, vol. 36, no 4, pp. 413-432,
* July 1999.
* http://www.ams.org/bull/1999-36-04/S0273-0979-99-00796-X/
* S0273-0979-99-00796-X.pdf
*
* This implementation is not fully generic since it assumes that
* the sequences given are pointed to by index iterators (having a
* get_node() memfun.)
*/
namespace index_matcher{
/* The algorithm stores the nodes of the base sequence and a number
* of "piles" that are dynamically updated during the calculation
* stage. From a logical point of view, nodes form an independent
* sequence from piles. They are stored together so as to minimize
* allocated memory.
*/
struct entry
{
entry(void* node_,std::size_t pos_=0):node(node_),pos(pos_){}
/* node stuff */
void* node;
std::size_t pos;
entry* previous;
bool ordered;
struct less_by_node
{
bool operator()(
const entry& x,const entry& y)const
{
return std::less<void*>()(x.node,y.node);
}
};
/* pile stuff */
std::size_t pile_top;
entry* pile_top_entry;
struct less_by_pile_top
{
bool operator()(
const entry& x,const entry& y)const
{
return x.pile_top<y.pile_top;
}
};
};
/* common code operating on void *'s */
template<typename Allocator>
class algorithm_base:private noncopyable
{
protected:
algorithm_base(const Allocator& al,std::size_t size):
spc(al,size),size_(size),n_(0),sorted(false)
{
}
void add(void* node)
{
entries()[n_]=entry(node,n_);
++n_;
}
void begin_algorithm()const
{
if(!sorted){
std::sort(entries(),entries()+size_,entry::less_by_node());
sorted=true;
}
num_piles=0;
}
void add_node_to_algorithm(void* node)const
{
entry* ent=
std::lower_bound(
entries(),entries()+size_,
entry(node),entry::less_by_node()); /* localize entry */
ent->ordered=false;
std::size_t n=ent->pos; /* get its position */
entry dummy(0);
dummy.pile_top=n;
entry* pile_ent= /* find the first available pile */
std::lower_bound( /* to stack the entry */
entries(),entries()+num_piles,
dummy,entry::less_by_pile_top());
pile_ent->pile_top=n; /* stack the entry */
pile_ent->pile_top_entry=ent;
/* if not the first pile, link entry to top of the preceding pile */
if(pile_ent>&entries()[0]){
ent->previous=(pile_ent-1)->pile_top_entry;
}
if(pile_ent==&entries()[num_piles]){ /* new pile? */
++num_piles;
}
}
void finish_algorithm()const
{
if(num_piles>0){
/* Mark those elements which are in their correct position, i.e. those
* belonging to the longest increasing subsequence. These are those
* elements linked from the top of the last pile.
*/
entry* ent=entries()[num_piles-1].pile_top_entry;
for(std::size_t n=num_piles;n--;){
ent->ordered=true;
ent=ent->previous;
}
}
}
bool is_ordered(void * node)const
{
return std::lower_bound(
entries(),entries()+size_,
entry(node),entry::less_by_node())->ordered;
}
private:
entry* entries()const{return raw_ptr<entry*>(spc.data());}
auto_space<entry,Allocator> spc;
std::size_t size_;
std::size_t n_;
mutable bool sorted;
mutable std::size_t num_piles;
};
/* The algorithm has three phases:
* - Initialization, during which the nodes of the base sequence are added.
* - Execution.
* - Results querying, through the is_ordered memfun.
*/
template<typename Node,typename Allocator>
class algorithm:private algorithm_base<Allocator>
{
typedef algorithm_base<Allocator> super;
public:
algorithm(const Allocator& al,std::size_t size):super(al,size){}
void add(Node* node)
{
super::add(node);
}
template<typename IndexIterator>
void execute(IndexIterator first,IndexIterator last)const
{
super::begin_algorithm();
for(IndexIterator it=first;it!=last;++it){
add_node_to_algorithm(get_node(it));
}
super::finish_algorithm();
}
bool is_ordered(Node* node)const
{
return super::is_ordered(node);
}
private:
void add_node_to_algorithm(Node* node)const
{
super::add_node_to_algorithm(node);
}
template<typename IndexIterator>
static Node* get_node(IndexIterator it)
{
return static_cast<Node*>(it.get_node());
}
};
} /* namespace multi_index::detail::index_matcher */
} /* namespace multi_index::detail */
} /* namespace multi_index */
} /* namespace boost */
#endif
@@ -0,0 +1,43 @@
#ifndef BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
#define BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
// 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)
//
// See http://www.boost.org/libs/mpl for documentation.
// $Id$
// $Date$
// $Revision$
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/next_prior.hpp>
# include <boost/mpl/apply.hpp>
# include <boost/mpl/deref.hpp>
# include <boost/mpl/aux_/config/ctps.hpp>
# if defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
# include <boost/mpl/if.hpp>
# include <boost/type_traits/is_same.hpp>
# endif
#endif
#include <boost/mpl/aux_/config/use_preprocessed.hpp>
#if !defined(BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS) \
&& !defined(BOOST_MPL_PREPROCESSING_MODE)
# define BOOST_MPL_PREPROCESSED_HEADER fold_impl.hpp
# include <boost/mpl/aux_/include_preprocessed.hpp>
#else
# define AUX778076_FOLD_IMPL_OP(iter) typename deref<iter>::type
# define AUX778076_FOLD_IMPL_NAME_PREFIX fold
# include <boost/mpl/aux_/fold_impl_body.hpp>
#endif // BOOST_MPL_CFG_NO_PREPROCESSED_HEADERS
#endif // BOOST_MPL_AUX_FOLD_IMPL_HPP_INCLUDED
@@ -0,0 +1,197 @@
#include "decodedtext.h"
#include <QStringList>
#include <QRegularExpression>
extern "C" {
bool stdmsg_(const char* msg, int len);
}
DecodedText::DecodedText (QString const& the_string)
: string_ {the_string}
, padding_ {the_string.indexOf (" ") > 4 ? 2 : 0} // allow for
// seconds
, message_ {string_.mid (column_qsoText + padding_).trimmed ()}
, is_standard_ {false}
{
if (message_.length() >= 1)
{
message_ = message_.left (22).remove (QRegularExpression {"[<>]"});
int i1 = message_.indexOf ('\r');
if (i1 > 0)
{
message_ = message_.left (i1 - 1);
}
// stdmsg is a fortran routine that packs the text, unpacks it and compares the result
is_standard_ = stdmsg_ ((message_ + " ").toLatin1 ().constData (),22);
}
};
void DecodedText::removeAddedInfo ()
{
if (string_.indexOf (" CQ ") > 0) {
// TODO this magic 37 characters is also referenced in DisplayText::_appendDXCCWorkedB4()
auto eom_pos = string_.indexOf (' ', 37);
if (eom_pos < 37) eom_pos = string_.size () - 1; // we always want at least the characters
// to position 37
string_ = string_.left (eom_pos + 1); // remove DXCC entity and worked B4 status. TODO need a better way to do this
}
}
QString DecodedText::CQersCall() const
{
QRegularExpression callsign_re {R"(^(CQ|DE|QRZ)(\s?DX|\s([A-Z]{2}|\d{3}))?\s(?<callsign>[A-Z0-9/]{2,})(\s[A-R]{2}[0-9]{2})?)"};
return callsign_re.match (message_).captured ("callsign");
}
bool DecodedText::isJT65() const
{
return string_.indexOf("#") == column_mode + padding_;
}
bool DecodedText::isJT9() const
{
return string_.indexOf("@") == column_mode + padding_;
}
bool DecodedText::isTX() const
{
int i = string_.indexOf("Tx");
return (i >= 0 && i < 15); // TODO guessing those numbers. Does Tx ever move?
}
bool DecodedText::isLowConfidence () const
{
return QChar {'?'} == string_.mid (padding_ + column_qsoText + 21, 1);
}
int DecodedText::frequencyOffset() const
{
return string_.mid(column_freq + padding_,4).toInt();
}
int DecodedText::snr() const
{
int i1=string_.indexOf(" ")+1;
return string_.mid(i1,3).toInt();
}
float DecodedText::dt() const
{
return string_.mid(column_dt + padding_,5).toFloat();
}
/*
2343 -11 0.8 1259 # YV6BFE F6GUU R-08
2343 -19 0.3 718 # VE6WQ SQ2NIJ -14
2343 -7 0.3 815 # KK4DSD W7VP -16
2343 -13 0.1 3627 @ CT1FBK IK5YZT R+02
0605 Tx 1259 # CQ VK3ACF QF22
*/
// find and extract any report. Returns true if this is a standard message
bool DecodedText::report(QString const& myBaseCall, QString const& dxBaseCall, /*mod*/QString& report) const
{
if (message_.size () < 1) return false;
QStringList const& w = message_.split(" ",QString::SkipEmptyParts);
if (w.size ()
&& is_standard_ && (w[0] == myBaseCall
|| w[0].endsWith ("/" + myBaseCall)
|| w[0].startsWith (myBaseCall + "/")
|| (w.size () > 1 && !dxBaseCall.isEmpty ()
&& (w[1] == dxBaseCall
|| w[1].endsWith ("/" + dxBaseCall)
|| w[1].startsWith (dxBaseCall + "/")))))
{
QString tt="";
if(w.size() > 2) tt=w[2];
bool ok;
auto i1=tt.toInt(&ok);
if (ok and i1>=-50 and i1<50)
{
report = tt;
}
else
{
if (tt.mid(0,1)=="R")
{
i1=tt.mid(1).toInt(&ok);
if(ok and i1>=-50 and i1<50)
{
report = tt.mid(1);
}
}
}
}
return is_standard_;
}
// get the first text word, usually the call
QString DecodedText::call() const
{
auto call = string_;
call = call.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText + padding_);
int i = call.indexOf(" ");
return call.mid(0,i);
}
// get the second word, most likely the de call and the third word, most likely grid
void DecodedText::deCallAndGrid(/*out*/QString& call, QString& grid) const
{
auto msg = string_;
if(msg.mid(4,1)!=" ") msg=msg.mid(0,4)+msg.mid(6,-1); //Remove seconds from UTC
msg = msg.replace (QRegularExpression {" CQ ([A-Z]{2,2}|[0-9]{3,3}) "}, " CQ_\\1 ").mid (column_qsoText + padding_);
int i1 = msg.indexOf (" ");
call = msg.mid (i1 + 1);
int i2 = call.indexOf (" ");
if (" R " == call.mid (i2, 3)) // MSK144 contest mode report
{
grid = call.mid (i2 + 3, 4);
}
else
{
grid = call.mid (i2 + 1, 4);
}
call = call.left (i2).replace (">", "");
}
int DecodedText::timeInSeconds() const
{
return 60*string_.mid(column_time,2).toInt() + string_.mid(2,2).toInt();
}
/*
2343 -11 0.8 1259 # YV6BFE F6GUU R-08
2343 -19 0.3 718 # VE6WQ SQ2NIJ -14
2343 -7 0.3 815 # KK4DSD W7VP -16
2343 -13 0.1 3627 @ CT1FBK IK5YZT R+02
0605 Tx 1259 # CQ VK3ACF QF22
*/
QString DecodedText::report() const // returns a string of the SNR field with a leading + or - followed by two digits
{
int sr = snr();
if (sr<-50)
sr = -50;
else
if (sr > 49)
sr = 49;
QString rpt;
rpt.sprintf("%d",abs(sr));
if (sr > 9)
rpt = "+" + rpt;
else
if (sr >= 0)
rpt = "+0" + rpt;
else
if (sr >= -9)
rpt = "-0" + rpt;
else
rpt = "-" + rpt;
return rpt;
}
@@ -0,0 +1,39 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
#define BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
#include <boost/compute/system.hpp>
#include <boost/compute/command_queue.hpp>
#include <boost/compute/algorithm/stable_partition.hpp>
namespace boost {
namespace compute {
///
/// Partitions the elements in the range [\p first, \p last) according to
/// \p predicate. Order of the elements need not be preserved.
///
/// \see is_partitioned() and stable_partition()
///
template<class Iterator, class UnaryPredicate>
inline Iterator partition(Iterator first,
Iterator last,
UnaryPredicate predicate,
command_queue &queue = system::default_queue())
{
return stable_partition(first, last, predicate, queue);
}
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_ALGORITHM_PARTITION_HPP
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,122 @@
/* boost random/detail/large_arithmetic.hpp header file
*
* Copyright Steven Watanabe 2011
* Distributed under the Boost Software License, Version 1.0. (See
* accompanying file LICENSE_1_0.txt or copy at
* http://www.boost.org/LICENSE_1_0.txt)
*
* See http://www.boost.org for most recent version including documentation.
*
* $Id$
*/
#ifndef BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP
#define BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP
#include <boost/cstdint.hpp>
#include <boost/integer.hpp>
#include <boost/limits.hpp>
#include <boost/random/detail/integer_log2.hpp>
#include <boost/random/detail/disable_warnings.hpp>
namespace boost {
namespace random {
namespace detail {
struct div_t {
boost::uintmax_t quotient;
boost::uintmax_t remainder;
};
inline div_t muldivmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m)
{
const int bits =
::std::numeric_limits< ::boost::uintmax_t>::digits / 2;
const ::boost::uintmax_t mask = (::boost::uintmax_t(1) << bits) - 1;
typedef ::boost::uint_t<bits>::fast digit_t;
int shift = std::numeric_limits< ::boost::uintmax_t>::digits - 1
- detail::integer_log2(m);
a <<= shift;
m <<= shift;
digit_t product[4] = { 0, 0, 0, 0 };
digit_t a_[2] = { digit_t(a & mask), digit_t((a >> bits) & mask) };
digit_t b_[2] = { digit_t(b & mask), digit_t((b >> bits) & mask) };
digit_t m_[2] = { digit_t(m & mask), digit_t((m >> bits) & mask) };
// multiply a * b
for(int i = 0; i < 2; ++i) {
digit_t carry = 0;
for(int j = 0; j < 2; ++j) {
::boost::uint64_t temp = ::boost::uintmax_t(a_[i]) * b_[j] +
carry + product[i + j];
product[i + j] = digit_t(temp & mask);
carry = digit_t(temp >> bits);
}
if(carry != 0) {
product[i + 2] += carry;
}
}
digit_t quotient[2];
if(m == 0) {
div_t result = {
((::boost::uintmax_t(product[3]) << bits) | product[2]),
((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift,
};
return result;
}
// divide product / m
for(int i = 3; i >= 2; --i) {
::boost::uintmax_t temp =
::boost::uintmax_t(product[i]) << bits | product[i - 1];
digit_t q = digit_t((product[i] == m_[1]) ? mask : temp / m_[1]);
::boost::uintmax_t rem =
((temp - ::boost::uintmax_t(q) * m_[1]) << bits) + product[i - 2];
::boost::uintmax_t diff = m_[0] * ::boost::uintmax_t(q);
int error = 0;
if(diff > rem) {
if(diff - rem > m) {
error = 2;
} else {
error = 1;
}
}
q -= error;
rem = rem + error * m - diff;
quotient[i - 2] = q;
product[i] = 0;
product[i-1] = static_cast<digit_t>((rem >> bits) & mask);
product[i-2] = static_cast<digit_t>(rem & mask);
}
div_t result = {
((::boost::uintmax_t(quotient[1]) << bits) | quotient[0]),
((::boost::uintmax_t(product[1]) << bits) | product[0]) >> shift,
};
return result;
}
inline boost::uintmax_t muldiv(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m)
{ return detail::muldivmod(a, b, m).quotient; }
inline boost::uintmax_t mulmod(boost::uintmax_t a, boost::uintmax_t b, boost::uintmax_t m)
{ return detail::muldivmod(a, b, m).remainder; }
} // namespace detail
} // namespace random
} // namespace boost
#include <boost/random/detail/enable_warnings.hpp>
#endif // BOOST_RANDOM_DETAIL_LARGE_ARITHMETIC_HPP
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,788 @@
// Copyright John Maddock 2006.
// 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_MATH_SP_UC_FACTORIALS_HPP
#define BOOST_MATH_SP_UC_FACTORIALS_HPP
#ifdef _MSC_VER
#pragma once
#endif
#include <boost/array.hpp>
#ifdef BOOST_MSVC
#pragma warning(push) // Temporary until lexical cast fixed.
#pragma warning(disable: 4127 4701)
#endif
#ifndef BOOST_MATH_NO_LEXICAL_CAST
#include <boost/lexical_cast.hpp>
#endif
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
#include <boost/config/no_tr1/cmath.hpp>
#include <boost/math/special_functions/math_fwd.hpp>
namespace boost { namespace math
{
// Forward declarations:
template <class T>
struct max_factorial;
// Definitions:
template <>
inline float unchecked_factorial<float>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(float))
{
static const boost::array<float, 35> factorials = {{
1.0F,
1.0F,
2.0F,
6.0F,
24.0F,
120.0F,
720.0F,
5040.0F,
40320.0F,
362880.0F,
3628800.0F,
39916800.0F,
479001600.0F,
6227020800.0F,
87178291200.0F,
1307674368000.0F,
20922789888000.0F,
355687428096000.0F,
6402373705728000.0F,
121645100408832000.0F,
0.243290200817664e19F,
0.5109094217170944e20F,
0.112400072777760768e22F,
0.2585201673888497664e23F,
0.62044840173323943936e24F,
0.15511210043330985984e26F,
0.403291461126605635584e27F,
0.10888869450418352160768e29F,
0.304888344611713860501504e30F,
0.8841761993739701954543616e31F,
0.26525285981219105863630848e33F,
0.822283865417792281772556288e34F,
0.26313083693369353016721801216e36F,
0.868331761881188649551819440128e37F,
0.29523279903960414084761860964352e39F,
}};
return factorials[i];
}
template <>
struct max_factorial<float>
{
BOOST_STATIC_CONSTANT(unsigned, value = 34);
};
template <>
inline long double unchecked_factorial<long double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(long double))
{
static const boost::array<long double, 171> factorials = {{
1L,
1L,
2L,
6L,
24L,
120L,
720L,
5040L,
40320L,
362880.0L,
3628800.0L,
39916800.0L,
479001600.0L,
6227020800.0L,
87178291200.0L,
1307674368000.0L,
20922789888000.0L,
355687428096000.0L,
6402373705728000.0L,
121645100408832000.0L,
0.243290200817664e19L,
0.5109094217170944e20L,
0.112400072777760768e22L,
0.2585201673888497664e23L,
0.62044840173323943936e24L,
0.15511210043330985984e26L,
0.403291461126605635584e27L,
0.10888869450418352160768e29L,
0.304888344611713860501504e30L,
0.8841761993739701954543616e31L,
0.26525285981219105863630848e33L,
0.822283865417792281772556288e34L,
0.26313083693369353016721801216e36L,
0.868331761881188649551819440128e37L,
0.29523279903960414084761860964352e39L,
0.103331479663861449296666513375232e41L,
0.3719933267899012174679994481508352e42L,
0.137637530912263450463159795815809024e44L,
0.5230226174666011117600072241000742912e45L,
0.203978820811974433586402817399028973568e47L,
0.815915283247897734345611269596115894272e48L,
0.3345252661316380710817006205344075166515e50L,
0.1405006117752879898543142606244511569936e52L,
0.6041526306337383563735513206851399750726e53L,
0.265827157478844876804362581101461589032e55L,
0.1196222208654801945619631614956577150644e57L,
0.5502622159812088949850305428800254892962e58L,
0.2586232415111681806429643551536119799692e60L,
0.1241391559253607267086228904737337503852e62L,
0.6082818640342675608722521633212953768876e63L,
0.3041409320171337804361260816606476884438e65L,
0.1551118753287382280224243016469303211063e67L,
0.8065817517094387857166063685640376697529e68L,
0.427488328406002556429801375338939964969e70L,
0.2308436973392413804720927426830275810833e72L,
0.1269640335365827592596510084756651695958e74L,
0.7109985878048634518540456474637249497365e75L,
0.4052691950487721675568060190543232213498e77L,
0.2350561331282878571829474910515074683829e79L,
0.1386831185456898357379390197203894063459e81L,
0.8320987112741390144276341183223364380754e82L,
0.507580213877224798800856812176625227226e84L,
0.3146997326038793752565312235495076408801e86L,
0.1982608315404440064116146708361898137545e88L,
0.1268869321858841641034333893351614808029e90L,
0.8247650592082470666723170306785496252186e91L,
0.5443449390774430640037292402478427526443e93L,
0.3647111091818868528824985909660546442717e95L,
0.2480035542436830599600990418569171581047e97L,
0.1711224524281413113724683388812728390923e99L,
0.1197857166996989179607278372168909873646e101L,
0.8504785885678623175211676442399260102886e102L,
0.6123445837688608686152407038527467274078e104L,
0.4470115461512684340891257138125051110077e106L,
0.3307885441519386412259530282212537821457e108L,
0.2480914081139539809194647711659403366093e110L,
0.188549470166605025498793226086114655823e112L,
0.1451830920282858696340707840863082849837e114L,
0.1132428117820629783145752115873204622873e116L,
0.8946182130782975286851441715398316520698e117L,
0.7156945704626380229481153372318653216558e119L,
0.5797126020747367985879734231578109105412e121L,
0.4753643337012841748421382069894049466438e123L,
0.3945523969720658651189747118012061057144e125L,
0.3314240134565353266999387579130131288001e127L,
0.2817104114380550276949479442260611594801e129L,
0.2422709538367273238176552320344125971528e131L,
0.210775729837952771721360051869938959523e133L,
0.1854826422573984391147968456455462843802e135L,
0.1650795516090846108121691926245361930984e137L,
0.1485715964481761497309522733620825737886e139L,
0.1352001527678402962551665687594951421476e141L,
0.1243841405464130725547532432587355307758e143L,
0.1156772507081641574759205162306240436215e145L,
0.1087366156656743080273652852567866010042e147L,
0.103299784882390592625997020993947270954e149L,
0.9916779348709496892095714015418938011582e150L,
0.9619275968248211985332842594956369871234e152L,
0.942689044888324774562618574305724247381e154L,
0.9332621544394415268169923885626670049072e156L,
0.9332621544394415268169923885626670049072e158L,
0.9425947759838359420851623124482936749562e160L,
0.9614466715035126609268655586972595484554e162L,
0.990290071648618040754671525458177334909e164L,
0.1029901674514562762384858386476504428305e167L,
0.1081396758240290900504101305800329649721e169L,
0.1146280563734708354534347384148349428704e171L,
0.1226520203196137939351751701038733888713e173L,
0.132464181945182897449989183712183259981e175L,
0.1443859583202493582204882102462797533793e177L,
0.1588245541522742940425370312709077287172e179L,
0.1762952551090244663872161047107075788761e181L,
0.1974506857221074023536820372759924883413e183L,
0.2231192748659813646596607021218715118256e185L,
0.2543559733472187557120132004189335234812e187L,
0.2925093693493015690688151804817735520034e189L,
0.339310868445189820119825609358857320324e191L,
0.396993716080872089540195962949863064779e193L,
0.4684525849754290656574312362808384164393e195L,
0.5574585761207605881323431711741977155627e197L,
0.6689502913449127057588118054090372586753e199L,
0.8094298525273443739681622845449350829971e201L,
0.9875044200833601362411579871448208012564e203L,
0.1214630436702532967576624324188129585545e206L,
0.1506141741511140879795014161993280686076e208L,
0.1882677176888926099743767702491600857595e210L,
0.237217324288004688567714730513941708057e212L,
0.3012660018457659544809977077527059692324e214L,
0.3856204823625804217356770659234636406175e216L,
0.4974504222477287440390234150412680963966e218L,
0.6466855489220473672507304395536485253155e220L,
0.8471580690878820510984568758152795681634e222L,
0.1118248651196004307449963076076169029976e225L,
0.1487270706090685728908450891181304809868e227L,
0.1992942746161518876737324194182948445223e229L,
0.269047270731805048359538766214698040105e231L,
0.3659042881952548657689727220519893345429e233L,
0.5012888748274991661034926292112253883237e235L,
0.6917786472619488492228198283114910358867e237L,
0.9615723196941089004197195613529725398826e239L,
0.1346201247571752460587607385894161555836e242L,
0.1898143759076170969428526414110767793728e244L,
0.2695364137888162776588507508037290267094e246L,
0.3854370717180072770521565736493325081944e248L,
0.5550293832739304789551054660550388118e250L,
0.80479260574719919448490292577980627711e252L,
0.1174997204390910823947958271638517164581e255L,
0.1727245890454638911203498659308620231933e257L,
0.2556323917872865588581178015776757943262e259L,
0.380892263763056972698595524350736933546e261L,
0.571338395644585459047893286526105400319e263L,
0.8627209774233240431623188626544191544816e265L,
0.1311335885683452545606724671234717114812e268L,
0.2006343905095682394778288746989117185662e270L,
0.308976961384735088795856467036324046592e272L,
0.4789142901463393876335775239063022722176e274L,
0.7471062926282894447083809372938315446595e276L,
0.1172956879426414428192158071551315525115e279L,
0.1853271869493734796543609753051078529682e281L,
0.2946702272495038326504339507351214862195e283L,
0.4714723635992061322406943211761943779512e285L,
0.7590705053947218729075178570936729485014e287L,
0.1229694218739449434110178928491750176572e290L,
0.2004401576545302577599591653441552787813e292L,
0.3287218585534296227263330311644146572013e294L,
0.5423910666131588774984495014212841843822e296L,
0.9003691705778437366474261723593317460744e298L,
0.1503616514864999040201201707840084015944e301L,
0.2526075744973198387538018869171341146786e303L,
0.4269068009004705274939251888899566538069e305L,
0.7257415615307998967396728211129263114717e307L,
}};
return factorials[i];
}
template <>
struct max_factorial<long double>
{
BOOST_STATIC_CONSTANT(unsigned, value = 170);
};
#ifdef BOOST_MATH_USE_FLOAT128
template <>
inline BOOST_MATH_FLOAT128_TYPE unchecked_factorial<BOOST_MATH_FLOAT128_TYPE>(unsigned i)
{
static const boost::array<BOOST_MATH_FLOAT128_TYPE, 171> factorials = { {
1,
1,
2,
6,
24,
120,
720,
5040,
40320,
362880.0Q,
3628800.0Q,
39916800.0Q,
479001600.0Q,
6227020800.0Q,
87178291200.0Q,
1307674368000.0Q,
20922789888000.0Q,
355687428096000.0Q,
6402373705728000.0Q,
121645100408832000.0Q,
0.243290200817664e19Q,
0.5109094217170944e20Q,
0.112400072777760768e22Q,
0.2585201673888497664e23Q,
0.62044840173323943936e24Q,
0.15511210043330985984e26Q,
0.403291461126605635584e27Q,
0.10888869450418352160768e29Q,
0.304888344611713860501504e30Q,
0.8841761993739701954543616e31Q,
0.26525285981219105863630848e33Q,
0.822283865417792281772556288e34Q,
0.26313083693369353016721801216e36Q,
0.868331761881188649551819440128e37Q,
0.29523279903960414084761860964352e39Q,
0.103331479663861449296666513375232e41Q,
0.3719933267899012174679994481508352e42Q,
0.137637530912263450463159795815809024e44Q,
0.5230226174666011117600072241000742912e45Q,
0.203978820811974433586402817399028973568e47Q,
0.815915283247897734345611269596115894272e48Q,
0.3345252661316380710817006205344075166515e50Q,
0.1405006117752879898543142606244511569936e52Q,
0.6041526306337383563735513206851399750726e53Q,
0.265827157478844876804362581101461589032e55Q,
0.1196222208654801945619631614956577150644e57Q,
0.5502622159812088949850305428800254892962e58Q,
0.2586232415111681806429643551536119799692e60Q,
0.1241391559253607267086228904737337503852e62Q,
0.6082818640342675608722521633212953768876e63Q,
0.3041409320171337804361260816606476884438e65Q,
0.1551118753287382280224243016469303211063e67Q,
0.8065817517094387857166063685640376697529e68Q,
0.427488328406002556429801375338939964969e70Q,
0.2308436973392413804720927426830275810833e72Q,
0.1269640335365827592596510084756651695958e74Q,
0.7109985878048634518540456474637249497365e75Q,
0.4052691950487721675568060190543232213498e77Q,
0.2350561331282878571829474910515074683829e79Q,
0.1386831185456898357379390197203894063459e81Q,
0.8320987112741390144276341183223364380754e82Q,
0.507580213877224798800856812176625227226e84Q,
0.3146997326038793752565312235495076408801e86Q,
0.1982608315404440064116146708361898137545e88Q,
0.1268869321858841641034333893351614808029e90Q,
0.8247650592082470666723170306785496252186e91Q,
0.5443449390774430640037292402478427526443e93Q,
0.3647111091818868528824985909660546442717e95Q,
0.2480035542436830599600990418569171581047e97Q,
0.1711224524281413113724683388812728390923e99Q,
0.1197857166996989179607278372168909873646e101Q,
0.8504785885678623175211676442399260102886e102Q,
0.6123445837688608686152407038527467274078e104Q,
0.4470115461512684340891257138125051110077e106Q,
0.3307885441519386412259530282212537821457e108Q,
0.2480914081139539809194647711659403366093e110Q,
0.188549470166605025498793226086114655823e112Q,
0.1451830920282858696340707840863082849837e114Q,
0.1132428117820629783145752115873204622873e116Q,
0.8946182130782975286851441715398316520698e117Q,
0.7156945704626380229481153372318653216558e119Q,
0.5797126020747367985879734231578109105412e121Q,
0.4753643337012841748421382069894049466438e123Q,
0.3945523969720658651189747118012061057144e125Q,
0.3314240134565353266999387579130131288001e127Q,
0.2817104114380550276949479442260611594801e129Q,
0.2422709538367273238176552320344125971528e131Q,
0.210775729837952771721360051869938959523e133Q,
0.1854826422573984391147968456455462843802e135Q,
0.1650795516090846108121691926245361930984e137Q,
0.1485715964481761497309522733620825737886e139Q,
0.1352001527678402962551665687594951421476e141Q,
0.1243841405464130725547532432587355307758e143Q,
0.1156772507081641574759205162306240436215e145Q,
0.1087366156656743080273652852567866010042e147Q,
0.103299784882390592625997020993947270954e149Q,
0.9916779348709496892095714015418938011582e150Q,
0.9619275968248211985332842594956369871234e152Q,
0.942689044888324774562618574305724247381e154Q,
0.9332621544394415268169923885626670049072e156Q,
0.9332621544394415268169923885626670049072e158Q,
0.9425947759838359420851623124482936749562e160Q,
0.9614466715035126609268655586972595484554e162Q,
0.990290071648618040754671525458177334909e164Q,
0.1029901674514562762384858386476504428305e167Q,
0.1081396758240290900504101305800329649721e169Q,
0.1146280563734708354534347384148349428704e171Q,
0.1226520203196137939351751701038733888713e173Q,
0.132464181945182897449989183712183259981e175Q,
0.1443859583202493582204882102462797533793e177Q,
0.1588245541522742940425370312709077287172e179Q,
0.1762952551090244663872161047107075788761e181Q,
0.1974506857221074023536820372759924883413e183Q,
0.2231192748659813646596607021218715118256e185Q,
0.2543559733472187557120132004189335234812e187Q,
0.2925093693493015690688151804817735520034e189Q,
0.339310868445189820119825609358857320324e191Q,
0.396993716080872089540195962949863064779e193Q,
0.4684525849754290656574312362808384164393e195Q,
0.5574585761207605881323431711741977155627e197Q,
0.6689502913449127057588118054090372586753e199Q,
0.8094298525273443739681622845449350829971e201Q,
0.9875044200833601362411579871448208012564e203Q,
0.1214630436702532967576624324188129585545e206Q,
0.1506141741511140879795014161993280686076e208Q,
0.1882677176888926099743767702491600857595e210Q,
0.237217324288004688567714730513941708057e212Q,
0.3012660018457659544809977077527059692324e214Q,
0.3856204823625804217356770659234636406175e216Q,
0.4974504222477287440390234150412680963966e218Q,
0.6466855489220473672507304395536485253155e220Q,
0.8471580690878820510984568758152795681634e222Q,
0.1118248651196004307449963076076169029976e225Q,
0.1487270706090685728908450891181304809868e227Q,
0.1992942746161518876737324194182948445223e229Q,
0.269047270731805048359538766214698040105e231Q,
0.3659042881952548657689727220519893345429e233Q,
0.5012888748274991661034926292112253883237e235Q,
0.6917786472619488492228198283114910358867e237Q,
0.9615723196941089004197195613529725398826e239Q,
0.1346201247571752460587607385894161555836e242Q,
0.1898143759076170969428526414110767793728e244Q,
0.2695364137888162776588507508037290267094e246Q,
0.3854370717180072770521565736493325081944e248Q,
0.5550293832739304789551054660550388118e250Q,
0.80479260574719919448490292577980627711e252Q,
0.1174997204390910823947958271638517164581e255Q,
0.1727245890454638911203498659308620231933e257Q,
0.2556323917872865588581178015776757943262e259Q,
0.380892263763056972698595524350736933546e261Q,
0.571338395644585459047893286526105400319e263Q,
0.8627209774233240431623188626544191544816e265Q,
0.1311335885683452545606724671234717114812e268Q,
0.2006343905095682394778288746989117185662e270Q,
0.308976961384735088795856467036324046592e272Q,
0.4789142901463393876335775239063022722176e274Q,
0.7471062926282894447083809372938315446595e276Q,
0.1172956879426414428192158071551315525115e279Q,
0.1853271869493734796543609753051078529682e281Q,
0.2946702272495038326504339507351214862195e283Q,
0.4714723635992061322406943211761943779512e285Q,
0.7590705053947218729075178570936729485014e287Q,
0.1229694218739449434110178928491750176572e290Q,
0.2004401576545302577599591653441552787813e292Q,
0.3287218585534296227263330311644146572013e294Q,
0.5423910666131588774984495014212841843822e296Q,
0.9003691705778437366474261723593317460744e298Q,
0.1503616514864999040201201707840084015944e301Q,
0.2526075744973198387538018869171341146786e303Q,
0.4269068009004705274939251888899566538069e305Q,
0.7257415615307998967396728211129263114717e307Q,
} };
return factorials[i];
}
template <>
struct max_factorial<BOOST_MATH_FLOAT128_TYPE>
{
BOOST_STATIC_CONSTANT(unsigned, value = 170);
};
#endif
template <>
inline double unchecked_factorial<double>(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(double))
{
return static_cast<double>(boost::math::unchecked_factorial<long double>(i));
}
template <>
struct max_factorial<double>
{
BOOST_STATIC_CONSTANT(unsigned,
value = ::boost::math::max_factorial<long double>::value);
};
#ifndef BOOST_MATH_NO_LEXICAL_CAST
template <class T>
struct unchecked_factorial_initializer
{
struct init
{
init()
{
boost::math::unchecked_factorial<T>(3);
}
void force_instantiate()const {}
};
static const init initializer;
static void force_instantiate()
{
initializer.force_instantiate();
}
};
template <class T>
const typename unchecked_factorial_initializer<T>::init unchecked_factorial_initializer<T>::initializer;
template <class T, int N>
inline T unchecked_factorial_imp(unsigned i, const mpl::int_<N>&)
{
BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
// factorial<unsigned int>(n) is not implemented
// because it would overflow integral type T for too small n
// to be useful. Use instead a floating-point type,
// and convert to an unsigned type if essential, for example:
// unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
// See factorial documentation for more detail.
unchecked_factorial_initializer<T>::force_instantiate();
static const boost::array<T, 101> factorials = {{
T(boost::math::tools::convert_from_string<T>("1")),
T(boost::math::tools::convert_from_string<T>("1")),
T(boost::math::tools::convert_from_string<T>("2")),
T(boost::math::tools::convert_from_string<T>("6")),
T(boost::math::tools::convert_from_string<T>("24")),
T(boost::math::tools::convert_from_string<T>("120")),
T(boost::math::tools::convert_from_string<T>("720")),
T(boost::math::tools::convert_from_string<T>("5040")),
T(boost::math::tools::convert_from_string<T>("40320")),
T(boost::math::tools::convert_from_string<T>("362880")),
T(boost::math::tools::convert_from_string<T>("3628800")),
T(boost::math::tools::convert_from_string<T>("39916800")),
T(boost::math::tools::convert_from_string<T>("479001600")),
T(boost::math::tools::convert_from_string<T>("6227020800")),
T(boost::math::tools::convert_from_string<T>("87178291200")),
T(boost::math::tools::convert_from_string<T>("1307674368000")),
T(boost::math::tools::convert_from_string<T>("20922789888000")),
T(boost::math::tools::convert_from_string<T>("355687428096000")),
T(boost::math::tools::convert_from_string<T>("6402373705728000")),
T(boost::math::tools::convert_from_string<T>("121645100408832000")),
T(boost::math::tools::convert_from_string<T>("2432902008176640000")),
T(boost::math::tools::convert_from_string<T>("51090942171709440000")),
T(boost::math::tools::convert_from_string<T>("1124000727777607680000")),
T(boost::math::tools::convert_from_string<T>("25852016738884976640000")),
T(boost::math::tools::convert_from_string<T>("620448401733239439360000")),
T(boost::math::tools::convert_from_string<T>("15511210043330985984000000")),
T(boost::math::tools::convert_from_string<T>("403291461126605635584000000")),
T(boost::math::tools::convert_from_string<T>("10888869450418352160768000000")),
T(boost::math::tools::convert_from_string<T>("304888344611713860501504000000")),
T(boost::math::tools::convert_from_string<T>("8841761993739701954543616000000")),
T(boost::math::tools::convert_from_string<T>("265252859812191058636308480000000")),
T(boost::math::tools::convert_from_string<T>("8222838654177922817725562880000000")),
T(boost::math::tools::convert_from_string<T>("263130836933693530167218012160000000")),
T(boost::math::tools::convert_from_string<T>("8683317618811886495518194401280000000")),
T(boost::math::tools::convert_from_string<T>("295232799039604140847618609643520000000")),
T(boost::math::tools::convert_from_string<T>("10333147966386144929666651337523200000000")),
T(boost::math::tools::convert_from_string<T>("371993326789901217467999448150835200000000")),
T(boost::math::tools::convert_from_string<T>("13763753091226345046315979581580902400000000")),
T(boost::math::tools::convert_from_string<T>("523022617466601111760007224100074291200000000")),
T(boost::math::tools::convert_from_string<T>("20397882081197443358640281739902897356800000000")),
T(boost::math::tools::convert_from_string<T>("815915283247897734345611269596115894272000000000")),
T(boost::math::tools::convert_from_string<T>("33452526613163807108170062053440751665152000000000")),
T(boost::math::tools::convert_from_string<T>("1405006117752879898543142606244511569936384000000000")),
T(boost::math::tools::convert_from_string<T>("60415263063373835637355132068513997507264512000000000")),
T(boost::math::tools::convert_from_string<T>("2658271574788448768043625811014615890319638528000000000")),
T(boost::math::tools::convert_from_string<T>("119622220865480194561963161495657715064383733760000000000")),
T(boost::math::tools::convert_from_string<T>("5502622159812088949850305428800254892961651752960000000000")),
T(boost::math::tools::convert_from_string<T>("258623241511168180642964355153611979969197632389120000000000")),
T(boost::math::tools::convert_from_string<T>("12413915592536072670862289047373375038521486354677760000000000")),
T(boost::math::tools::convert_from_string<T>("608281864034267560872252163321295376887552831379210240000000000")),
T(boost::math::tools::convert_from_string<T>("30414093201713378043612608166064768844377641568960512000000000000")),
T(boost::math::tools::convert_from_string<T>("1551118753287382280224243016469303211063259720016986112000000000000")),
T(boost::math::tools::convert_from_string<T>("80658175170943878571660636856403766975289505440883277824000000000000")),
T(boost::math::tools::convert_from_string<T>("4274883284060025564298013753389399649690343788366813724672000000000000")),
T(boost::math::tools::convert_from_string<T>("230843697339241380472092742683027581083278564571807941132288000000000000")),
T(boost::math::tools::convert_from_string<T>("12696403353658275925965100847566516959580321051449436762275840000000000000")),
T(boost::math::tools::convert_from_string<T>("710998587804863451854045647463724949736497978881168458687447040000000000000")),
T(boost::math::tools::convert_from_string<T>("40526919504877216755680601905432322134980384796226602145184481280000000000000")),
T(boost::math::tools::convert_from_string<T>("2350561331282878571829474910515074683828862318181142924420699914240000000000000")),
T(boost::math::tools::convert_from_string<T>("138683118545689835737939019720389406345902876772687432540821294940160000000000000")),
T(boost::math::tools::convert_from_string<T>("8320987112741390144276341183223364380754172606361245952449277696409600000000000000")),
T(boost::math::tools::convert_from_string<T>("507580213877224798800856812176625227226004528988036003099405939480985600000000000000")),
T(boost::math::tools::convert_from_string<T>("31469973260387937525653122354950764088012280797258232192163168247821107200000000000000")),
T(boost::math::tools::convert_from_string<T>("1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000")),
T(boost::math::tools::convert_from_string<T>("126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000")),
T(boost::math::tools::convert_from_string<T>("8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000")),
T(boost::math::tools::convert_from_string<T>("544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000")),
T(boost::math::tools::convert_from_string<T>("36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000")),
T(boost::math::tools::convert_from_string<T>("2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000")),
T(boost::math::tools::convert_from_string<T>("171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000")),
T(boost::math::tools::convert_from_string<T>("11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000")),
T(boost::math::tools::convert_from_string<T>("850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000")),
T(boost::math::tools::convert_from_string<T>("61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000")),
T(boost::math::tools::convert_from_string<T>("4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000")),
T(boost::math::tools::convert_from_string<T>("330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000")),
T(boost::math::tools::convert_from_string<T>("24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000")),
T(boost::math::tools::convert_from_string<T>("1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000")),
T(boost::math::tools::convert_from_string<T>("145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000")),
T(boost::math::tools::convert_from_string<T>("11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000")),
T(boost::math::tools::convert_from_string<T>("894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000")),
T(boost::math::tools::convert_from_string<T>("71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000")),
T(boost::math::tools::convert_from_string<T>("5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000")),
T(boost::math::tools::convert_from_string<T>("475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000")),
T(boost::math::tools::convert_from_string<T>("39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000")),
T(boost::math::tools::convert_from_string<T>("3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000")),
T(boost::math::tools::convert_from_string<T>("281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000")),
T(boost::math::tools::convert_from_string<T>("24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000")),
T(boost::math::tools::convert_from_string<T>("2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000")),
T(boost::math::tools::convert_from_string<T>("185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000")),
T(boost::math::tools::convert_from_string<T>("16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000")),
T(boost::math::tools::convert_from_string<T>("1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000")),
T(boost::math::tools::convert_from_string<T>("93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000")),
}};
return factorials[i];
}
template <class T>
inline T unchecked_factorial_imp(unsigned i, const mpl::int_<0>&)
{
BOOST_STATIC_ASSERT(!boost::is_integral<T>::value);
// factorial<unsigned int>(n) is not implemented
// because it would overflow integral type T for too small n
// to be useful. Use instead a floating-point type,
// and convert to an unsigned type if essential, for example:
// unsigned int nfac = static_cast<unsigned int>(factorial<double>(n));
// See factorial documentation for more detail.
#ifdef BOOST_NO_CXX11_THREAD_LOCAL
unchecked_factorial_initializer<T>::force_instantiate();
#endif
static const char* const factorial_strings[] = {
"1",
"1",
"2",
"6",
"24",
"120",
"720",
"5040",
"40320",
"362880",
"3628800",
"39916800",
"479001600",
"6227020800",
"87178291200",
"1307674368000",
"20922789888000",
"355687428096000",
"6402373705728000",
"121645100408832000",
"2432902008176640000",
"51090942171709440000",
"1124000727777607680000",
"25852016738884976640000",
"620448401733239439360000",
"15511210043330985984000000",
"403291461126605635584000000",
"10888869450418352160768000000",
"304888344611713860501504000000",
"8841761993739701954543616000000",
"265252859812191058636308480000000",
"8222838654177922817725562880000000",
"263130836933693530167218012160000000",
"8683317618811886495518194401280000000",
"295232799039604140847618609643520000000",
"10333147966386144929666651337523200000000",
"371993326789901217467999448150835200000000",
"13763753091226345046315979581580902400000000",
"523022617466601111760007224100074291200000000",
"20397882081197443358640281739902897356800000000",
"815915283247897734345611269596115894272000000000",
"33452526613163807108170062053440751665152000000000",
"1405006117752879898543142606244511569936384000000000",
"60415263063373835637355132068513997507264512000000000",
"2658271574788448768043625811014615890319638528000000000",
"119622220865480194561963161495657715064383733760000000000",
"5502622159812088949850305428800254892961651752960000000000",
"258623241511168180642964355153611979969197632389120000000000",
"12413915592536072670862289047373375038521486354677760000000000",
"608281864034267560872252163321295376887552831379210240000000000",
"30414093201713378043612608166064768844377641568960512000000000000",
"1551118753287382280224243016469303211063259720016986112000000000000",
"80658175170943878571660636856403766975289505440883277824000000000000",
"4274883284060025564298013753389399649690343788366813724672000000000000",
"230843697339241380472092742683027581083278564571807941132288000000000000",
"12696403353658275925965100847566516959580321051449436762275840000000000000",
"710998587804863451854045647463724949736497978881168458687447040000000000000",
"40526919504877216755680601905432322134980384796226602145184481280000000000000",
"2350561331282878571829474910515074683828862318181142924420699914240000000000000",
"138683118545689835737939019720389406345902876772687432540821294940160000000000000",
"8320987112741390144276341183223364380754172606361245952449277696409600000000000000",
"507580213877224798800856812176625227226004528988036003099405939480985600000000000000",
"31469973260387937525653122354950764088012280797258232192163168247821107200000000000000",
"1982608315404440064116146708361898137544773690227268628106279599612729753600000000000000",
"126886932185884164103433389335161480802865516174545192198801894375214704230400000000000000",
"8247650592082470666723170306785496252186258551345437492922123134388955774976000000000000000",
"544344939077443064003729240247842752644293064388798874532860126869671081148416000000000000000",
"36471110918188685288249859096605464427167635314049524593701628500267962436943872000000000000000",
"2480035542436830599600990418569171581047399201355367672371710738018221445712183296000000000000000",
"171122452428141311372468338881272839092270544893520369393648040923257279754140647424000000000000000",
"11978571669969891796072783721689098736458938142546425857555362864628009582789845319680000000000000000",
"850478588567862317521167644239926010288584608120796235886430763388588680378079017697280000000000000000",
"61234458376886086861524070385274672740778091784697328983823014963978384987221689274204160000000000000000",
"4470115461512684340891257138125051110076800700282905015819080092370422104067183317016903680000000000000000",
"330788544151938641225953028221253782145683251820934971170611926835411235700971565459250872320000000000000000",
"24809140811395398091946477116594033660926243886570122837795894512655842677572867409443815424000000000000000000",
"1885494701666050254987932260861146558230394535379329335672487982961844043495537923117729972224000000000000000000",
"145183092028285869634070784086308284983740379224208358846781574688061991349156420080065207861248000000000000000000",
"11324281178206297831457521158732046228731749579488251990048962825668835325234200766245086213177344000000000000000000",
"894618213078297528685144171539831652069808216779571907213868063227837990693501860533361810841010176000000000000000000",
"71569457046263802294811533723186532165584657342365752577109445058227039255480148842668944867280814080000000000000000000",
"5797126020747367985879734231578109105412357244731625958745865049716390179693892056256184534249745940480000000000000000000",
"475364333701284174842138206989404946643813294067993328617160934076743994734899148613007131808479167119360000000000000000000",
"39455239697206586511897471180120610571436503407643446275224357528369751562996629334879591940103770870906880000000000000000000",
"3314240134565353266999387579130131288000666286242049487118846032383059131291716864129885722968716753156177920000000000000000000",
"281710411438055027694947944226061159480056634330574206405101912752560026159795933451040286452340924018275123200000000000000000000",
"24227095383672732381765523203441259715284870552429381750838764496720162249742450276789464634901319465571660595200000000000000000000",
"2107757298379527717213600518699389595229783738061356212322972511214654115727593174080683423236414793504734471782400000000000000000000",
"185482642257398439114796845645546284380220968949399346684421580986889562184028199319100141244804501828416633516851200000000000000000000",
"16507955160908461081216919262453619309839666236496541854913520707833171034378509739399912570787600662729080382999756800000000000000000000",
"1485715964481761497309522733620825737885569961284688766942216863704985393094065876545992131370884059645617234469978112000000000000000000000",
"135200152767840296255166568759495142147586866476906677791741734597153670771559994765685283954750449427751168336768008192000000000000000000000",
"12438414054641307255475324325873553077577991715875414356840239582938137710983519518443046123837041347353107486982656753664000000000000000000000",
"1156772507081641574759205162306240436214753229576413535186142281213246807121467315215203289516844845303838996289387078090752000000000000000000000",
"108736615665674308027365285256786601004186803580182872307497374434045199869417927630229109214583415458560865651202385340530688000000000000000000000",
"10329978488239059262599702099394727095397746340117372869212250571234293987594703124871765375385424468563282236864226607350415360000000000000000000000",
"991677934870949689209571401541893801158183648651267795444376054838492222809091499987689476037000748982075094738965754305639874560000000000000000000000",
"96192759682482119853328425949563698712343813919172976158104477319333745612481875498805879175589072651261284189679678167647067832320000000000000000000000",
"9426890448883247745626185743057242473809693764078951663494238777294707070023223798882976159207729119823605850588608460429412647567360000000000000000000000",
"933262154439441526816992388562667004907159682643816214685929638952175999932299156089414639761565182862536979208272237582511852109168640000000000000000000000",
"93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000",
};
static BOOST_MATH_THREAD_LOCAL T factorials[sizeof(factorial_strings) / sizeof(factorial_strings[0])];
static BOOST_MATH_THREAD_LOCAL int digits = 0;
int current_digits = boost::math::tools::digits<T>();
if(digits != current_digits)
{
digits = current_digits;
for(unsigned k = 0; k < sizeof(factorials) / sizeof(factorials[0]); ++k)
factorials[k] = static_cast<T>(boost::math::tools::convert_from_string<T>(factorial_strings[k]));
}
return factorials[i];
}
template <class T>
inline T unchecked_factorial(unsigned i)
{
typedef typename boost::math::policies::precision<T, boost::math::policies::policy<> >::type tag_type;
return unchecked_factorial_imp<T>(i, tag_type());
}
template <class T>
struct max_factorial
{
BOOST_STATIC_CONSTANT(unsigned, value = 100);
};
#else // BOOST_MATH_NO_LEXICAL_CAST
template <class T>
inline T unchecked_factorial(unsigned i BOOST_MATH_APPEND_EXPLICIT_TEMPLATE_TYPE_SPEC(T))
{
return 1;
}
template <class T>
struct max_factorial
{
BOOST_STATIC_CONSTANT(unsigned, value = 0);
};
#endif
#ifndef BOOST_NO_INCLASS_MEMBER_INITIALIZATION
template <class T>
const unsigned max_factorial<T>::value;
#endif
} // namespace math
} // namespace boost
#endif // BOOST_MATH_SP_UC_FACTORIALS_HPP
@@ -0,0 +1,9 @@
subroutine graycode65(dat,n,idir)
integer dat(n)
do i=1,n
dat(i)=igray(dat(i),idir)
enddo
return
end subroutine graycode65
@@ -0,0 +1,833 @@
/*=============================================================================
Copyright (c) 2004 Angus Leeming
Copyright (c) 2004 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)
==============================================================================*/
#ifndef BOOST_PHOENIX_STL_CONTAINER_CONTAINER_HPP
#define BOOST_PHOENIX_STL_CONTAINER_CONTAINER_HPP
#include <boost/phoenix/core/limits.hpp>
#include <boost/mpl/and.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/or.hpp>
#include <boost/mpl/void.hpp>
#include <boost/phoenix/stl/container/detail/container.hpp>
#include <boost/phoenix/function/adapt_callable.hpp>
#include <boost/type_traits/is_const.hpp>
namespace boost { namespace phoenix
{
///////////////////////////////////////////////////////////////////////////////
//
// STL container member functions
//
// Lazy functions for STL container member functions
//
// These functions provide a mechanism for the lazy evaluation of the
// public member functions of the STL containers. For an overview of
// what is meant by 'lazy evaluation', see the comments in operators.hpp
// and functions.hpp.
//
// Lazy functions are provided for all of the member functions of the
// following containers:
//
// deque - list - map - multimap - vector.
//
// Indeed, should *your* class have member functions with the same names
// and signatures as those listed below, then it will automatically be
// supported. To summarize, lazy functions are provided for member
// functions:
//
// assign - at - back - begin - capacity - clear - empty - end -
// erase - front - get_allocator - insert - key_comp - max_size -
// pop_back - pop_front - push_back - push_front - rbegin - rend -
// reserve - resize . size - splice - value_comp.
//
// The lazy functions' names are the same as the corresponding member
// function. Sample usage:
//
// "Normal" version "Lazy" version
// ---------------- --------------
// my_vector.at(5) phoenix::at(arg1, 5)
// my_list.size() phoenix::size(arg1)
// my_vector1.swap(my_vector2) phoenix::swap(arg1, arg2)
//
// Notice that member functions with names that clash with a
// function in stl algorithms are absent. This will be provided
// in Phoenix's algorithm module.
//
// No support is provided here for lazy versions of operator+=,
// operator[] etc. Such operators are not specific to STL containers and
// lazy versions can therefore be found in operators.hpp.
//
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
//
// Lazy member function implementaions.
//
// The structs below provide the guts of the implementation. Thereafter,
// the corresponding lazy function itself is simply:
//
// function<stl::assign> const assign = stl::assign();
//
// The structs provide a nested "result" class template whose
// "type" typedef enables the lazy function to ascertain the type
// to be returned when it is invoked.
//
// They also provide operator() member functions with signatures
// corresponding to those of the underlying member function of
// the STL container.
//
///////////////////////////////////////////////////////////////////////////////
namespace stl
{
struct assign
{
template <typename Sig>
struct result;
template <
typename This
, typename C
, typename Arg1
>
struct result<This(C&, Arg1&)>
{
typedef typename add_reference<C>::type type;
};
template <
typename This
, typename C
, typename Arg1
, typename Arg2
>
struct result<This(C&, Arg1, Arg2)>
{
typedef typename add_reference<C>::type type;
};
template <
typename This
, typename C
, typename Arg1
, typename Arg2
, typename Arg3
>
struct result<This(C&, Arg1, Arg2, Arg3)>
{
typedef typename add_reference<C>::type type;
};
template <typename C, typename Arg1>
C& operator()(C& c, Arg1 const & arg1) const
{
c.assign(arg1);
return c;
}
template <typename C, typename Arg1, typename Arg2>
C& operator()(C& c, Arg1 arg1, Arg2 arg2) const
{
c.assign(arg1, arg2);
return c;
}
template <typename C, typename Arg1, typename Arg2, typename Arg3>
C& operator()(
C& c
, Arg1 arg1
, Arg2 arg2
, Arg3 const & arg3
) const
{
return c.assign(arg1, arg2, arg3);
}
};
struct at_impl
{
template <typename Sig>
struct result;
template <typename This, typename C, typename Index>
struct result<This(C&, Index)>
{
//typedef typename const_qualified_reference_of<C>::type type;
typedef typename C::value_type & type;
};
template <typename C, typename Index>
typename result<at_impl(C&, Index const&)>::type
operator()(C& c, Index const &i) const
{
return c.at(i);
}
template <typename This, typename C, typename Index>
struct result<This(C const&, Index)>
{
typedef typename C::value_type const & type;
};
template <typename C, typename Index>
typename result<at_impl(C const&, Index const&)>::type
operator()(C const& c, Index const &i) const
{
return c.at(i);
}
};
struct back
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef
typename const_qualified_reference_of<C>::type
type;
};
template <typename C>
typename result<back(C&)>::type
operator()(C& c) const
{
return c.back();
}
};
struct begin
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename const_qualified_iterator_of<C>::type type;
};
template <typename C>
typename result<begin(C&)>::type
operator()(C& c) const
{
return c.begin();
}
};
struct capacity
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename size_type_of<C>::type type;
};
template <typename C>
typename result<capacity(C&)>::type
operator()(C const& c) const
{
return c.capacity();
}
};
struct clear
{
typedef void result_type;
template <typename C>
void operator()(C& c) const
{
return c.clear();
}
};
struct empty
{
typedef bool result_type;
template <typename C>
bool operator()(C const& c) const
{
return c.empty();
}
};
struct end
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename const_qualified_iterator_of<C>::type type;
};
template <typename C>
typename result<end(C&)>::type
operator()(C& c) const
{
return c.end();
}
};
namespace result_of
{
template <typename C, typename Arg1, typename Arg2 = mpl::void_>
struct erase
{
// BOOST_MSVC #if branch here in map_erase_result non-
// standard behavior. The return type should be void but
// VC7.1 prefers to return iterator_of<C>. As a result,
// VC7.1 complains of error C2562:
// boost::phoenix::stl::erase::operator() 'void' function
// returning a value. Oh well... :*
typedef
boost::mpl::eval_if_c<
boost::is_same<
typename remove_reference<Arg1>::type
, typename iterator_of<C>::type
>::value
#if defined(BOOST_MSVC)// && (BOOST_MSVC <= 1500)
, iterator_of<C>
#else
, boost::mpl::identity<void>
#endif
, size_type_of<C>
>
map_erase_result;
typedef typename
boost::mpl::eval_if_c<
has_mapped_type<C>::value
, map_erase_result
, iterator_of<C>
>::type
type;
};
}
struct erase
{
// This mouthful can differentiate between the generic erase
// functions (Container == std::deque, std::list, std::vector) and
// that specific to the two map-types, std::map and std::multimap.
//
// where C is a std::deque, std::list, std::vector:
//
// 1) iterator C::erase(iterator where);
// 2) iterator C::erase(iterator first, iterator last);
//
// where M is a std::map or std::multimap:
//
// 3) size_type M::erase(const Key& keyval);
// 4) void M::erase(iterator where);
// 5) void M::erase(iterator first, iterator last);
template <typename Sig>
struct result;
template <typename This, typename C, typename Arg1>
struct result<This(C&, Arg1)>
: result_of::erase<C, Arg1>
{};
template <typename This, typename C, typename Arg1, typename Arg2>
struct result<This(C&, Arg1, Arg2)>
: result_of::erase<C, Arg1, Arg2>
{};
template <typename C, typename Arg1>
typename result_of::erase<C, Arg1>::type
operator()(C& c, Arg1 arg1) const
{
typedef typename result_of::erase<C, Arg1>::type result_type;
return static_cast<result_type>(c.erase(arg1));
}
template <typename C, typename Arg1, typename Arg2>
typename result_of::erase<C, Arg1, Arg2>::type
operator()(C& c, Arg1 arg1, Arg2 arg2) const
{
typedef typename result_of::erase<C, Arg1, Arg2>::type result_type;
return static_cast<result_type>(c.erase(arg1, arg2));
}
};
struct front
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename const_qualified_reference_of<C>::type type;
};
template <typename C>
typename result<front(C&)>::type
operator()(C& c) const
{
return c.front();
}
};
struct get_allocator
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename allocator_type_of<C>::type type;
};
template <typename C>
typename result<get_allocator(C const&)>::type
operator()(C& c) const
{
return c.get_allocator();
}
};
namespace result_of
{
template <
typename C
, typename Arg1
, typename Arg2 = mpl::void_
, typename Arg3 = mpl::void_
>
class insert
{
struct pair_iterator_bool
{
typedef typename std::pair<typename C::iterator, bool> type;
};
typedef
boost::mpl::eval_if<
map_insert_returns_pair<typename remove_const<C>::type>
, pair_iterator_bool
, iterator_of<C>
>
choice_1;
typedef
boost::mpl::eval_if_c<
boost::mpl::and_<
boost::is_same<Arg3, mpl::void_>
, boost::mpl::not_<boost::is_same<Arg1, Arg2> >
>::value
, iterator_of<C>
, boost::mpl::identity<void>
>
choice_2;
public:
typedef typename
boost::mpl::eval_if_c<
boost::is_same<Arg2, mpl::void_>::value
, choice_1
, choice_2
>::type
type;
};
}
struct insert
{
// This mouthful can differentiate between the generic insert
// functions (Container == deque, list, vector) and those
// specific to the two map-types, std::map and std::multimap.
//
// where C is a std::deque, std::list, std::vector:
//
// 1) iterator C::insert(iterator where, value_type value);
// 2) void C::insert(
// iterator where, size_type count, value_type value);
// 3) template <typename Iter>
// void C::insert(iterator where, Iter first, Iter last);
//
// where M is a std::map and MM is a std::multimap:
//
// 4) pair<iterator, bool> M::insert(value_type const&);
// 5) iterator MM::insert(value_type const&);
//
// where M is a std::map or std::multimap:
//
// 6) template <typename Iter>
// void M::insert(Iter first, Iter last);
template <typename Sig>
struct result;
template <
typename This
, typename C
, typename Arg1
>
struct result<This(C &, Arg1)>
: result_of::insert<C, Arg1>
{};
template <
typename This
, typename C
, typename Arg1
, typename Arg2
>
struct result<This(C &, Arg1, Arg2)>
: result_of::insert<C, Arg1, Arg2>
{};
template <
typename This
, typename C
, typename Arg1
, typename Arg2
, typename Arg3
>
struct result<This(C &, Arg1, Arg2, Arg3)>
: result_of::insert<C, Arg1, Arg2, Arg3>
{};
template <typename C, typename Arg1>
typename result<insert(C&, Arg1)>::type
operator()(C& c, Arg1 arg1) const
{
return c.insert(arg1);
}
template <typename C, typename Arg1, typename Arg2>
typename result<insert(C&, Arg1, Arg2)>::type
operator()(C& c, Arg1 arg1, Arg2 arg2) const
{
typedef typename result<insert(C&, Arg1, Arg2)>::type result_type;
return static_cast<result_type>(c.insert(arg1, arg2));
}
template <typename C, typename Arg1, typename Arg2, typename Arg3>
typename result<insert(C&, Arg1, Arg2, Arg3)>::type
operator()(C& c, Arg1 arg1, Arg2 arg2, Arg3 arg3) const
{
typedef typename result<insert(C&, Arg1, Arg2, Arg3)>::type result_type;
return static_cast<result_type>(c.insert(arg1, arg2, arg3));
}
};
namespace result_of
{
template <typename C>
struct key_comp
{
typedef typename key_compare_of<C>::type type;
};
}
struct key_comp
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
: result_of::key_comp<C>
{};
template <typename C>
typename result_of::key_comp<C>::type
operator()(C& c) const
{
return c.key_comp();
}
};
struct max_size
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename size_type_of<C>::type type;
};
template <typename C>
typename result<max_size(C const&)>::type
operator()(C& c) const
{
return c.max_size();
}
};
struct pop_back
{
typedef void result_type;
template <typename C>
void operator()(C& c) const
{
return c.pop_back();
}
};
struct pop_front
{
typedef void result_type;
template <typename C>
void operator()(C& c) const
{
return c.pop_front();
}
};
struct push_back
{
typedef void result_type;
template <typename C, typename Arg>
void operator()(C& c, Arg const& data) const
{
return c.push_back(data);
}
};
struct push_front
{
typedef void result_type;
template <typename C, typename Arg>
void operator()(C& c, Arg const& data) const
{
return c.push_front(data);
}
};
struct rbegin
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename
const_qualified_reverse_iterator_of<C>::type
type;
};
template <typename C>
typename result<rbegin(C&)>::type
operator()(C& c) const
{
return c.rbegin();
}
};
struct rend
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename
const_qualified_reverse_iterator_of<C>::type
type;
};
template <typename C>
typename result<rend(C&)>::type
operator()(C& c) const
{
return c.rend();
}
};
struct reserve
{
typedef void result_type;
template <typename C, typename Arg>
void operator()(C& c, Arg const& count) const
{
c.reserve(count);
}
};
struct resize
{
typedef void result_type;
template <typename C, typename Arg1>
void operator()(C& c, Arg1 const& arg1) const
{
c.resize(arg1);
}
template <typename C, typename Arg1, typename Arg2>
void operator()(C& c, Arg1 const& arg1, Arg2 const& arg2) const
{
c.resize(arg1, arg2);
}
};
struct size
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
{
typedef typename size_type_of<C>::type type;
};
template <typename C>
typename result<size(C&)>::type
operator()(C& c) const
{
return c.size();
}
};
struct splice
{
typedef void result_type;
template <typename C, typename Arg1, typename Arg2>
void operator()(C& c, Arg1 arg1, Arg2 &arg2) const
{
c.splice(arg1, arg2);
}
template <
typename C
, typename Arg1
, typename Arg2
, typename Arg3
>
void operator()(
C& c
, Arg1 arg1
, Arg2 & arg2
, Arg3 arg3
) const
{
c.splice(arg1, arg2, arg3);
}
template <
typename C
, typename Arg1
, typename Arg2
, typename Arg3
, typename Arg4
>
void operator()(
C c
, Arg1 arg1
, Arg2 & arg2
, Arg3 arg3
, Arg4 arg4
) const
{
c.splice(arg1, arg2, arg3, arg4);
}
};
namespace result_of
{
template <typename C>
struct value_comp
{
typedef typename value_compare_of<C>::type type;
};
}
struct value_comp
{
template <typename Sig>
struct result;
template <typename This, typename C>
struct result<This(C&)>
: result_of::value_comp<C>
{};
template <typename C>
typename result_of::value_comp<C>::type
operator()(C& c) const
{
return c.value_comp();
}
};
} // namespace stl
///////////////////////////////////////////////////////////////////////////////
//
// The lazy functions themselves.
//
///////////////////////////////////////////////////////////////////////////////
namespace adl_barrier
{
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(assign, boost::phoenix::stl::assign, 4)
BOOST_PHOENIX_ADAPT_CALLABLE(at, ::boost::phoenix::stl::at_impl, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(back, stl::back, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(begin, stl::begin, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(capacity, stl::capacity, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(clear, stl::clear, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(empty, stl::empty, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(end, stl::end, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(erase, stl::erase, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(front, stl::front, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(get_allocator, stl::get_allocator, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(insert, stl::insert, 4)
BOOST_PHOENIX_ADAPT_CALLABLE(key_comp, stl::key_comp, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(max_size, stl::max_size, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(pop_back, stl::pop_back, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(pop_front, stl::pop_front, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(push_back, stl::push_back, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(push_front, stl::push_front, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(rbegin, stl::rbegin, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(rend, stl::rend, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(reserve, stl::reserve, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(resize, stl::resize, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(size, stl::size, 1)
BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 2)
BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 3)
BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 4)
BOOST_PHOENIX_ADAPT_CALLABLE(splice, stl::splice, 5)
BOOST_PHOENIX_ADAPT_CALLABLE(value_comp, stl::value_comp, 1)
}
using namespace phoenix::adl_barrier;
}} // namespace boost::phoenix
#endif // BOOST_PHOENIX_STL_CONTAINERS_HPP
@@ -0,0 +1,117 @@
#-------------------------------------------------
#
# Project created by QtCreator 2011-07-07T08:39:24
#
#-------------------------------------------------
QT += network multimedia
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
CONFIG += thread
#CONFIG += console
TARGET = wsjtx
VERSION = "Not for Release"
TEMPLATE = app
DEFINES = QT5
QMAKE_CXXFLAGS += -std=c++11
DEFINES += PROJECT_MANUAL="'\"http://www.physics.princeton.edu/pulsar/K1JT/wsjtx-doc/wsjtx-main.html\"'"
isEmpty (DESTDIR) {
DESTDIR = ../wsjtx_exp_install
}
isEmpty (HAMLIB_DIR) {
HAMLIB_DIR = ../../hamlib3/mingw32
}
isEmpty (FFTW3_DIR) {
FFTW3_DIR = .
}
F90 = gfortran
gfortran.output = ${QMAKE_FILE_BASE}.o
gfortran.commands = $$F90 -c -O2 -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
gfortran.input = F90_SOURCES
QMAKE_EXTRA_COMPILERS += gfortran
win32 {
DEFINES += WIN32
QT += axcontainer
TYPELIBS = $$system(dumpcpp -getfile {4FE359C5-A58F-459D-BE95-CA559FB4F270})
}
unix {
DEFINES += UNIX
}
#
# Order matters here as the link is in this order so referrers need to be after referred
#
SOURCES += \
logbook/adif.cpp \
logbook/countrydat.cpp \
logbook/countriesworked.cpp \
logbook/logbook.cpp \
astro.cpp Radio.cpp NetworkServerLookup.cpp revision_utils.cpp \
Transceiver.cpp TransceiverBase.cpp TransceiverFactory.cpp \
PollingTransceiver.cpp EmulateSplitTransceiver.cpp LettersSpinBox.cpp \
HRDTransceiver.cpp DXLabSuiteCommanderTransceiver.cpp \
HamlibTransceiver.cpp FrequencyLineEdit.cpp Bands.cpp \
FrequencyList.cpp StationList.cpp ForeignKeyDelegate.cpp \
FrequencyItemDelegate.cpp LiveFrequencyValidator.cpp \
Configuration.cpp psk_reporter.cpp AudioDevice.cpp \
Modulator.cpp Detector.cpp logqso.cpp displaytext.cpp \
getfile.cpp soundout.cpp soundin.cpp meterwidget.cpp signalmeter.cpp \
WFPalette.cpp plotter.cpp widegraph.cpp about.cpp WsprTxScheduler.cpp mainwindow.cpp \
main.cpp decodedtext.cpp wsprnet.cpp messageaveraging.cpp \
echoplot.cpp echograph.cpp fastgraph.cpp fastplot.cpp Modes.cpp \
WSPRBandHopping.cpp MessageAggregator.cpp SampleDownloader.cpp qt_helpers.cpp\
MultiSettings.cpp PhaseEqualizationDialog.cpp
HEADERS += qt_helpers.hpp \
pimpl_h.hpp pimpl_impl.hpp \
Radio.hpp NetworkServerLookup.hpp revision_utils.hpp \
mainwindow.h plotter.h soundin.h soundout.h astro.h \
about.h WFPalette.hpp widegraph.h getfile.h decodedtext.h \
commons.h sleep.h displaytext.h logqso.h LettersSpinBox.hpp \
Bands.hpp FrequencyList.hpp StationList.hpp ForeignKeyDelegate.hpp FrequencyItemDelegate.hpp LiveFrequencyValidator.hpp \
FrequencyLineEdit.hpp AudioDevice.hpp Detector.hpp Modulator.hpp psk_reporter.h \
Transceiver.hpp TransceiverBase.hpp TransceiverFactory.hpp PollingTransceiver.hpp \
EmulateSplitTransceiver.hpp DXLabSuiteCommanderTransceiver.hpp HamlibTransceiver.hpp \
Configuration.hpp wsprnet.h signalmeter.h meterwidget.h \
logbook/logbook.h logbook/countrydat.h logbook/countriesworked.h logbook/adif.h \
messageaveraging.h echoplot.h echograph.h fastgraph.h fastplot.h Modes.hpp WSPRBandHopping.hpp \
WsprTxScheduler.h SampleDownloader.hpp MultiSettings.hpp PhaseEqualizationDialog.hpp
INCLUDEPATH += qmake_only
win32 {
SOURCES += killbyname.cpp OmniRigTransceiver.cpp
HEADERS += OmniRigTransceiver.hpp
}
FORMS += mainwindow.ui about.ui Configuration.ui widegraph.ui astro.ui \
logqso.ui wf_palette_design_dialog.ui messageaveraging.ui echograph.ui \
fastgraph.ui
RC_FILE = wsjtx.rc
RESOURCES = wsjtx.qrc
unix {
LIBS += -L lib -ljt9
LIBS += -lhamlib
LIBS += -lfftw3f $$system($$F90 -print-file-name=libgfortran.so)
}
win32 {
INCLUDEPATH += $${HAMLIB_DIR}/include
INCLUDEPATH += C:\JTSDK\wsjtx_exp\build\Release
INCLUDEPATH += C:\JTSDK\hamlib3\include
INCLUDEPATH += C:\JTSDK\qt5\5.2.1\mingw48_32\include\QtSerialPort
LIBS += -L$${HAMLIB_DIR}/lib -lhamlib
LIBS += -L./lib -lastro -ljt9
LIBS += -L$${FFTW3_DIR} -lfftw3f-3
LIBS += -lws2_32
LIBS += $$system($$F90 -print-file-name=libgfortran.a)
}
@@ -0,0 +1,55 @@
/*
[auto_generated]
boost/numeric/odeint/version.hpp
[begin_description]
Defines the current version of odeint.
[end_description]
Copyright 2011-2012 Karsten Ahnert
Copyright 2011-2012 Mario Mulansky
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_VERSION_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_VERSION_HPP_INCLUDED
#include <string>
#include <sstream>
#define ODEINT_MAJOR_VERSION 2
#define ODEINT_MINOR_VERSION 2
#define ODEINT_PATCH_LEVEL 0
#define ODEINT_VERSION ( ODEINT_MAJOR_VERSION * 100000 + ODEINT_MINOR_VERSION * 100 + ODEINT_PATCH_LEVEL )
namespace boost {
namespace numeric {
namespace odeint {
namespace version {
const int major = ODEINT_MAJOR_VERSION ;
const int minor = ODEINT_MINOR_VERSION ;
const int patch_level = ODEINT_PATCH_LEVEL ;
}
inline std::string get_version_string( void )
{
std::ostringstream str;
str << "v" << version::major << "." << version::minor;
if( version::patch_level != 0 ) str << "_" << version::patch_level;
return str.str();
}
}
}
}
#endif // BOOST_NUMERIC_ODEINT_VERSION_HPP_INCLUDED
@@ -0,0 +1,162 @@
//////////////////////////////////////////////////////////////////////////////
// (C) Copyright John Maddock 2000.
// (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.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP
#define BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_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>
namespace boost {
namespace interprocess {
namespace ipcdetail {
struct nat{};
template<class T>
struct remove_reference
{
typedef T type;
};
template<class T>
struct remove_reference<T&>
{
typedef T type;
};
template<class T>
struct is_reference
{
static const bool value = false;
};
template<class T>
struct is_reference<T&>
{
static const bool value = true;
};
template<class T>
struct is_pointer
{
static const bool value = false;
};
template<class T>
struct is_pointer<T*>
{
static const bool value = true;
};
template <typename T>
struct add_reference
{
typedef T& type;
};
template<class T>
struct add_reference<T&>
{
typedef T& type;
};
template<>
struct add_reference<void>
{
typedef nat &type;
};
template<>
struct add_reference<const void>
{
typedef const nat &type;
};
template <class T>
struct add_const_reference
{ typedef const T &type; };
template <class T>
struct add_const_reference<T&>
{ typedef T& type; };
template<class T>
struct remove_const
{
typedef T type;
};
template<class T>
struct remove_const<const T>
{
typedef T type;
};
template<class T>
struct remove_volatile
{
typedef T type;
};
template<class T>
struct remove_volatile<volatile T>
{
typedef T type;
};
template<class T>
struct remove_const_volatile
{
typedef typename remove_const<typename remove_volatile<T>::type>::type type;
};
template <typename T, typename U>
struct is_same
{
typedef char yes_type;
struct no_type
{
char padding[8];
};
template <typename V>
static yes_type is_same_tester(V*, V*);
static no_type is_same_tester(...);
static T *t;
static U *u;
static const bool value = sizeof(yes_type) == sizeof(is_same_tester(t,u));
};
template<class T, class U>
struct is_cv_same
{
static const bool value = is_same< typename remove_const_volatile<T>::type
, typename remove_const_volatile<U>::type >::value;
};
} // namespace ipcdetail
} //namespace interprocess {
} //namespace boost {
#include <boost/interprocess/detail/config_end.hpp>
#endif //#ifndef BOOST_INTERPROCESS_DETAIL_TYPE_TRAITS_HPP
@@ -0,0 +1,118 @@
# /* Copyright (C) 2001
# * Housemarque Oy
# * http://www.housemarque.com
# *
# * Distributed under the Boost Software License, Version 1.0. (See
# * accompanying file LICENSE_1_0.txt or copy at
# * http://www.boost.org/LICENSE_1_0.txt)
# */
#
# /* Revised by Paul Mensonides (2002-2011) */
# /* Revised by Edward Diener (2011) */
#
# /* See http://www.boost.org for most recent version. */
#
# ifndef BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
# define BOOST_PREPROCESSOR_TUPLE_TO_LIST_HPP
#
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/facilities/overload.hpp>
# include <boost/preprocessor/tuple/size.hpp>
# include <boost/preprocessor/variadic/size.hpp>
#
# /* BOOST_PP_TUPLE_TO_LIST */
#
# if BOOST_PP_VARIADICS
# if BOOST_PP_VARIADICS_MSVC
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_TUPLE_TO_LIST_I(BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__), (__VA_ARGS__))
# define BOOST_PP_TUPLE_TO_LIST_I(m, args) BOOST_PP_TUPLE_TO_LIST_II(m, args)
# define BOOST_PP_TUPLE_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_TUPLE_SIZE(tuple)) tuple
# else
# define BOOST_PP_TUPLE_TO_LIST(...) BOOST_PP_OVERLOAD(BOOST_PP_TUPLE_TO_LIST_O_, __VA_ARGS__)(__VA_ARGS__)
# define BOOST_PP_TUPLE_TO_LIST_O_1(tuple) BOOST_PP_CAT(BOOST_PP_TUPLE_TO_LIST_, BOOST_PP_VARIADIC_SIZE tuple) tuple
# endif
# define BOOST_PP_TUPLE_TO_LIST_O_2(size, tuple) BOOST_PP_TUPLE_TO_LIST_O_1(tuple)
# else
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_I(size, tuple)
# if ~BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s t
# else
# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_II(BOOST_PP_TUPLE_TO_LIST_ ## s t)
# define BOOST_PP_TUPLE_TO_LIST_II(res) res
# endif
# else
# define BOOST_PP_TUPLE_TO_LIST(size, tuple) BOOST_PP_TUPLE_TO_LIST_OO((size, tuple))
# define BOOST_PP_TUPLE_TO_LIST_OO(par) BOOST_PP_TUPLE_TO_LIST_I ## par
# define BOOST_PP_TUPLE_TO_LIST_I(s, t) BOOST_PP_TUPLE_TO_LIST_ ## s ## t
# endif
# endif
#
# define BOOST_PP_TUPLE_TO_LIST_1(e0) (e0, BOOST_PP_NIL)
# define BOOST_PP_TUPLE_TO_LIST_2(e0, e1) (e0, (e1, BOOST_PP_NIL))
# define BOOST_PP_TUPLE_TO_LIST_3(e0, e1, e2) (e0, (e1, (e2, BOOST_PP_NIL)))
# define BOOST_PP_TUPLE_TO_LIST_4(e0, e1, e2, e3) (e0, (e1, (e2, (e3, BOOST_PP_NIL))))
# define BOOST_PP_TUPLE_TO_LIST_5(e0, e1, e2, e3, e4) (e0, (e1, (e2, (e3, (e4, BOOST_PP_NIL)))))
# define BOOST_PP_TUPLE_TO_LIST_6(e0, e1, e2, e3, e4, e5) (e0, (e1, (e2, (e3, (e4, (e5, BOOST_PP_NIL))))))
# define BOOST_PP_TUPLE_TO_LIST_7(e0, e1, e2, e3, e4, e5, e6) (e0, (e1, (e2, (e3, (e4, (e5, (e6, BOOST_PP_NIL)))))))
# define BOOST_PP_TUPLE_TO_LIST_8(e0, e1, e2, e3, e4, e5, e6, e7) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, BOOST_PP_NIL))))))))
# define BOOST_PP_TUPLE_TO_LIST_9(e0, e1, e2, e3, e4, e5, e6, e7, e8) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, BOOST_PP_NIL)))))))))
# define BOOST_PP_TUPLE_TO_LIST_10(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, BOOST_PP_NIL))))))))))
# define BOOST_PP_TUPLE_TO_LIST_11(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, BOOST_PP_NIL)))))))))))
# define BOOST_PP_TUPLE_TO_LIST_12(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11) (e0, (e1, (e2, (e3, (e4, (e5, (e6, (e7, (e8, (e9, (e10, (e11, BOOST_PP_NIL))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_13(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, BOOST_PP_NIL)))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_14(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, BOOST_PP_NIL))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_15(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, BOOST_PP_NIL)))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_16(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, BOOST_PP_NIL))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_17(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, BOOST_PP_NIL)))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_18(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, BOOST_PP_NIL))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_19(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, BOOST_PP_NIL)))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_20(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, BOOST_PP_NIL))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_21(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, BOOST_PP_NIL)))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_22(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, BOOST_PP_NIL))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_23(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, BOOST_PP_NIL)))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_24(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, BOOST_PP_NIL))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, 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, BOOST_PP_NIL)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
# define BOOST_PP_TUPLE_TO_LIST_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, e63) (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, (e63, BOOST_PP_NIL))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))
#
# endif
@@ -0,0 +1,75 @@
#if !defined(BOOST_PROTO_DONT_USE_PREPROCESSED_FILES)
#include <boost/proto/detail/preprocessed/make_expr.hpp>
#elif !defined(BOOST_PP_IS_ITERATING)
#if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 2, line: 0, output: "preprocessed/make_expr.hpp")
#endif
///////////////////////////////////////////////////////////////////////////////
/// \file make_expr.hpp
/// Contains overloads of make_expr() free function.
//
// Copyright 2008 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(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
#pragma wave option(preserve: 1)
#endif
#define BOOST_PP_ITERATION_PARAMS_1 \
(3, (2, BOOST_PROTO_MAX_ARITY, <boost/proto/detail/make_expr.hpp>))
#include BOOST_PP_ITERATE()
#if defined(__WAVE__) && defined(BOOST_PROTO_CREATE_PREPROCESSED_FILES)
#pragma wave option(output: null)
#endif
#else // BOOST_PP_IS_ITERATING
#define N BOOST_PP_ITERATION()
/// \overload
///
template<typename Tag BOOST_PP_ENUM_TRAILING_PARAMS(N, typename A)>
BOOST_FORCEINLINE
typename lazy_disable_if<
is_domain<A0>
, result_of::make_expr<
Tag
BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
>
>::type const
make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const A, &a))
{
return proto::detail::make_expr_<
Tag
, deduce_domain
BOOST_PP_ENUM_TRAILING_PARAMS(N, const A)
>()(BOOST_PP_ENUM_PARAMS(N, a));
}
/// \overload
///
template<typename Tag, typename Domain BOOST_PP_ENUM_TRAILING_PARAMS(N, typename C)>
BOOST_FORCEINLINE
typename result_of::make_expr<
Tag
, Domain
BOOST_PP_ENUM_TRAILING_PARAMS(N, const C)
>::type const
make_expr(BOOST_PP_ENUM_BINARY_PARAMS(N, const C, &c))
{
return proto::detail::make_expr_<
Tag
, Domain
BOOST_PP_ENUM_TRAILING_PARAMS(N, const C)
>()(BOOST_PP_ENUM_PARAMS(N, c));
}
#undef N
#endif
@@ -0,0 +1,22 @@
subroutine pctile(x,npts,npct,xpct)
parameter (NMAX=100000)
real*4 x(npts)
real*4 tmp(NMAX)
if(npts.le.0) then
xpct=1.0
go to 900
endif
if(npts.gt.NMAX) stop
tmp(1:npts)=x
call shell(npts,tmp)
j=nint(npts*0.01*npct)
if(j.lt.1) j=1
if(j.gt.npts) j=npts
xpct=tmp(j)
900 continue
return
end subroutine pctile
@@ -0,0 +1,98 @@
For this step and the next, you may want to pretend you are K1JT
by entering that callsign temporarily as *My Call* on the
*Settings | General* tab. Your results should then be identical to
those shown in the screen shot below.
.Open a Wave File:
- Select *File | Open* and select the file
+...\save\samples\JT9\130418_1742.wav+. When the file opens you should
see something similar to the following screen shot:
[[X12]]
image::main-ui.png[align="center",alt="Main UI and Wide Graph"]
.Decoding Overview
Decoding takes place at the end of a receive sequence and proceeds in
two steps. The first decode is done at the selected Rx frequency,
indicated by the U-shaped green marker on the waterfall scale.
Results appear in both the left (*Band Activity*) and right (*Rx
Frequency*) text windows on the main screen. The program then finds
and decodes all signals in the selected mode over the displayed
frequency range. The red marker on the waterfall scale indicates your
Tx frequency.
Seven JT9 signals are present in the example file, all decodable.
When this file was recorded KF4RWA was finishing a QSO with K1JT.
Since the green marker was placed at his audio frequency, 1224 Hz, his
message `K1JT KF4RWA 73` is decoded first and appears in the *Rx
Frequency* window. The *Band Activity* window shows this message plus
all decodes at other frequencies. By default lines containing `CQ`
are highlighted in green, and lines with *My Call* (in this case K1JT)
in red.
[[X13]]
.Decoding Controls
To gain some feeling for controls frequently used when making QSOs,
try clicking with the mouse on the decoded text lines and on the
waterfall spectral display. You should be able to confirm the
following behavior:
- Double-click on either of the decoded lines highlighted in
green. This action produces the following results:
** Callsign and locator of a station calling CQ are copied to the *DX
Call* and *DX Grid* entry fields.
** Messages are generated for a standard minimal QSO.
** The *Tx even* box is checked or cleared appropriately, so that you
will transmit in the proper (odd or even) minutes.
** The Rx and Tx frequency markers are moved to the frequency of the
CQing station.
** The *Gen Msg* ("`generated message`") radio button at bottom right
of the main window is selected.
** If you had checked *Double-click on call sets Tx Enable* on the
*Setup* menu, *Enable Tx* would be activated and a transmission would
start automatically at the proper time.
- Double-click on the decoded message `K1JT N5KDV EM41`,
highlighted in red. Results will be similar to those in the
previous step, except the Tx frequency (red marker) is not
moved. Such messages are usually in response to your own CQ, or from
a tail-ender, and you probably want your Tx frequency to stay where it
was.
- By holding down the *Ctrl* key when double-clicking on a decoded
line you can cause both Tx and Rx frequencies to be moved. This
behavior can also be forced by checking *Lock Tx=Rx*.
- Double-click on the message from KF4RWA in either window. He is
sending `73` to K1JT, signifying that the QSO is over. Most likely
you want to send 73 to him, so the message `KF4RWA K1JT 73` is
automatically generated and selected for your next transmission.
(Alternatively, you might choose to send a free-text message or to
call CQ again.)
- Click somewhere on the waterfall to set Rx frequency (green marker
on waterfall scale).
- Shift-click on the waterfall to set Tx frequency (red marker).
- Ctrl-click on the waterfall to set both Rx and Tx frequencies.
- Double-click on a signal in the waterfall to set Rx frequency and
start a narrow-band decode there. Decoded text will appear in the
right window only.
- Ctrl-double-click on a signal to set both Rx and Tx frequencies and
decode at the new frequency.
- Click *Erase* to clear the right window.
- Double-click *Erase* to clear both text windows.
@@ -0,0 +1,444 @@
/*==============================================================================
Copyright (c) 2001-2010 Joel de Guzman
Copyright (c) 2010 Thomas Heller
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)
==============================================================================*/
namespace detail {
template <typename Object, typename MemPtr>
struct mem_fun_ptr_gen
{
mem_fun_ptr_gen(Object const& obj_, MemPtr ptr_)
: obj(obj_)
, ptr(ptr_)
{}
typename phoenix::expression::mem_fun_ptr<Object, MemPtr>::type const
operator()() const
{
return phoenix::expression::mem_fun_ptr<Object, MemPtr>::make(obj, ptr);
}
template <typename A0>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0
>::type const
operator()(A0 const& a0) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0
>::make(obj, ptr, a0);
}
template <typename A0 , typename A1>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1
>::type const
operator()(A0 const& a0 , A1 const& a1) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1
>::make(obj, ptr, a0 , a1);
}
template <typename A0 , typename A1 , typename A2>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2
>::make(obj, ptr, a0 , a1 , a2);
}
template <typename A0 , typename A1 , typename A2 , typename A3>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3
>::make(obj, ptr, a0 , a1 , a2 , a3);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17);
}
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18>
typename phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
>::type const
operator()(A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18) const
{
return phoenix::expression::mem_fun_ptr<
Object
, MemPtr
, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18
>::make(obj, ptr, a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9 , a10 , a11 , a12 , a13 , a14 , a15 , a16 , a17 , a18);
}
Object const& obj;
MemPtr ptr;
};
struct make_mem_fun_ptr_gen
: proto::callable
{
template<typename Sig>
struct result;
template<typename This, typename Object, typename MemPtr>
struct result<This(Object, MemPtr)>
{
typedef
mem_fun_ptr_gen<
typename remove_const<typename remove_reference<Object>::type>::type
, typename remove_const<typename remove_reference<MemPtr>::type>::type
>
type;
};
template<typename Object, typename MemPtr>
mem_fun_ptr_gen<Object, MemPtr> operator()(Object const & obj, MemPtr ptr) const
{
return mem_fun_ptr_gen<Object, MemPtr>(obj, ptr);
}
};
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 538 KiB

@@ -0,0 +1,38 @@
#ifndef GREG_DAY_OF_YEAR_HPP___
#define GREG_DAY_OF_YEAR_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland
* $Date$
*/
#include "boost/date_time/constrained_value.hpp"
#include <stdexcept>
#include <string>
namespace boost {
namespace gregorian {
//! Exception type for day of year (1..366)
struct bad_day_of_year : public std::out_of_range
{
bad_day_of_year() :
std::out_of_range(std::string("Day of year value is out of range 1..366"))
{}
};
//! A day of the year range (1..366)
typedef CV::simple_exception_policy<unsigned short,1,366,bad_day_of_year> greg_day_of_year_policies;
//! Define a range representation type for the day of the year 1..366
typedef CV::constrained_value<greg_day_of_year_policies> greg_day_of_year_rep;
} } //namespace gregorian
#endif
@@ -0,0 +1,132 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef INHERITANCE_DWA200216_HPP
# define INHERITANCE_DWA200216_HPP
# include <boost/python/type_id.hpp>
# include <boost/shared_ptr.hpp>
# include <boost/mpl/if.hpp>
# include <boost/type_traits/is_polymorphic.hpp>
# include <boost/type_traits/is_base_and_derived.hpp>
# include <boost/detail/workaround.hpp>
namespace boost { namespace python { namespace objects {
typedef type_info class_id;
using python::type_id;
// Types used to get address and id of most derived type
typedef std::pair<void*,class_id> dynamic_id_t;
typedef dynamic_id_t (*dynamic_id_function)(void*);
BOOST_PYTHON_DECL void register_dynamic_id_aux(
class_id static_id, dynamic_id_function get_dynamic_id);
BOOST_PYTHON_DECL void add_cast(
class_id src_t, class_id dst_t, void* (*cast)(void*), bool is_downcast);
//
// a generator with an execute() function which, given a source type
// and a pointer to an object of that type, returns its most-derived
// /reachable/ type identifier and object pointer.
//
// first, the case where T has virtual functions
template <class T>
struct polymorphic_id_generator
{
static dynamic_id_t execute(void* p_)
{
T* p = static_cast<T*>(p_);
return std::make_pair(dynamic_cast<void*>(p), class_id(typeid(*p)));
}
};
// now, the non-polymorphic case.
template <class T>
struct non_polymorphic_id_generator
{
static dynamic_id_t execute(void* p_)
{
return std::make_pair(p_, python::type_id<T>());
}
};
// Now the generalized selector
template <class T>
struct dynamic_id_generator
: mpl::if_<
boost::is_polymorphic<T>
, boost::python::objects::polymorphic_id_generator<T>
, boost::python::objects::non_polymorphic_id_generator<T>
>
{};
// Register the dynamic id function for T with the type-conversion
// system.
template <class T>
void register_dynamic_id(T* = 0)
{
typedef typename dynamic_id_generator<T>::type generator;
register_dynamic_id_aux(
python::type_id<T>(), &generator::execute);
}
//
// a generator with an execute() function which, given a void*
// pointing to an object of type Source will attempt to convert it to
// an object of type Target.
//
template <class Source, class Target>
struct dynamic_cast_generator
{
static void* execute(void* source)
{
return dynamic_cast<Target*>(
static_cast<Source*>(source));
}
};
template <class Source, class Target>
struct implicit_cast_generator
{
static void* execute(void* source)
{
Target* result = static_cast<Source*>(source);
return result;
}
};
template <class Source, class Target>
struct cast_generator
: mpl::if_<
is_base_and_derived<Target,Source>
, implicit_cast_generator<Source,Target>
, dynamic_cast_generator<Source,Target>
>
{
};
template <class Source, class Target>
inline void register_conversion(
bool is_downcast = ::boost::is_base_and_derived<Source,Target>::value
// These parameters shouldn't be used; they're an MSVC bug workaround
, Source* = 0, Target* = 0)
{
typedef typename cast_generator<Source,Target>::type generator;
add_cast(
python::type_id<Source>()
, python::type_id<Target>()
, &generator::execute
, is_downcast
);
}
}}} // namespace boost::python::object
#endif // INHERITANCE_DWA200216_HPP
@@ -0,0 +1,296 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Olaf Krzikalla 2004-2006.
// (C) Copyright Ion Gaztanaga 2006-2013
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTRUSIVE_SET_HOOK_HPP
#define BOOST_INTRUSIVE_SET_HOOK_HPP
#include <boost/intrusive/detail/config_begin.hpp>
#include <boost/intrusive/intrusive_fwd.hpp>
#include <boost/intrusive/detail/rbtree_node.hpp>
#include <boost/intrusive/rbtree_algorithms.hpp>
#include <boost/intrusive/options.hpp>
#include <boost/intrusive/detail/generic_hook.hpp>
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
namespace boost {
namespace intrusive {
//! Helper metafunction to define a \c set_base_hook that yields to the same
//! type when the same options (either explicitly or implicitly) are used.
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class ...Options>
#else
template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
#endif
struct make_set_base_hook
{
/// @cond
typedef typename pack_options
< hook_defaults,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4
#else
Options...
#endif
>::type packed_options;
typedef generic_hook
< RbTreeAlgorithms
, rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, typename packed_options::tag
, packed_options::link_mode
, RbTreeBaseHookId
> implementation_defined;
/// @endcond
typedef implementation_defined type;
};
//! Derive a class from set_base_hook in order to store objects in
//! in a set/multiset. set_base_hook holds the data necessary to maintain
//! the set/multiset and provides an appropriate value_traits class for set/multiset.
//!
//! The hook admits the following options: \c tag<>, \c void_pointer<>,
//! \c link_mode<> and \c optimize_size<>.
//!
//! \c tag<> defines a tag to identify the node.
//! The same tag value can be used in different classes, but if a class is
//! derived from more than one \c list_base_hook, then each \c list_base_hook needs its
//! unique tag.
//!
//! \c void_pointer<> is the pointer type that will be used internally in the hook
//! and the container configured to use this hook.
//!
//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
//! \c auto_unlink or \c safe_link).
//!
//! \c optimize_size<> will tell the hook to optimize the hook for size instead
//! of speed.
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class ...Options>
#else
template<class O1, class O2, class O3, class O4>
#endif
class set_base_hook
: public make_set_base_hook<
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4
#else
Options...
#endif
>::type
{
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
public:
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
//! initializes the node to an unlinked state.
//!
//! <b>Throws</b>: Nothing.
set_base_hook();
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
//! initializes the node to an unlinked state. The argument is ignored.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Rationale</b>: Providing a copy-constructor
//! makes classes using the hook STL-compliant without forcing the
//! user to do some additional work. \c swap can be used to emulate
//! move-semantics.
set_base_hook(const set_base_hook& );
//! <b>Effects</b>: Empty function. The argument is ignored.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Rationale</b>: Providing an assignment operator
//! makes classes using the hook STL-compliant without forcing the
//! user to do some additional work. \c swap can be used to emulate
//! move-semantics.
set_base_hook& operator=(const set_base_hook& );
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
//! object is stored in a set an assertion is raised. If link_mode is
//! \c auto_unlink and \c is_linked() is true, the node is unlinked.
//!
//! <b>Throws</b>: Nothing.
~set_base_hook();
//! <b>Effects</b>: Swapping two nodes swaps the position of the elements
//! related to those nodes in one or two containers. That is, if the node
//! this is part of the element e1, the node x is part of the element e2
//! and both elements are included in the containers s1 and s2, then after
//! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
//! at the position of e1. If one element is not in a container, then
//! after the swap-operation the other element is not in a container.
//! Iterators to e1 and e2 related to those nodes are invalidated.
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
void swap_nodes(set_base_hook &other);
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
//!
//! <b>Returns</b>: true, if the node belongs to a container, false
//! otherwise. This function can be used to test whether \c set::iterator_to
//! will return a valid iterator.
//!
//! <b>Complexity</b>: Constant
bool is_linked() const;
//! <b>Effects</b>: Removes the node if it's inserted in a container.
//! This function is only allowed if link_mode is \c auto_unlink.
//!
//! <b>Throws</b>: Nothing.
void unlink();
#endif
};
//! Helper metafunction to define a \c set_member_hook that yields to the same
//! type when the same options (either explicitly or implicitly) are used.
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class ...Options>
#else
template<class O1 = void, class O2 = void, class O3 = void, class O4 = void>
#endif
struct make_set_member_hook
{
/// @cond
typedef typename pack_options
< hook_defaults,
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4
#else
Options...
#endif
>::type packed_options;
typedef generic_hook
< RbTreeAlgorithms
, rbtree_node_traits<typename packed_options::void_pointer, packed_options::optimize_size>
, member_tag
, packed_options::link_mode
, NoBaseHookId
> implementation_defined;
/// @endcond
typedef implementation_defined type;
};
//! Put a public data member set_member_hook in order to store objects of this class in
//! a set/multiset. set_member_hook holds the data necessary for maintaining the
//! set/multiset and provides an appropriate value_traits class for set/multiset.
//!
//! The hook admits the following options: \c void_pointer<>,
//! \c link_mode<> and \c optimize_size<>.
//!
//! \c void_pointer<> is the pointer type that will be used internally in the hook
//! and the container configured to use this hook.
//!
//! \c link_mode<> will specify the linking mode of the hook (\c normal_link,
//! \c auto_unlink or \c safe_link).
//!
//! \c optimize_size<> will tell the hook to optimize the hook for size instead
//! of speed.
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED) || defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
template<class ...Options>
#else
template<class O1, class O2, class O3, class O4>
#endif
class set_member_hook
: public make_set_member_hook<
#if !defined(BOOST_INTRUSIVE_VARIADIC_TEMPLATES)
O1, O2, O3, O4
#else
Options...
#endif
>::type
{
#if defined(BOOST_INTRUSIVE_DOXYGEN_INVOKED)
public:
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
//! initializes the node to an unlinked state.
//!
//! <b>Throws</b>: Nothing.
set_member_hook();
//! <b>Effects</b>: If link_mode is \c auto_unlink or \c safe_link
//! initializes the node to an unlinked state. The argument is ignored.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Rationale</b>: Providing a copy-constructor
//! makes classes using the hook STL-compliant without forcing the
//! user to do some additional work. \c swap can be used to emulate
//! move-semantics.
set_member_hook(const set_member_hook& );
//! <b>Effects</b>: Empty function. The argument is ignored.
//!
//! <b>Throws</b>: Nothing.
//!
//! <b>Rationale</b>: Providing an assignment operator
//! makes classes using the hook STL-compliant without forcing the
//! user to do some additional work. \c swap can be used to emulate
//! move-semantics.
set_member_hook& operator=(const set_member_hook& );
//! <b>Effects</b>: If link_mode is \c normal_link, the destructor does
//! nothing (ie. no code is generated). If link_mode is \c safe_link and the
//! object is stored in a set an assertion is raised. If link_mode is
//! \c auto_unlink and \c is_linked() is true, the node is unlinked.
//!
//! <b>Throws</b>: Nothing.
~set_member_hook();
//! <b>Effects</b>: Swapping two nodes swaps the position of the elements
//! related to those nodes in one or two containers. That is, if the node
//! this is part of the element e1, the node x is part of the element e2
//! and both elements are included in the containers s1 and s2, then after
//! the swap-operation e1 is in s2 at the position of e2 and e2 is in s1
//! at the position of e1. If one element is not in a container, then
//! after the swap-operation the other element is not in a container.
//! Iterators to e1 and e2 related to those nodes are invalidated.
//!
//! <b>Complexity</b>: Constant
//!
//! <b>Throws</b>: Nothing.
void swap_nodes(set_member_hook &other);
//! <b>Precondition</b>: link_mode must be \c safe_link or \c auto_unlink.
//!
//! <b>Returns</b>: true, if the node belongs to a container, false
//! otherwise. This function can be used to test whether \c set::iterator_to
//! will return a valid iterator.
//!
//! <b>Complexity</b>: Constant
bool is_linked() const;
//! <b>Effects</b>: Removes the node if it's inserted in a container.
//! This function is only allowed if link_mode is \c auto_unlink.
//!
//! <b>Throws</b>: Nothing.
void unlink();
#endif
};
} //namespace intrusive
} //namespace boost
#include <boost/intrusive/detail/config_end.hpp>
#endif //BOOST_INTRUSIVE_SET_HOOK_HPP
@@ -0,0 +1,241 @@
#include "displaytext.h"
#include <QMouseEvent>
#include <QDateTime>
#include <QTextCharFormat>
#include <QTextCursor>
#include <QTextBlock>
#include <QMenu>
#include <QAction>
#include "qt_helpers.hpp"
#include "moc_displaytext.cpp"
DisplayText::DisplayText(QWidget *parent)
: QTextEdit(parent)
, erase_action_ {new QAction {tr ("&Erase"), this}}
{
setReadOnly (true);
viewport ()->setCursor (Qt::ArrowCursor);
setWordWrapMode (QTextOption::NoWrap);
// max lines to limit heap usage
document ()->setMaximumBlockCount (5000);
// context menu erase action
setContextMenuPolicy (Qt::CustomContextMenu);
connect (this, &DisplayText::customContextMenuRequested, [this] (QPoint const& position) {
auto * menu = createStandardContextMenu (position);
menu->addAction (erase_action_);
menu->exec (mapToGlobal (position));
delete menu;
});
connect (erase_action_, &QAction::triggered, this, &DisplayText::erase);
}
void DisplayText::erase ()
{
clear ();
Q_EMIT erased ();
}
void DisplayText::setContentFont(QFont const& font)
{
char_font_ = font;
selectAll ();
auto cursor = textCursor ();
cursor.beginEditBlock ();
auto char_format = cursor.charFormat ();
char_format.setFont (char_font_);
cursor.mergeCharFormat (char_format);
cursor.clearSelection ();
cursor.movePosition (QTextCursor::End);
// position so viewport scrolled to left
cursor.movePosition (QTextCursor::Up);
cursor.movePosition (QTextCursor::StartOfLine);
cursor.endEditBlock ();
setTextCursor (cursor);
ensureCursorVisible ();
}
void DisplayText::mouseDoubleClickEvent(QMouseEvent *e)
{
bool ctrl = (e->modifiers() & Qt::ControlModifier);
bool alt = (e->modifiers() & Qt::AltModifier);
emit(selectCallsign(alt,ctrl));
QTextEdit::mouseDoubleClickEvent(e);
}
void DisplayText::insertLineSpacer(QString const& line)
{
appendText (line, "#d3d3d3");
}
void DisplayText::appendText(QString const& text, QColor bg)
{
auto cursor = textCursor ();
cursor.movePosition (QTextCursor::End);
auto block_format = cursor.blockFormat ();
block_format.setBackground (bg);
if (0 == cursor.position ())
{
cursor.setBlockFormat (block_format);
auto char_format = cursor.charFormat ();
char_format.setFont (char_font_);
cursor.setCharFormat (char_format);
}
else
{
cursor.insertBlock (block_format);
}
cursor.insertText (text);
// position so viewport scrolled to left
cursor.movePosition (QTextCursor::StartOfLine);
setTextCursor (cursor);
ensureCursorVisible ();
document ()->setMaximumBlockCount (document ()->maximumBlockCount ());
}
QString DisplayText::appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg,
LogBook const& logBook, QColor color_CQ,
QColor color_DXCC,
QColor color_NewCall)
{
// allow for seconds
int padding {message.indexOf (" ") > 4 ? 2 : 0};
QString call = callsign;
QString countryName;
bool callWorkedBefore;
bool countryWorkedBefore;
if(call.length()==2) {
int i0=message.indexOf("CQ "+call);
call=message.mid(i0+6,-1);
i0=call.indexOf(" ");
call=call.mid(0,i0);
}
if(call.length()<3) return message;
if(!call.contains(QRegExp("[0-9]|[A-Z]"))) return message;
logBook.match(/*in*/call,/*out*/countryName,callWorkedBefore,countryWorkedBefore);
message = message.trimmed ();
QString appendage;
if (!countryWorkedBefore) // therefore not worked call either
{
appendage += "!";
*bg = color_DXCC;
}
else
{
if (!callWorkedBefore) // but have worked the country
{
appendage += "~";
*bg = color_NewCall;
}
else
{
appendage += " "; // have worked this call before
*bg = color_CQ;
}
}
// do some obvious abbreviations
countryName.replace ("Islands", "Is.");
countryName.replace ("Island", "Is.");
countryName.replace ("North ", "N. ");
countryName.replace ("Northern ", "N. ");
countryName.replace ("South ", "S. ");
countryName.replace ("East ", "E. ");
countryName.replace ("Eastern ", "E. ");
countryName.replace ("West ", "W. ");
countryName.replace ("Western ", "W. ");
countryName.replace ("Central ", "C. ");
countryName.replace (" and ", " & ");
countryName.replace ("Republic", "Rep.");
countryName.replace ("United States", "U.S.A.");
countryName.replace ("Fed. Rep. of ", "");
countryName.replace ("French ", "Fr.");
countryName.replace ("Asiatic", "AS");
countryName.replace ("European", "EU");
countryName.replace ("African", "AF");
appendage += countryName;
// use a nbsp to save the start of appended text so we can find
// it again later, align appended data at a fixed column if
// there is space otherwise let it float to the right
int space_count {40 + padding - message.size ()};
if (space_count > 0)
{
message += QString {space_count, QChar {' '}};
}
message += QChar::Nbsp + appendage;
return message;
}
void DisplayText::displayDecodedText(DecodedText const& decodedText, QString const& myCall,
bool displayDXCCEntity, LogBook const& logBook,
QColor color_CQ, QColor color_MyCall,
QColor color_DXCC, QColor color_NewCall)
{
QColor bg {Qt::white};
bool CQcall = false;
if (decodedText.string ().contains (" CQ ")
|| decodedText.string ().contains (" CQDX ")
|| decodedText.string ().contains (" QRZ "))
{
CQcall = true;
bg = color_CQ;
}
if (myCall != "" and (
decodedText.indexOf (" " + myCall + " ") >= 0
or decodedText.indexOf (" " + myCall + "/") >= 0
or decodedText.indexOf ("/" + myCall + " ") >= 0
or decodedText.indexOf ("<" + myCall + " ") >= 0
or decodedText.indexOf (" " + myCall + ">") >= 0)) {
bg = color_MyCall;
}
auto message = decodedText.string ();
message = message.left (message.indexOf (QChar::Nbsp)); // strip appended info
if (displayDXCCEntity && CQcall)
// if enabled add the DXCC entity and B4 status to the end of the
// preformated text line t1
message = appendDXCCWorkedB4 (message, decodedText.CQersCall (), &bg, logBook, color_CQ,
color_DXCC, color_NewCall);
appendText (message.trimmed (), bg);
}
void DisplayText::displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
QColor color_TxMsg, bool bFastMode)
{
QString t1=" @ ";
if(modeTx=="FT8") t1=" ~ ";
if(modeTx=="JT4") t1=" $ ";
if(modeTx=="JT65") t1=" # ";
if(modeTx=="MSK144") t1=" & ";
QString t2;
t2.sprintf("%4d",txFreq);
QString t;
if(bFastMode or modeTx=="FT8") {
t = QDateTime::currentDateTimeUtc().toString("hhmmss") + \
" Tx " + t2 + t1 + text;
} else {
t = QDateTime::currentDateTimeUtc().toString("hhmm") + \
" Tx " + t2 + t1 + text;
}
appendText (t, color_TxMsg);
}
void DisplayText::displayQSY(QString text)
{
QString t = QDateTime::currentDateTimeUtc().toString("hhmmss") + " " + text;
appendText (t, "hotpink");
}
@@ -0,0 +1,175 @@
#ifndef BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
#define BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-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$
#if !defined(BOOST_MPL_PREPROCESSING_MODE)
# include <boost/mpl/lambda_fwd.hpp>
# include <boost/mpl/int.hpp>
# include <boost/mpl/bool.hpp>
# include <boost/mpl/aux_/na.hpp>
# include <boost/mpl/aux_/arity.hpp>
# include <boost/mpl/aux_/template_arity_fwd.hpp>
#endif
#include <boost/mpl/aux_/preprocessor/params.hpp>
#include <boost/mpl/aux_/preprocessor/enum.hpp>
#include <boost/mpl/aux_/preprocessor/def_params_tail.hpp>
#include <boost/mpl/aux_/lambda_arity_param.hpp>
#include <boost/mpl/aux_/config/dtp.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
#include <boost/mpl/aux_/nttp_decl.hpp>
#include <boost/mpl/aux_/config/ttp.hpp>
#include <boost/mpl/aux_/config/lambda.hpp>
#include <boost/mpl/aux_/config/overload_resolution.hpp>
#define BOOST_MPL_AUX_NA_PARAMS(i) \
BOOST_MPL_PP_ENUM(i, na) \
/**/
#if defined(BOOST_MPL_CFG_BROKEN_DEFAULT_PARAMETERS_IN_NESTED_TEMPLATES)
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
namespace aux { \
template< BOOST_MPL_AUX_NTTP_DECL(int, N) > \
struct arity< \
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
, N \
> \
: int_< BOOST_MPL_LIMIT_METAFUNCTION_ARITY > \
{ \
}; \
} \
/**/
#else
# define BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) /**/
#endif
#define BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
template<> \
struct name< BOOST_MPL_AUX_NA_PARAMS(i) > \
{ \
template< \
BOOST_MPL_PP_PARAMS(i, typename T) \
BOOST_MPL_PP_NESTED_DEF_PARAMS_TAIL(i, typename T, na) \
> \
struct apply \
: name< BOOST_MPL_PP_PARAMS(i, T) > \
{ \
}; \
}; \
/**/
#if defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
template<> \
struct lambda< \
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
, void_ \
, true_ \
> \
{ \
typedef false_ is_le; \
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
}; \
template<> \
struct lambda< \
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
, void_ \
, false_ \
> \
{ \
typedef false_ is_le; \
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
}; \
/**/
#else
# define BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
template< typename Tag > \
struct lambda< \
name< BOOST_MPL_AUX_NA_PARAMS(i) > \
, Tag \
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(int_<-1>) \
> \
{ \
typedef false_ is_le; \
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > result_; \
typedef name< BOOST_MPL_AUX_NA_PARAMS(i) > type; \
}; \
/**/
#endif
#if defined(BOOST_MPL_CFG_EXTENDED_TEMPLATE_PARAMETERS_MATCHING) \
|| defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT) \
&& defined(BOOST_MPL_CFG_BROKEN_OVERLOAD_RESOLUTION)
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
namespace aux { \
template< BOOST_MPL_PP_PARAMS(j, typename T) > \
struct template_arity< \
name< BOOST_MPL_PP_PARAMS(j, T) > \
> \
: int_<j> \
{ \
}; \
\
template<> \
struct template_arity< \
name< BOOST_MPL_PP_ENUM(i, na) > \
> \
: int_<-1> \
{ \
}; \
} \
/**/
#else
# define BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) /**/
#endif
#if defined(BOOST_MPL_CFG_MSVC_ETI_BUG)
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
template<> \
struct name< BOOST_MPL_PP_ENUM(i, int) > \
{ \
typedef int type; \
enum { value = 0 }; \
}; \
/**/
#else
# define BOOST_MPL_AUX_NA_SPEC_ETI(i, name) /**/
#endif
#define BOOST_MPL_AUX_NA_PARAM(param) param = na
#define BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, i, name) \
/**/
#define BOOST_MPL_AUX_NA_SPEC(i, name) \
BOOST_MPL_AUX_NA_SPEC_NO_ETI(i, name) \
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
/**/
#define BOOST_MPL_AUX_NA_SPEC2(i, j, name) \
BOOST_MPL_AUX_NA_SPEC_MAIN(i, name) \
BOOST_MPL_AUX_NA_SPEC_ETI(i, name) \
BOOST_MPL_AUX_NA_SPEC_LAMBDA(i, name) \
BOOST_MPL_AUX_NA_SPEC_ARITY(i, name) \
BOOST_MPL_AUX_NA_SPEC_TEMPLATE_ARITY(i, j, name) \
/**/
#endif // BOOST_MPL_AUX_NA_SPEC_HPP_INCLUDED
@@ -0,0 +1,92 @@
// config.hpp ---------------------------------------------------------------//
// Copyright 2012 Vicente J. Botet Escriba
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_RATIO_CONFIG_HPP
#define BOOST_RATIO_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/cstdint.hpp>
#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)
# if ! defined BOOST_NO_CXX11_U16STRING
# define BOOST_NO_CXX11_U16STRING
# endif
# if ! defined BOOST_NO_CXX11_U32STRING
# define BOOST_NO_CXX11_U32STRING
# endif
#endif
#if !defined BOOST_RATIO_VERSION
#define BOOST_RATIO_VERSION 1
#else
#if BOOST_RATIO_VERSION!=1 && BOOST_RATIO_VERSION!=2
#error "BOOST_RATIO_VERSION must be 1 or 2"
#endif
#endif
#if BOOST_RATIO_VERSION==1
#if ! defined BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
#define BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
#endif
#endif
#if BOOST_RATIO_VERSION==2
#if ! defined BOOST_RATIO_PROVIDES_DEPRECATED_FEATURES_SINCE_V2_0_0
#define BOOST_RATIO_DONT_PROVIDE_DEPRECATED_FEATURES_SINCE_V2_0_0
#endif
#endif
#ifdef INTMAX_C
#define BOOST_RATIO_INTMAX_C(a) INTMAX_C(a)
#else
#define BOOST_RATIO_INTMAX_C(a) a##LL
#endif
#ifdef UINTMAX_C
#define BOOST_RATIO_UINTMAX_C(a) UINTMAX_C(a)
#else
#define BOOST_RATIO_UINTMAX_C(a) a##ULL
#endif
#define BOOST_RATIO_INTMAX_T_MAX (0x7FFFFFFFFFFFFFFELL)
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static_assert(CND,MSG)
#elif defined(BOOST_RATIO_USES_STATIC_ASSERT)
#include <boost/static_assert.hpp>
#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) BOOST_STATIC_ASSERT(CND)
#elif defined(BOOST_RATIO_USES_MPL_ASSERT)
#include <boost/mpl/assert.hpp>
#include <boost/mpl/bool.hpp>
#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) \
BOOST_MPL_ASSERT_MSG(boost::mpl::bool_< (CND) >::type::value, MSG, TYPES)
#else
//~ #elif defined(BOOST_RATIO_USES_ARRAY_ASSERT)
#define BOOST_RATIO_CONCAT(A,B) A##B
#define BOOST_RATIO_NAME(A,B) BOOST_RATIO_CONCAT(A,B)
#define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES) static char BOOST_RATIO_NAME(__boost_ratio_test_,__LINE__)[(CND)?1:-1]
//~ #define BOOST_RATIO_STATIC_ASSERT(CND, MSG, TYPES)
#endif
#if !defined(BOOST_NO_CXX11_STATIC_ASSERT) || !defined(BOOST_RATIO_USES_MPL_ASSERT)
#define BOOST_RATIO_OVERFLOW_IN_ADD "overflow in ratio add"
#define BOOST_RATIO_OVERFLOW_IN_SUB "overflow in ratio sub"
#define BOOST_RATIO_OVERFLOW_IN_MUL "overflow in ratio mul"
#define BOOST_RATIO_OVERFLOW_IN_DIV "overflow in ratio div"
#define BOOST_RATIO_NUMERATOR_IS_OUT_OF_RANGE "ratio numerator is out of range"
#define BOOST_RATIO_DIVIDE_BY_0 "ratio divide by 0"
#define BOOST_RATIO_DENOMINATOR_IS_OUT_OF_RANGE "ratio denominator is out of range"
#endif
//#define BOOST_RATIO_EXTENSIONS
#endif // header
@@ -0,0 +1,27 @@
/*
[auto_generated]
boost/numeric/odeint/external/compute/compute.hpp
[begin_description]
includes all headers required for using odeint with Boost.Compute
[end_description]
Copyright 2009-2013 Karsten Ahnert
Copyright 2009-2013 Mario Mulansky
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_EXTERNAL_COMPUTE_COMPUTE_HPP_DEFINED
#define BOOST_NUMERIC_ODEINT_EXTERNAL_COMPUTE_COMPUTE_HPP_DEFINED
#include <boost/numeric/odeint/external/compute/compute_algebra.hpp>
#include <boost/numeric/odeint/external/compute/compute_operations.hpp>
#include <boost/numeric/odeint/external/compute/compute_algebra_dispatcher.hpp>
#include <boost/numeric/odeint/external/compute/compute_operations_dispatcher.hpp>
#include <boost/numeric/odeint/external/compute/compute_resize.hpp>
#endif // BOOST_NUMERIC_ODEINT_EXTERNAL_COMPUTE_COMPUTE_HPP_DEFINED
@@ -0,0 +1,13 @@
/*
Copyright Rene Rivera 2008-2013
Distributed under the Boost Software License, Version 1.0.
(See accompanying file LICENSE_1_0.txt or copy at
http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef BOOST_PREDEF_LIBRARY_C__PREFIX_H
#define BOOST_PREDEF_LIBRARY_C__PREFIX_H
#include <boost/predef/detail/_cassert.h>
#endif
@@ -0,0 +1,51 @@
///////////////////////////////////////////////////////////////////////////////
/// \file rend.hpp
/// Proto callables for boost::rend()
//
// Copyright 2012 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)
#ifndef BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012
#define BOOST_PROTO_FUNCTIONAL_RANGE_REND_HPP_EAN_27_08_2012
#include <boost/range/rend.hpp>
#include <boost/proto/proto_fwd.hpp>
namespace boost { namespace proto { namespace functional
{
// A PolymorphicFunctionObject that wraps boost::rend()
struct rend
{
BOOST_PROTO_CALLABLE()
template<typename Sig>
struct result;
template<typename This, typename Rng>
struct result<This(Rng)>
: boost::range_reverse_iterator<Rng const>
{};
template<typename This, typename Rng>
struct result<This(Rng &)>
: boost::range_reverse_iterator<Rng>
{};
template<typename Rng>
typename boost::range_reverse_iterator<Rng>::type operator()(Rng &rng) const
{
return boost::rend(rng);
}
template<typename Rng>
typename boost::range_reverse_iterator<Rng const>::type operator()(Rng const &rng) const
{
return boost::rend(rng);
}
};
}}}
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 87 KiB

@@ -0,0 +1,51 @@
/*
* 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)
*
* Copyright (c) 2011 Helge Bahmann
* Copyright (c) 2013-2014 Andrey Semashev
*/
/*!
* \file atomic/detail/lockpool.hpp
*
* This header contains declaration of the lockpool used to emulate atomic ops.
*/
#ifndef BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_
#define BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_
#include <boost/atomic/detail/config.hpp>
#include <boost/atomic/detail/link.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
namespace boost {
namespace atomics {
namespace detail {
struct lockpool
{
class scoped_lock
{
void* m_lock;
public:
explicit BOOST_ATOMIC_DECL scoped_lock(const volatile void* addr) BOOST_NOEXCEPT;
BOOST_ATOMIC_DECL ~scoped_lock() BOOST_NOEXCEPT;
BOOST_DELETED_FUNCTION(scoped_lock(scoped_lock const&))
BOOST_DELETED_FUNCTION(scoped_lock& operator=(scoped_lock const&))
};
static BOOST_ATOMIC_DECL void thread_fence() BOOST_NOEXCEPT;
static BOOST_ATOMIC_DECL void signal_fence() BOOST_NOEXCEPT;
};
} // namespace detail
} // namespace atomics
} // namespace boost
#endif // BOOST_ATOMIC_DETAIL_LOCKPOOL_HPP_INCLUDED_
@@ -0,0 +1,88 @@
/*=============================================================================
Copyright (c) 2014 Kohei Takahashi
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_BUILD_STD_TUPLE_05292014_0100)
#define BOOST_FUSION_BUILD_STD_TUPLE_05292014_0100
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/detail/index_sequence.hpp>
#include <boost/fusion/iterator/equal_to.hpp>
#include <boost/fusion/iterator/next.hpp>
#include <boost/fusion/iterator/value_of.hpp>
#include <boost/fusion/iterator/deref.hpp>
#include <tuple>
#include <cstddef>
namespace boost { namespace fusion { namespace detail
{
template <typename First, typename Last,
bool is_empty = result_of::equal_to<First, Last>::value>
struct build_std_tuple;
template <typename First, typename Last>
struct build_std_tuple<First, Last, true>
{
typedef std::tuple<> type;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(First const&, Last const&)
{
return type();
}
};
template <typename T, typename Rest>
struct push_front_std_tuple;
template <typename T, typename ...Rest>
struct push_front_std_tuple<T, std::tuple<Rest...> >
{
typedef std::tuple<T, Rest...> type;
template <std::size_t ...I>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
indexed_call(T const& first, std::tuple<Rest...> const& rest, index_sequence<I...>)
{
return type(first, std::get<I>(rest)...);
}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(T const& first, std::tuple<Rest...> const& rest)
{
typedef typename make_index_sequence<sizeof...(Rest)>::type gen;
return indexed_call(first, rest, gen());
}
};
template <typename First, typename Last>
struct build_std_tuple<First, Last, false>
{
typedef
build_std_tuple<typename result_of::next<First>::type, Last>
next_build_std_tuple;
typedef push_front_std_tuple<
typename result_of::value_of<First>::type
, typename next_build_std_tuple::type>
push_front;
typedef typename push_front::type type;
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
static type
call(First const& f, Last const& l)
{
typename result_of::value_of<First>::type v = *f;
return push_front::call(
v, next_build_std_tuple::call(fusion::next(f), l));
}
};
}}}
#endif
@@ -0,0 +1,118 @@
// Copyright David Abrahams 2003. Use, modification and distribution is
// subject to the Boost Software License, Version 1.0. (See accompanying
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
#ifndef IS_READABLE_ITERATOR_DWA2003112_HPP
# define IS_READABLE_ITERATOR_DWA2003112_HPP
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/detail/iterator.hpp>
#include <boost/type_traits/add_lvalue_reference.hpp>
#include <boost/iterator/detail/any_conversion_eater.hpp>
// should be the last #include
#include <boost/type_traits/integral_constant.hpp>
#include <boost/iterator/detail/config_def.hpp>
#ifndef BOOST_NO_IS_CONVERTIBLE
namespace boost {
namespace iterators {
namespace detail
{
// Guts of is_readable_iterator. Value is the iterator's value_type
// and the result is computed in the nested rebind template.
template <class Value>
struct is_readable_iterator_impl
{
static char tester(typename add_lvalue_reference<Value>::type, int);
static char (& tester(any_conversion_eater, ...) )[2];
template <class It>
struct rebind
{
static It& x;
BOOST_STATIC_CONSTANT(
bool
, value = (
sizeof(
is_readable_iterator_impl<Value>::tester(*x, 1)
) == 1
)
);
};
};
#undef BOOST_READABLE_PRESERVER
//
// void specializations to handle std input and output iterators
//
template <>
struct is_readable_iterator_impl<void>
{
template <class It>
struct rebind : boost::mpl::false_
{};
};
#ifndef BOOST_NO_CV_VOID_SPECIALIZATIONS
template <>
struct is_readable_iterator_impl<const void>
{
template <class It>
struct rebind : boost::mpl::false_
{};
};
template <>
struct is_readable_iterator_impl<volatile void>
{
template <class It>
struct rebind : boost::mpl::false_
{};
};
template <>
struct is_readable_iterator_impl<const volatile void>
{
template <class It>
struct rebind : boost::mpl::false_
{};
};
#endif
//
// This level of dispatching is required for Borland. We might save
// an instantiation by removing it for others.
//
template <class It>
struct is_readable_iterator_impl2
: is_readable_iterator_impl<
BOOST_DEDUCED_TYPENAME boost::detail::iterator_traits<It>::value_type const
>::template rebind<It>
{};
} // namespace detail
template< typename T > struct is_readable_iterator
: public ::boost::integral_constant<bool,::boost::iterators::detail::is_readable_iterator_impl2<T>::value>
{
public:
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_readable_iterator,(T))
};
} // namespace iterators
using iterators::is_readable_iterator;
} // namespace boost
#endif
#include <boost/iterator/detail/config_undef.hpp>
#endif // IS_READABLE_ITERATOR_DWA2003112_HPP
@@ -0,0 +1,306 @@
subroutine bpdecode120(llr,apmask,maxiterations,decoded,niterations,cw)
! A log-domain belief propagation decoder for the (120,60) code.
integer, parameter:: N=120, K=60, M=N-K
integer*1 codeword(N),cw(N),apmask(N)
integer colorder(N)
integer*1 decoded(K)
integer Nm(7,M) ! 5, 6, or 7 bits per check
integer Mn(3,N) ! 3 checks per bit
integer synd(M)
real tov(3,N)
real toc(7,M)
real tanhtoc(7,M)
real zn(N)
real llr(N)
real Tmn
integer nrw(M)
data colorder/ &
0,1,2,21,3,4,5,6,7,8,20,10,9,11,12,23,13,28,14,31, &
15,16,22,26,17,30,18,29,25,32,41,34,19,33,27,36,38,43,42,24, &
37,39,45,40,35,44,47,46,50,51,53,48,52,56,54,57,55,49,58,61, &
60,59,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79, &
80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99, &
100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119/
data Mn/ &
1, 18, 48, &
2, 4, 51, &
3, 23, 47, &
5, 36, 42, &
6, 43, 49, &
7, 24, 55, &
8, 35, 60, &
9, 26, 30, &
10, 29, 45, &
11, 13, 46, &
12, 53, 54, &
14, 20, 57, &
15, 16, 58, &
17, 39, 44, &
19, 37, 41, &
21, 28, 34, &
22, 50, 59, &
25, 31, 52, &
27, 32, 38, &
33, 40, 56, &
1, 11, 47, &
2, 10, 16, &
3, 12, 27, &
4, 24, 28, &
5, 23, 60, &
6, 29, 39, &
7, 31, 54, &
8, 50, 56, &
9, 13, 14, &
15, 22, 41, &
17, 26, 40, &
18, 25, 45, &
19, 20, 55, &
21, 30, 36, &
32, 49, 59, &
33, 53, 58, &
34, 38, 46, &
29, 35, 57, &
37, 43, 48, &
42, 51, 52, &
7, 11, 44, &
1, 42, 58, &
2, 13, 49, &
3, 20, 40, &
4, 18, 56, &
5, 45, 55, &
6, 21, 31, &
8, 46, 52, &
9, 12, 48, &
10, 37, 38, &
14, 15, 25, &
16, 17, 60, &
19, 39, 53, &
22, 44, 51, &
23, 28, 41, &
24, 32, 35, &
26, 45, 59, &
27, 33, 36, &
30, 47, 54, &
34, 50, 57, &
33, 43, 55, &
1, 41, 57, &
2, 40, 54, &
3, 6, 24, &
4, 11, 59, &
5, 13, 56, &
7, 16, 34, &
8, 19, 26, &
9, 31, 58, &
10, 21, 53, &
12, 22, 60, &
14, 38, 51, &
15, 43, 46, &
17, 48, 50, &
18, 27, 39, &
20, 28, 44, &
23, 25, 49, &
4, 29, 36, &
30, 32, 52, &
35, 37, 47, &
39, 42, 59, &
1, 21, 40, &
2, 50, 55, &
3, 8, 10, &
5, 31, 37, &
6, 14, 60, &
7, 36, 49, &
9, 34, 39, &
11, 19, 25, &
12, 52, 57, &
13, 22, 29, &
15, 30, 56, &
16, 18, 20, &
17, 24, 46, &
23, 38, 58, &
26, 28, 43, &
2, 27, 41, &
5, 32, 44, &
33, 47, 51, &
35, 48, 53, &
42, 43, 54, &
34, 45, 47, &
1, 8, 49, &
3, 14, 59, &
4, 31, 46, &
6, 20, 50, &
7, 26, 53, &
9, 10, 36, &
11, 58, 60, &
12, 21, 45, &
13, 28, 33, &
15, 17, 35, &
16, 38, 52, &
18, 41, 54, &
19, 23, 32, &
22, 40, 55, &
24, 25, 42, &
26, 27, 56, &
29, 44, 54, &
30, 37, 55/
data Nm/ &
1, 21, 42, 62, 82, 103, 0, &
2, 22, 43, 63, 83, 97, 0, &
3, 23, 44, 64, 84, 104, 0, &
2, 24, 45, 65, 78, 105, 0, &
4, 25, 46, 66, 85, 98, 0, &
5, 26, 47, 64, 86, 106, 0, &
6, 27, 41, 67, 87, 107, 0, &
7, 28, 48, 68, 84, 103, 0, &
8, 29, 49, 69, 88, 108, 0, &
9, 22, 50, 70, 84, 108, 0, &
10, 21, 41, 65, 89, 109, 0, &
11, 23, 49, 71, 90, 110, 0, &
10, 29, 43, 66, 91, 111, 0, &
12, 29, 51, 72, 86, 104, 0, &
13, 30, 51, 73, 92, 112, 0, &
13, 22, 52, 67, 93, 113, 0, &
14, 31, 52, 74, 94, 112, 0, &
1, 32, 45, 75, 93, 114, 0, &
15, 33, 53, 68, 89, 115, 0, &
12, 33, 44, 76, 93, 106, 0, &
16, 34, 47, 70, 82, 110, 0, &
17, 30, 54, 71, 91, 116, 0, &
3, 25, 55, 77, 95, 115, 0, &
6, 24, 56, 64, 94, 117, 0, &
18, 32, 51, 77, 89, 117, 0, &
8, 31, 57, 68, 96, 107, 118, &
19, 23, 58, 75, 97, 118, 0, &
16, 24, 55, 76, 96, 111, 0, &
9, 26, 38, 78, 91, 119, 0, &
8, 34, 59, 79, 92, 120, 0, &
18, 27, 47, 69, 85, 105, 0, &
19, 35, 56, 79, 98, 115, 0, &
20, 36, 58, 61, 99, 111, 0, &
16, 37, 60, 67, 88, 102, 0, &
7, 38, 56, 80, 100, 112, 0, &
4, 34, 58, 78, 87, 108, 0, &
15, 39, 50, 80, 85, 120, 0, &
19, 37, 50, 72, 95, 113, 0, &
14, 26, 53, 75, 81, 88, 0, &
20, 31, 44, 63, 82, 116, 0, &
15, 30, 55, 62, 97, 114, 0, &
4, 40, 42, 81, 101, 117, 0, &
5, 39, 61, 73, 96, 101, 0, &
14, 41, 54, 76, 98, 119, 0, &
9, 32, 46, 57, 102, 110, 0, &
10, 37, 48, 73, 94, 105, 0, &
3, 21, 59, 80, 99, 102, 0, &
1, 39, 49, 74, 100, 0, 0, &
5, 35, 43, 77, 87, 103, 0, &
17, 28, 60, 74, 83, 106, 0, &
2, 40, 54, 72, 99, 0, 0, &
18, 40, 48, 79, 90, 113, 0, &
11, 36, 53, 70, 100, 107, 0, &
11, 27, 59, 63, 101, 114, 119, &
6, 33, 46, 61, 83, 116, 120, &
20, 28, 45, 66, 92, 118, 0, &
12, 38, 60, 62, 90, 0, 0, &
13, 36, 42, 69, 95, 109, 0, &
17, 35, 57, 65, 81, 104, 0, &
7, 25, 52, 71, 86, 109, 0/
data nrw/ &
6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6,6, &
6,6,6,6,6,7,6,6,6,6,6,6,6,6,6,6,6,6,6,6, &
6,6,6,6,6,6,6,5,6,6,5,6,6,7,7,6,5,6,6,6/
ncw=3
toc=0
tov=0
tanhtoc=0
!write(*,*) llr
! initialize messages to checks
do j=1,M
do i=1,nrw(j)
toc(i,j)=llr((Nm(i,j)))
enddo
enddo
ncnt=0
do iter=0,maxiterations
! Update bit log likelihood ratios (tov=0 in iteration 0).
do i=1,N
if( apmask(i) .ne. 1 ) then
zn(i)=llr(i)+sum(tov(1:ncw,i))
else
zn(i)=llr(i)
endif
enddo
! Check to see if we have a codeword (check before we do any iteration).
cw=0
where( zn .gt. 0. ) cw=1
ncheck=0
do i=1,M
synd(i)=sum(cw(Nm(1:nrw(i),i)))
if( mod(synd(i),2) .ne. 0 ) ncheck=ncheck+1
! if( mod(synd(i),2) .ne. 0 ) write(*,*) 'check ',i,' unsatisfied'
enddo
!write(*,*) 'number of unsatisfied parity checks ',ncheck
if( ncheck .eq. 0 ) then ! we have a codeword - reorder the columns and return it
niterations=iter
codeword=cw(colorder+1)
decoded=codeword(M+1:N)
return
endif
if( iter.gt.0 ) then ! this code block implements an early stopping criterion
nd=ncheck-nclast
if( nd .lt. 0 ) then ! # of unsatisfied parity checks decreased
ncnt=0 ! reset counter
else
ncnt=ncnt+1
endif
! write(*,*) iter,ncheck,nd,ncnt
if( ncnt .ge. 3 .and. iter .ge. 5 .and. ncheck .gt. 10) then
niterations=-1
return
endif
endif
nclast=ncheck
! Send messages from bits to check nodes
do j=1,M
do i=1,nrw(j)
ibj=Nm(i,j)
toc(i,j)=zn(ibj)
do kk=1,ncw ! subtract off what the bit had received from the check
if( Mn(kk,ibj) .eq. j ) then
toc(i,j)=toc(i,j)-tov(kk,ibj)
endif
enddo
enddo
enddo
! send messages from check nodes to variable nodes
do i=1,M
tanhtoc(1:7,i)=tanh(-toc(1:7,i)/2)
enddo
do j=1,N
do i=1,ncw
ichk=Mn(i,j) ! Mn(:,j) are the checks that include bit j
Tmn=product(tanhtoc(1:nrw(ichk),ichk),mask=Nm(1:nrw(ichk),ichk).ne.j)
call platanh(-Tmn,y)
! y=atanh(-Tmn)
tov(i,j)=2*y
enddo
enddo
enddo
niterations=-1
return
end subroutine bpdecode120
@@ -0,0 +1,41 @@
// -*- Mode: C++ -*-
#ifndef DISPLAYTEXT_H
#define DISPLAYTEXT_H
#include <QTextEdit>
#include <QFont>
#include "logbook/logbook.h"
#include "decodedtext.h"
class DisplayText
: public QTextEdit
{
Q_OBJECT
public:
explicit DisplayText(QWidget *parent = 0);
void setContentFont (QFont const&);
void insertLineSpacer(QString const&);
void displayDecodedText(DecodedText const& decodedText, QString const& myCall, bool displayDXCCEntity,
LogBook const& logBook, QColor color_CQ, QColor color_MyCall,
QColor color_DXCC, QColor color_NewCall);
void displayTransmittedText(QString text, QString modeTx, qint32 txFreq,
QColor color_TxMsg, bool bFastMode);
void displayQSY(QString text);
Q_SIGNAL void selectCallsign (bool alt, bool ctrl);
Q_SLOT void appendText (QString const& text, QColor bg = Qt::white);
protected:
void mouseDoubleClickEvent(QMouseEvent *e);
private:
QString appendDXCCWorkedB4(QString message, QString const& callsign, QColor * bg, LogBook const& logBook,
QColor color_CQ, QColor color_DXCC, QColor color_NewCall);
QFont char_font_;
};
#endif // DISPLAYTEXT_H
@@ -0,0 +1,123 @@
///////////////////////////////////////////////////////////////////////////////
/// \file or_n.hpp
/// Definitions of or_N
//
// Copyright 2008 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)
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1>
struct or_2
: mpl::bool_<matches_<Expr, BasicExpr, typename G1::proto_grammar>::value>
{
typedef G1 which;
};
template<typename Expr, typename BasicExpr , typename G0 , typename G1>
struct or_2<true, Expr, BasicExpr, G0 , G1>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2>
struct or_3
: or_2<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2>
struct or_3<true, Expr, BasicExpr, G0 , G1 , G2>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3>
struct or_4
: or_3<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3>
struct or_4<true, Expr, BasicExpr, G0 , G1 , G2 , G3>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
struct or_5
: or_4<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4>
struct or_5<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
struct or_6
: or_5<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4 , G5
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5>
struct or_6<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
struct or_7
: or_6<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6>
struct or_7<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
struct or_8
: or_7<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7>
struct or_8<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
struct or_9
: or_8<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8>
struct or_9<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8>
: mpl::true_
{
typedef G0 which;
};
template<bool B, typename Expr, typename BasicExpr, typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
struct or_10
: or_9<
matches_<Expr, BasicExpr, typename G1::proto_grammar>::value
, Expr, BasicExpr, G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9
>
{};
template<typename Expr, typename BasicExpr , typename G0 , typename G1 , typename G2 , typename G3 , typename G4 , typename G5 , typename G6 , typename G7 , typename G8 , typename G9>
struct or_10<true, Expr, BasicExpr, G0 , G1 , G2 , G3 , G4 , G5 , G6 , G7 , G8 , G9>
: mpl::true_
{
typedef G0 which;
};
@@ -0,0 +1,430 @@
/*=============================================================================
Copyright (c) 2005-2010 Joel de Guzman
Copyright (c) 2010 Eric Niebler
Copyright (c) 2010 Thomas Heller
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)
==============================================================================*/
template <
template <typename> class Actor
, typename Tag
, typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
, typename Dummy = void>
struct expr_ext;
template <
typename Tag
, typename A0 = void , typename A1 = void , typename A2 = void , typename A3 = void , typename A4 = void , typename A5 = void , typename A6 = void , typename A7 = void , typename A8 = void , typename A9 = void
, typename Dummy = void
>
struct expr : expr_ext<actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9> {};
template <template <typename> class Actor, typename Tag, typename A0>
struct expr_ext<Actor, Tag, A0>
: proto::transform<expr_ext<Actor, Tag, A0>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1>
struct expr_ext<Actor, Tag, A0 , A1>
: proto::transform<expr_ext<Actor, Tag, A0 , A1>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2>
struct expr_ext<Actor, Tag, A0 , A1 , A2>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A5>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4 , A5>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4 , typename call_traits<A5>::param_type a5)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4 , a5)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A5>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A6>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4 , typename call_traits<A5>::param_type a5 , typename call_traits<A6>::param_type a6)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4 , a5 , a6)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A5>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A6>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A7>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4 , typename call_traits<A5>::param_type a5 , typename call_traits<A6>::param_type a6 , typename call_traits<A7>::param_type a7)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A5>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A6>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A7>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A8>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4 , typename call_traits<A5>::param_type a5 , typename call_traits<A6>::param_type a6 , typename call_traits<A7>::param_type a7 , typename call_traits<A8>::param_type a8)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8;
};
template <template <typename> class Actor, typename Tag, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9>
struct expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
: proto::transform<expr_ext<Actor, Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>, int>
{
typedef
typename proto::result_of::make_expr<
Tag
, phoenix_default_domain
, typename proto::detail::uncvref<typename call_traits<A0>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A1>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A2>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A3>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A4>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A5>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A6>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A7>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A8>::value_type>::type , typename proto::detail::uncvref<typename call_traits<A9>::value_type>::type
>::type
base_type;
typedef Actor<base_type> type;
typedef
typename proto::nary_expr<Tag, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::proto_grammar
proto_grammar;
static type make(typename call_traits<A0>::param_type a0 , typename call_traits<A1>::param_type a1 , typename call_traits<A2>::param_type a2 , typename call_traits<A3>::param_type a3 , typename call_traits<A4>::param_type a4 , typename call_traits<A5>::param_type a5 , typename call_traits<A6>::param_type a6 , typename call_traits<A7>::param_type a7 , typename call_traits<A8>::param_type a8 , typename call_traits<A9>::param_type a9)
{
actor<base_type> const e =
{
proto::make_expr<
Tag
, phoenix_default_domain
>(a0 , a1 , a2 , a3 , a4 , a5 , a6 , a7 , a8 , a9)
};
return e;
}
template<typename Expr, typename State, typename Data>
struct impl
: proto::pass_through<expr_ext>::template impl<Expr, State, Data>
{};
typedef Tag proto_tag;
typedef A0 proto_child0; typedef A1 proto_child1; typedef A2 proto_child2; typedef A3 proto_child3; typedef A4 proto_child4; typedef A5 proto_child5; typedef A6 proto_child6; typedef A7 proto_child7; typedef A8 proto_child8; typedef A9 proto_child9;
};
@@ -0,0 +1,128 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_END_HPP
#define BOOST_RANGE_END_HPP
#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/range/config.hpp>
#ifdef BOOST_NO_FUNCTION_TEMPLATE_ORDERING
#include <boost/range/detail/end.hpp>
#else
#include <boost/range/detail/implementation_help.hpp>
#include <boost/range/iterator.hpp>
#include <boost/range/const_iterator.hpp>
namespace boost
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
namespace range_detail
{
#endif
//////////////////////////////////////////////////////////////////////
// primary template
//////////////////////////////////////////////////////////////////////
template< typename C >
inline BOOST_DEDUCED_TYPENAME range_iterator<C>::type
range_end( C& c )
{
//
// If you get a compile-error here, it is most likely because
// you have not implemented range_begin() properly in
// the namespace of C
//
return c.end();
}
//////////////////////////////////////////////////////////////////////
// pair
//////////////////////////////////////////////////////////////////////
template< typename Iterator >
inline Iterator range_end( const std::pair<Iterator,Iterator>& p )
{
return p.second;
}
template< typename Iterator >
inline Iterator range_end( std::pair<Iterator,Iterator>& p )
{
return p.second;
}
//////////////////////////////////////////////////////////////////////
// array
//////////////////////////////////////////////////////////////////////
template< typename T, std::size_t sz >
inline const T* range_end( const T (&a)[sz] )
{
return range_detail::array_end<T,sz>( a );
}
template< typename T, std::size_t sz >
inline T* range_end( T (&a)[sz] )
{
return range_detail::array_end<T,sz>( a );
}
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
} // namespace 'range_detail'
#endif
namespace range_adl_barrier
{
template< class T >
inline BOOST_DEDUCED_TYPENAME range_iterator<T>::type end( T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
}
template< class T >
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type end( const T& r )
{
#if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564))
using namespace range_detail;
#endif
return range_end( r );
}
} // namespace range_adl_barrier
} // namespace 'boost'
#endif // BOOST_NO_FUNCTION_TEMPLATE_ORDERING
namespace boost
{
namespace range_adl_barrier
{
template< class T >
inline BOOST_DEDUCED_TYPENAME range_iterator<const T>::type
const_end( const T& r )
{
return boost::range_adl_barrier::end( r );
}
} // namespace range_adl_barrier
using namespace range_adl_barrier;
} // namespace boost
#endif
@@ -0,0 +1,28 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
#define BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
#include <boost/units/derived_dimension.hpp>
#include <boost/units/physical_dimensions/length.hpp>
namespace boost {
namespace units {
/// derived dimension for wavenumber : L^-1
typedef derived_dimension<length_base_dimension,-1>::type wavenumber_dimension;
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_WAVENUMBER_DERIVED_DIMENSION_HPP
@@ -0,0 +1,133 @@
// Copyright Aleksey Gurtovoy 2001-2004
// Copyright David Abrahams 2001-2002
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// *Preprocessed* version of the main "iter_fold_if_impl.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl { namespace aux {
template< typename Iterator, typename State >
struct iter_fold_if_null_step
{
typedef State state;
typedef Iterator iterator;
};
template< bool >
struct iter_fold_if_step_impl
{
template<
typename Iterator
, typename State
, typename StateOp
, typename IteratorOp
>
struct result_
{
typedef typename apply2< StateOp,State,Iterator >::type state;
typedef typename IteratorOp::type iterator;
};
};
template<>
struct iter_fold_if_step_impl<false>
{
template<
typename Iterator
, typename State
, typename StateOp
, typename IteratorOp
>
struct result_
{
typedef State state;
typedef Iterator iterator;
};
};
template<
typename Iterator
, typename State
, typename ForwardOp
, typename Predicate
>
struct iter_fold_if_forward_step
{
typedef typename apply2< Predicate,State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,ForwardOp, mpl::next<Iterator> > impl_;
typedef typename impl_::state state;
typedef typename impl_::iterator iterator;
};
template<
typename Iterator
, typename State
, typename BackwardOp
, typename Predicate
>
struct iter_fold_if_backward_step
{
typedef typename apply2< Predicate,State,Iterator >::type not_last;
typedef typename iter_fold_if_step_impl<
BOOST_MPL_AUX_MSVC_VALUE_WKND(not_last)::value
>::template result_< Iterator,State,BackwardOp, identity<Iterator> > impl_;
typedef typename impl_::state state;
typedef typename impl_::iterator iterator;
};
template<
typename Iterator
, typename State
, typename ForwardOp
, typename ForwardPredicate
, typename BackwardOp
, typename BackwardPredicate
>
struct iter_fold_if_impl
{
private:
typedef iter_fold_if_null_step< Iterator,State > forward_step0;
typedef iter_fold_if_forward_step< typename forward_step0::iterator, typename forward_step0::state, ForwardOp, ForwardPredicate > forward_step1;
typedef iter_fold_if_forward_step< typename forward_step1::iterator, typename forward_step1::state, ForwardOp, ForwardPredicate > forward_step2;
typedef iter_fold_if_forward_step< typename forward_step2::iterator, typename forward_step2::state, ForwardOp, ForwardPredicate > forward_step3;
typedef iter_fold_if_forward_step< typename forward_step3::iterator, typename forward_step3::state, ForwardOp, ForwardPredicate > forward_step4;
typedef typename if_<
typename forward_step4::not_last
, iter_fold_if_impl<
typename forward_step4::iterator
, typename forward_step4::state
, ForwardOp
, ForwardPredicate
, BackwardOp
, BackwardPredicate
>
, iter_fold_if_null_step<
typename forward_step4::iterator
, typename forward_step4::state
>
>::type backward_step4;
typedef iter_fold_if_backward_step< typename forward_step3::iterator, typename backward_step4::state, BackwardOp, BackwardPredicate > backward_step3;
typedef iter_fold_if_backward_step< typename forward_step2::iterator, typename backward_step3::state, BackwardOp, BackwardPredicate > backward_step2;
typedef iter_fold_if_backward_step< typename forward_step1::iterator, typename backward_step2::state, BackwardOp, BackwardPredicate > backward_step1;
typedef iter_fold_if_backward_step< typename forward_step0::iterator, typename backward_step1::state, BackwardOp, BackwardPredicate > backward_step0;
public:
typedef typename backward_step0::state state;
typedef typename backward_step4::iterator iterator;
};
}}}
@@ -0,0 +1,122 @@
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// text_oarchive_impl.ipp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
// See http://www.boost.org for updates, documentation, and revision history.
#include <string>
#include <boost/config.hpp>
#include <cstddef> // size_t
#include <boost/config.hpp>
#if defined(BOOST_NO_STDC_NAMESPACE)
namespace std{
using ::size_t;
} // namespace std
#endif
#ifndef BOOST_NO_CWCHAR
#include <cwchar>
#ifdef BOOST_NO_STDC_NAMESPACE
namespace std{ using ::wcslen; }
#endif
#endif
#include <boost/archive/text_oarchive.hpp>
namespace boost {
namespace archive {
//////////////////////////////////////////////////////////////////////
// implementation of basic_text_oprimitive overrides for the combination
// of template parameters used to create a text_oprimitive
template<class Archive>
BOOST_ARCHIVE_DECL void
text_oarchive_impl<Archive>::save(const char * s)
{
const std::size_t len = std::ostream::traits_type::length(s);
*this->This() << len;
this->This()->newtoken();
os << s;
}
template<class Archive>
BOOST_ARCHIVE_DECL void
text_oarchive_impl<Archive>::save(const std::string &s)
{
const std::size_t size = s.size();
*this->This() << size;
this->This()->newtoken();
os << s;
}
#ifndef BOOST_NO_CWCHAR
#ifndef BOOST_NO_INTRINSIC_WCHAR_T
template<class Archive>
BOOST_ARCHIVE_DECL void
text_oarchive_impl<Archive>::save(const wchar_t * ws)
{
const std::size_t l = std::wcslen(ws);
* this->This() << l;
this->This()->newtoken();
os.write((const char *)ws, l * sizeof(wchar_t)/sizeof(char));
}
#endif
#ifndef BOOST_NO_STD_WSTRING
template<class Archive>
BOOST_ARCHIVE_DECL void
text_oarchive_impl<Archive>::save(const std::wstring &ws)
{
const std::size_t l = ws.size();
* this->This() << l;
this->This()->newtoken();
os.write((const char *)(ws.data()), l * sizeof(wchar_t)/sizeof(char));
}
#endif
#endif // BOOST_NO_CWCHAR
template<class Archive>
BOOST_ARCHIVE_DECL
text_oarchive_impl<Archive>::text_oarchive_impl(
std::ostream & os,
unsigned int flags
) :
basic_text_oprimitive<std::ostream>(
os,
0 != (flags & no_codecvt)
),
basic_text_oarchive<Archive>(flags)
{
if(0 == (flags & no_header))
#if BOOST_WORKAROUND(__MWERKS__, BOOST_TESTED_AT(0x3205))
this->init();
#else
this->basic_text_oarchive<Archive>::init();
#endif
}
template<class Archive>
BOOST_ARCHIVE_DECL void
text_oarchive_impl<Archive>::save_binary(const void *address, std::size_t count){
put('\n');
this->end_preamble();
#if ! defined(__MWERKS__)
this->basic_text_oprimitive<std::ostream>::save_binary(
#else
this->basic_text_oprimitive::save_binary(
#endif
address,
count
);
this->delimiter = this->eol;
}
} // namespace archive
} // namespace boost
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,66 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_CONFIG_HPP
#define BOOST_COMPUTE_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/version.hpp>
#include <boost/compute/cl.hpp>
// check for minimum required boost version
#if BOOST_VERSION < 105400
#error Boost.Compute requires Boost version 1.54 or later
#endif
// the BOOST_COMPUTE_NO_VARIADIC_TEMPLATES macro is defined
// if the compiler does not *fully* support variadic templates
#if defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) || \
(defined(__GNUC__) && !defined(__clang__) && \
__GNUC__ == 4 && __GNUC_MINOR__ <= 6)
#define BOOST_COMPUTE_NO_VARIADIC_TEMPLATES
#endif // BOOST_NO_CXX11_VARIADIC_TEMPLATES
// the BOOST_COMPUTE_NO_STD_TUPLE macro is defined if the
// compiler/stdlib does not support std::tuple
#if defined(BOOST_NO_CXX11_HDR_TUPLE) || \
defined(BOOST_COMPUTE_NO_VARIADIC_TEMPLATES)
#define BOOST_COMPUTE_NO_STD_TUPLE
#endif // BOOST_NO_CXX11_HDR_TUPLE
// defines BOOST_COMPUTE_CL_CALLBACK to the value of CL_CALLBACK
// if it is defined (it was added in OpenCL 1.1). this is used to
// annotate certain callback functions registered with OpenCL
#ifdef CL_CALLBACK
# define BOOST_COMPUTE_CL_CALLBACK CL_CALLBACK
#else
# define BOOST_COMPUTE_CL_CALLBACK
#endif
// Maximum number of iterators acceptable for make_zip_iterator
#ifndef BOOST_COMPUTE_MAX_ARITY
// should be no more than max boost::tuple size (10 by default)
# define BOOST_COMPUTE_MAX_ARITY 10
#endif
#if !defined(BOOST_COMPUTE_DOXYGEN_INVOKED) && \
defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
# define BOOST_COMPUTE_NO_RVALUE_REFERENCES
#endif // BOOST_NO_CXX11_RVALUE_REFERENCES
#if defined(BOOST_NO_CXX11_HDR_INITIALIZER_LIST)
# define BOOST_COMPUTE_NO_HDR_INITIALIZER_LIST
#endif // BOOST_NO_CXX11_HDR_INITIALIZER_LIST
#if defined(BOOST_NO_CXX11_HDR_CHRONO)
# define BOOST_COMPUTE_NO_HDR_CHRONO
#endif // BOOST_NO_CXX11_HDR_CHRONO
#endif // BOOST_COMPUTE_CONFIG_HPP
@@ -0,0 +1,179 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2015. 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_NEW_ALLOCATOR_HPP
#define BOOST_CONTAINER_NEW_ALLOCATOR_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/container/detail/config_begin.hpp>
#include <boost/container/detail/workaround.hpp>
#include <boost/container/throw_exception.hpp>
#include <cstddef>
//!\file
namespace boost {
namespace container {
/// @cond
template<bool Value>
struct new_allocator_bool
{ static const bool value = Value; };
template<class T>
class new_allocator;
/// @endcond
//! Specialization of new_allocator for void types
template<>
class new_allocator<void>
{
public:
typedef void value_type;
typedef void * pointer;
typedef const void* const_pointer;
//!A integral constant of type bool with value true
typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool<true>) propagate_on_container_move_assignment;
//!A integral constant of type bool with value true
typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool<true>) is_always_equal;
// reference-to-void members are impossible
//!Obtains an new_allocator that allocates
//!objects of type T2
template<class T2>
struct rebind
{
typedef new_allocator< T2> other;
};
//!Default constructor
//!Never throws
new_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Constructor from other new_allocator.
//!Never throws
new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Constructor from related new_allocator.
//!Never throws
template<class T2>
new_allocator(const new_allocator<T2> &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Swaps two allocators, does nothing
//!because this new_allocator is stateless
friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!An new_allocator always compares to true, as memory allocated with one
//!instance can be deallocated by another instance
friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{ return true; }
//!An new_allocator always compares to false, as memory allocated with one
//!instance can be deallocated by another instance
friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{ return false; }
};
//! This class is a reduced STL-compatible allocator that allocates memory using operator new
template<class T>
class new_allocator
{
public:
typedef T value_type;
typedef T * pointer;
typedef const T * const_pointer;
typedef T & reference;
typedef const T & const_reference;
typedef std::size_t size_type;
typedef std::ptrdiff_t difference_type;
//!A integral constant of type bool with value true
typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool<true>) propagate_on_container_move_assignment;
//!A integral constant of type bool with value true
typedef BOOST_CONTAINER_IMPDEF(new_allocator_bool<true>) is_always_equal;
//!Obtains an new_allocator that allocates
//!objects of type T2
template<class T2>
struct rebind
{
typedef new_allocator<T2> other;
};
//!Default constructor
//!Never throws
new_allocator() BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Constructor from other new_allocator.
//!Never throws
new_allocator(const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Constructor from related new_allocator.
//!Never throws
template<class T2>
new_allocator(const new_allocator<T2> &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!Allocates memory for an array of count elements.
//!Throws std::bad_alloc if there is no enough memory
pointer allocate(size_type count)
{
if(BOOST_UNLIKELY(count > this->max_size()))
throw_bad_alloc();
return static_cast<T*>(::operator new(count*sizeof(T)));
}
//!Deallocates previously allocated memory.
//!Never throws
void deallocate(pointer ptr, size_type) BOOST_NOEXCEPT_OR_NOTHROW
{ ::operator delete((void*)ptr); }
//!Returns the maximum number of elements that could be allocated.
//!Never throws
size_type max_size() const BOOST_NOEXCEPT_OR_NOTHROW
{ return size_type(-1)/sizeof(T); }
//!Swaps two allocators, does nothing
//!because this new_allocator is stateless
friend void swap(new_allocator &, new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{}
//!An new_allocator always compares to true, as memory allocated with one
//!instance can be deallocated by another instance
friend bool operator==(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{ return true; }
//!An new_allocator always compares to false, as memory allocated with one
//!instance can be deallocated by another instance
friend bool operator!=(const new_allocator &, const new_allocator &) BOOST_NOEXCEPT_OR_NOTHROW
{ return false; }
};
} //namespace container {
} //namespace boost {
#include <boost/container/detail/config_end.hpp>
#endif //BOOST_CONTAINER_NEW_ALLOCATOR_HPP
@@ -0,0 +1,159 @@
#ifndef DATE_TIME_SIMPLE_FORMAT_HPP___
#define DATE_TIME_SIMPLE_FORMAT_HPP___
/* Copyright (c) 2002,2003 CrystalClear Software, Inc.
* Use, modification and distribution is subject to the
* Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
* Author: Jeff Garland, Bart Garst
* $Date$
*/
#include "boost/date_time/parse_format_base.hpp"
namespace boost {
namespace date_time {
//! Class to provide simple basic formatting rules
template<class charT>
class simple_format {
public:
//! String used printed is date is invalid
static const charT* not_a_date()
{
return "not-a-date-time";
}
//! String used to for positive infinity value
static const charT* pos_infinity()
{
return "+infinity";
}
//! String used to for positive infinity value
static const charT* neg_infinity()
{
return "-infinity";
}
//! Describe month format
static month_format_spec month_format()
{
return month_as_short_string;
}
static ymd_order_spec date_order()
{
return ymd_order_iso; //YYYY-MM-DD
}
//! This format uses '-' to separate date elements
static bool has_date_sep_chars()
{
return true;
}
//! Char to sep?
static charT year_sep_char()
{
return '-';
}
//! char between year-month
static charT month_sep_char()
{
return '-';
}
//! Char to separate month-day
static charT day_sep_char()
{
return '-';
}
//! char between date-hours
static charT hour_sep_char()
{
return ' ';
}
//! char between hour and minute
static charT minute_sep_char()
{
return ':';
}
//! char for second
static charT second_sep_char()
{
return ':';
}
};
#ifndef BOOST_NO_STD_WSTRING
//! Specialization of formmating rules for wchar_t
template<>
class simple_format<wchar_t> {
public:
//! String used printed is date is invalid
static const wchar_t* not_a_date()
{
return L"not-a-date-time";
}
//! String used to for positive infinity value
static const wchar_t* pos_infinity()
{
return L"+infinity";
}
//! String used to for positive infinity value
static const wchar_t* neg_infinity()
{
return L"-infinity";
}
//! Describe month format
static month_format_spec month_format()
{
return month_as_short_string;
}
static ymd_order_spec date_order()
{
return ymd_order_iso; //YYYY-MM-DD
}
//! This format uses '-' to separate date elements
static bool has_date_sep_chars()
{
return true;
}
//! Char to sep?
static wchar_t year_sep_char()
{
return '-';
}
//! char between year-month
static wchar_t month_sep_char()
{
return '-';
}
//! Char to separate month-day
static wchar_t day_sep_char()
{
return '-';
}
//! char between date-hours
static wchar_t hour_sep_char()
{
return ' ';
}
//! char between hour and minute
static wchar_t minute_sep_char()
{
return ':';
}
//! char for second
static wchar_t second_sep_char()
{
return ':';
}
};
#endif // BOOST_NO_STD_WSTRING
} } //namespace date_time
#endif
@@ -0,0 +1,261 @@
#ifndef CONFIGURATION_HPP_
#define CONFIGURATION_HPP_
#include <QObject>
#include <QFont>
#include "Radio.hpp"
#include "IARURegions.hpp"
#include "AudioDevice.hpp"
#include "Transceiver.hpp"
#include "pimpl_h.hpp"
class QSettings;
class QWidget;
class QAudioDeviceInfo;
class QString;
class QDir;
class Bands;
class FrequencyList;
class StationList;
class QStringListModel;
class QHostAddress;
//
// Class Configuration
//
// Encapsulates the control, access and, persistence of user defined
// settings for the wsjtx GUI. Setting values are accessed through a
// QDialog window containing concept orientated tab windows.
//
// Responsibilities
//
// Provides management of the CAT and PTT rig interfaces, providing
// control access via a minimal generic set of Qt slots and status
// updates via Qt signals. Internally the rig control capability is
// farmed out to a separate thread since many of the rig control
// functions are blocking.
//
// All user settings required by the wsjtx GUI are exposed through
// query methods. Settings only become visible once they have been
// accepted by the user which is done by clicking the "OK" button on
// the settings dialog.
//
// The QSettings instance passed to the constructor is used to read
// and write user settings.
//
// Pointers to three QAbstractItemModel objects are provided to give
// access to amateur band information, user working frequencies and,
// user operating band information. These porovide consistent data
// models that can be used in GUI lists or tables or simply queried
// for user defined bands, default operating frequencies and, station
// descriptions.
//
class Configuration final
: public QObject
{
Q_OBJECT
Q_ENUMS (DataMode Type2MsgGen)
public:
using MODE = Transceiver::MODE;
using TransceiverState = Transceiver::TransceiverState;
using Frequency = Radio::Frequency;
using port_type = quint16;
enum DataMode {data_mode_none, data_mode_USB, data_mode_data};
Q_ENUM (DataMode)
enum Type2MsgGen {type_2_msg_1_full, type_2_msg_3_full, type_2_msg_5_only};
Q_ENUM (Type2MsgGen)
explicit Configuration (QDir const& temp_directory, QSettings * settings,
QWidget * parent = nullptr);
~Configuration ();
int exec ();
bool is_active () const;
QDir temp_dir () const;
QDir doc_dir () const;
QDir data_dir () const;
QDir writeable_data_dir () const;
QAudioDeviceInfo const& audio_input_device () const;
AudioDevice::Channel audio_input_channel () const;
QAudioDeviceInfo const& audio_output_device () const;
AudioDevice::Channel audio_output_channel () const;
// These query methods should be used after a call to exec() to
// determine if either the audio input or audio output stream
// parameters have changed. The respective streams should be
// re-opened if they return true.
bool restart_audio_input () const;
bool restart_audio_output () const;
QString my_callsign () const;
QString my_grid () const;
QFont decoded_text_font () const;
qint32 id_interval () const;
qint32 ntrials() const;
qint32 aggressive() const;
qint32 RxBandwidth() const;
double degrade() const;
double txDelay() const;
bool id_after_73 () const;
bool tx_QSY_allowed () const;
bool spot_to_psk_reporter () const;
bool monitor_off_at_startup () const;
bool monitor_last_used () const;
bool log_as_RTTY () const;
bool report_in_comments () const;
bool prompt_to_log () const;
bool insert_blank () const;
bool DXCC () const;
bool clear_DX () const;
bool miles () const;
bool quick_call () const;
bool disable_TX_on_73 () const;
int watchdog () const;
bool TX_messages () const;
bool split_mode () const;
bool enable_VHF_features () const;
bool decode_at_52s () const;
bool single_decode () const;
bool twoPass() const;
bool x2ToneSpacing() const;
bool contestMode() const;
bool realTimeDecode() const;
bool MyDx() const;
bool CQMyN() const;
bool NDxG() const;
bool NN() const;
bool EMEonly() const;
bool post_decodes () const;
QString udp_server_name () const;
port_type udp_server_port () const;
bool accept_udp_requests () const;
bool udpWindowToFront () const;
bool udpWindowRestore () const;
Bands * bands ();
Bands const * bands () const;
IARURegions::Region region () const;
FrequencyList * frequencies ();
FrequencyList const * frequencies () const;
StationList * stations ();
StationList const * stations () const;
QStringListModel * macros ();
QStringListModel const * macros () const;
QDir save_directory () const;
QDir azel_directory () const;
QString rig_name () const;
Type2MsgGen type_2_msg_gen () const;
QColor color_CQ () const;
QColor color_MyCall () const;
QColor color_TxMsg () const;
QColor color_DXCC () const;
QColor color_NewCall () const;
bool pwrBandTxMemory () const;
bool pwrBandTuneMemory () const;
// This method queries if a CAT and PTT connection is operational.
bool is_transceiver_online () const;
// Start the rig connection, safe and normal to call when rig is
// already open.
bool transceiver_online ();
// check if a real rig is configured
bool is_dummy_rig () const;
// Frequency resolution of the rig
//
// 0 - 1Hz
// 1 - 10Hz rounded
// -1 - 10Hz truncated
// 2 - 100Hz rounded
// -2 - 100Hz truncated
int transceiver_resolution () const;
// Close down connection to rig.
void transceiver_offline ();
// Set transceiver frequency in Hertz.
Q_SLOT void transceiver_frequency (Frequency);
// Setting a non zero TX frequency means split operation
// rationalise_mode means ensure TX uses same mode as RX.
Q_SLOT void transceiver_tx_frequency (Frequency = 0u);
// Set transceiver mode.
//
// Rationalise means ensure TX uses same mode as RX.
Q_SLOT void transceiver_mode (MODE);
// Set/unset PTT.
//
// Note that this must be called even if VOX PTT is selected since
// the "Emulate Split" mode requires PTT information to coordinate
// frequency changes.
Q_SLOT void transceiver_ptt (bool = true);
// Attempt to (re-)synchronise transceiver state.
//
// Force signal guarantees either a transceiver_update or a
// transceiver_failure signal.
//
// The enforce_mode_and_split parameter ensures that future
// transceiver updates have the correct mode and split setting
// i.e. the transceiver is ready for use.
Q_SLOT void sync_transceiver (bool force_signal = false, bool enforce_mode_and_split = false);
//
// This signal indicates that a font has been selected and accepted
// for the decoded text.
//
Q_SIGNAL void decoded_text_font_changed (QFont);
//
// This signal is emitted when the UDP server changes
//
Q_SIGNAL void udp_server_changed (QString const& udp_server);
Q_SIGNAL void udp_server_port_changed (port_type server_port);
//
// These signals are emitted and reflect transceiver state changes
//
// signals a change in one of the TransceiverState members
Q_SIGNAL void transceiver_update (Transceiver::TransceiverState const&) const;
// Signals a failure of a control rig CAT or PTT connection.
//
// A failed rig CAT or PTT connection is fatal and the underlying
// connections are closed automatically. The connections can be
// re-established with a call to transceiver_online(true) assuming
// the fault condition has been rectified or is transient.
Q_SIGNAL void transceiver_failure (QString const& reason) const;
private:
class impl;
pimpl<impl> m_;
};
#if QT_VERSION < 0x050500
Q_DECLARE_METATYPE (Configuration::DataMode);
Q_DECLARE_METATYPE (Configuration::Type2MsgGen);
#endif
#if !defined (QT_NO_DEBUG_STREAM)
ENUM_QDEBUG_OPS_DECL (Configuration, DataMode);
ENUM_QDEBUG_OPS_DECL (Configuration, Type2MsgGen);
#endif
ENUM_QDATASTREAM_OPS_DECL (Configuration, DataMode);
ENUM_QDATASTREAM_OPS_DECL (Configuration, Type2MsgGen);
ENUM_CONVERSION_OPS_DECL (Configuration, DataMode);
ENUM_CONVERSION_OPS_DECL (Configuration, Type2MsgGen);
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

@@ -0,0 +1,94 @@
#ifndef BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
#define BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
// MS compatible compilers support #pragma once
#if defined(_MSC_VER)
# pragma once
#endif
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
// basic_oarchive.hpp:
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
// 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 http://www.boost.org for updates, documentation, and revision history.
#include <cstddef> // NULL
#include <boost/config.hpp>
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include <boost/archive/basic_archive.hpp>
#include <boost/serialization/tracking_enum.hpp>
#include <boost/archive/detail/helper_collection.hpp>
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
namespace boost {
namespace serialization {
class extended_type_info;
} // namespace serialization
namespace archive {
namespace detail {
class basic_oarchive_impl;
class basic_oserializer;
class basic_pointer_oserializer;
//////////////////////////////////////////////////////////////////////
// class basic_oarchive - write serialized objects to an output stream
class BOOST_SYMBOL_VISIBLE basic_oarchive :
private boost::noncopyable,
public boost::archive::detail::helper_collection
{
friend class basic_oarchive_impl;
// hide implementation of this class to minimize header conclusion
boost::scoped_ptr<basic_oarchive_impl> pimpl;
// overload these to bracket object attributes. Used to implement
// xml archives
virtual void vsave(const version_type t) = 0;
virtual void vsave(const object_id_type t) = 0;
virtual void vsave(const object_reference_type t) = 0;
virtual void vsave(const class_id_type t) = 0;
virtual void vsave(const class_id_optional_type t) = 0;
virtual void vsave(const class_id_reference_type t) = 0;
virtual void vsave(const class_name_type & t) = 0;
virtual void vsave(const tracking_type t) = 0;
protected:
BOOST_ARCHIVE_DECL basic_oarchive(unsigned int flags = 0);
BOOST_ARCHIVE_DECL boost::archive::detail::helper_collection &
get_helper_collection();
virtual BOOST_ARCHIVE_DECL ~basic_oarchive();
public:
// note: NOT part of the public interface
BOOST_ARCHIVE_DECL void register_basic_serializer(
const basic_oserializer & bos
);
BOOST_ARCHIVE_DECL void save_object(
const void *x,
const basic_oserializer & bos
);
BOOST_ARCHIVE_DECL void save_pointer(
const void * t,
const basic_pointer_oserializer * bpos_ptr
);
void save_null_pointer(){
vsave(NULL_POINTER_TAG);
}
// real public interface starts here
BOOST_ARCHIVE_DECL void end_preamble(); // default implementation does nothing
BOOST_ARCHIVE_DECL library_version_type get_library_version() const;
BOOST_ARCHIVE_DECL unsigned int get_flags() const;
};
} // namespace detail
} // namespace archive
} // namespace boost
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
#endif //BOOST_ARCHIVE_BASIC_OARCHIVE_HPP
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,37 @@
//---------------------------------------------------------------------------//
// Copyright (c) 2013-2014 Kyle Lutz <kyle.r.lutz@gmail.com>
//
// Distributed under the Boost Software License, Version 1.0
// See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt
//
// See http://boostorg.github.com/compute for more information.
//---------------------------------------------------------------------------//
#ifndef BOOST_COMPUTE_DETAIL_GLOBAL_STATIC_HPP
#define BOOST_COMPUTE_DETAIL_GLOBAL_STATIC_HPP
#include <boost/compute/config.hpp>
#ifdef BOOST_COMPUTE_THREAD_SAFE
# ifdef BOOST_COMPUTE_HAVE_THREAD_LOCAL
// use c++11 thread local storage
# define BOOST_COMPUTE_DETAIL_GLOBAL_STATIC(type, name, ctor) \
thread_local type name ctor;
# else
// use thread_specific_ptr from boost.thread
# include <boost/thread/tss.hpp>
# define BOOST_COMPUTE_DETAIL_GLOBAL_STATIC(type, name, ctor) \
static ::boost::thread_specific_ptr< type > BOOST_PP_CAT(name, _tls_ptr_); \
if(!BOOST_PP_CAT(name, _tls_ptr_).get()){ \
BOOST_PP_CAT(name, _tls_ptr_).reset(new type ctor); \
} \
static type &name = *BOOST_PP_CAT(name, _tls_ptr_);
# endif
#else
// no thread-safety, just use static
# define BOOST_COMPUTE_DETAIL_GLOBAL_STATIC(type, name, ctor) \
static type name ctor;
#endif
#endif // BOOST_COMPUTE_DETAIL_GLOBAL_STATIC_HPP
@@ -0,0 +1,30 @@
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000-2005.
// 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_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
#define BOOST_TYPE_TRAITS_IS_FLOATING_HPP_INCLUDED
#include <boost/type_traits/integral_constant.hpp>
namespace boost {
//* is a type T a floating-point type described in the standard (3.9.1p8)
template <class T> struct is_floating_point : public false_type{};
template <class T> struct is_floating_point<const T> : public is_floating_point<T>{};
template <class T> struct is_floating_point<volatile const T> : public is_floating_point<T>{};
template <class T> struct is_floating_point<volatile T> : public is_floating_point<T>{};
template<> struct is_floating_point<float> : public true_type{};
template<> struct is_floating_point<double> : public true_type{};
template<> struct is_floating_point<long double> : public true_type{};
#if defined(BOOST_HAS_FLOAT128)
template<> struct is_floating_point<__float128> : public true_type{};
#endif
} // namespace boost
#endif // BOOST_TYPE_TRAITS_IS_FLOAT_HPP_INCLUDED
@@ -0,0 +1,109 @@
// Copyright (C) 2005-2006 The Trustees of Indiana University.
// 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)
// Authors: Jeremiah Willcock
// Douglas Gregor
// Andrew Lumsdaine
// Two bit per color property map
#ifndef BOOST_TWO_BIT_COLOR_MAP_HPP
#define BOOST_TWO_BIT_COLOR_MAP_HPP
#include <boost/property_map/property_map.hpp>
#include <boost/graph/properties.hpp>
#include <boost/shared_array.hpp>
#include <boost/config.hpp>
#include <boost/assert.hpp>
#include <algorithm>
#include <limits>
namespace boost {
enum two_bit_color_type {
two_bit_white = 0,
two_bit_gray = 1,
two_bit_green = 2,
two_bit_black = 3
};
template <>
struct color_traits<two_bit_color_type>
{
static two_bit_color_type white() { return two_bit_white; }
static two_bit_color_type gray() { return two_bit_gray; }
static two_bit_color_type green() { return two_bit_green; }
static two_bit_color_type black() { return two_bit_black; }
};
template<typename IndexMap = identity_property_map>
struct two_bit_color_map
{
std::size_t n;
IndexMap index;
shared_array<unsigned char> data;
BOOST_STATIC_CONSTANT(int, bits_per_char = std::numeric_limits<unsigned char>::digits);
BOOST_STATIC_CONSTANT(int, elements_per_char = bits_per_char / 2);
typedef typename property_traits<IndexMap>::key_type key_type;
typedef two_bit_color_type value_type;
typedef void reference;
typedef read_write_property_map_tag category;
explicit two_bit_color_map(std::size_t n, const IndexMap& index = IndexMap())
: n(n), index(index), data(new unsigned char[(n + elements_per_char - 1) / elements_per_char])
{
// Fill to white
std::fill(data.get(), data.get() + (n + elements_per_char - 1) / elements_per_char, 0);
}
};
template<typename IndexMap>
inline two_bit_color_type
get(const two_bit_color_map<IndexMap>& pm,
typename property_traits<IndexMap>::key_type key)
{
BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
typename property_traits<IndexMap>::value_type i = get(pm.index, key);
BOOST_ASSERT ((std::size_t)i < pm.n);
std::size_t byte_num = i / elements_per_char;
std::size_t bit_position = ((i % elements_per_char) * 2);
return two_bit_color_type((pm.data.get()[byte_num] >> bit_position) & 3);
}
template<typename IndexMap>
inline void
put(const two_bit_color_map<IndexMap>& pm,
typename property_traits<IndexMap>::key_type key,
two_bit_color_type value)
{
BOOST_STATIC_CONSTANT(int, elements_per_char = two_bit_color_map<IndexMap>::elements_per_char);
typename property_traits<IndexMap>::value_type i = get(pm.index, key);
BOOST_ASSERT ((std::size_t)i < pm.n);
BOOST_ASSERT (value >= 0 && value < 4);
std::size_t byte_num = i / elements_per_char;
std::size_t bit_position = ((i % elements_per_char) * 2);
pm.data.get()[byte_num] =
(unsigned char)
((pm.data.get()[byte_num] & ~(3 << bit_position))
| (value << bit_position));
}
template<typename IndexMap>
inline two_bit_color_map<IndexMap>
make_two_bit_color_map(std::size_t n, const IndexMap& index_map)
{
return two_bit_color_map<IndexMap>(n, index_map);
}
} // end namespace boost
#endif // BOOST_TWO_BIT_COLOR_MAP_HPP
#ifdef BOOST_GRAPH_USE_MPI
# include <boost/graph/distributed/two_bit_color_map.hpp>
#endif
@@ -0,0 +1,70 @@
#ifndef BOOST_MPL_PAIR_HPP_INCLUDED
#define BOOST_MPL_PAIR_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-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/aux_/msvc_eti_base.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
#include <boost/mpl/aux_/config/eti.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(T1)
, typename BOOST_MPL_AUX_NA_PARAM(T2)
>
struct pair
{
typedef pair type;
typedef T1 first;
typedef T2 second;
BOOST_MPL_AUX_LAMBDA_SUPPORT(2,pair,(T1,T2))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(P)
>
struct first
{
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
typedef typename P::first type;
#else
typedef typename aux::msvc_eti_base<P>::first type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,first,(P))
};
template<
typename BOOST_MPL_AUX_NA_PARAM(P)
>
struct second
{
#if !defined(BOOST_MPL_CFG_MSVC_70_ETI_BUG)
typedef typename P::second type;
#else
typedef typename aux::msvc_eti_base<P>::second type;
#endif
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,second,(P))
};
BOOST_MPL_AUX_NA_SPEC_NO_ETI(2, pair)
BOOST_MPL_AUX_NA_SPEC(1, first)
BOOST_MPL_AUX_NA_SPEC(1, second)
}}
#endif // BOOST_MPL_PAIR_HPP_INCLUDED
@@ -0,0 +1,267 @@
// Copyright David Abrahams 2002.
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef WORKAROUND_DWA2002126_HPP
# define WORKAROUND_DWA2002126_HPP
// Compiler/library version workaround macro
//
// Usage:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, < 1300)
// // workaround for eVC4 and VC6
// ... // workaround code here
// #endif
//
// When BOOST_STRICT_CONFIG is defined, expands to 0. Otherwise, the
// first argument must be undefined or expand to a numeric
// value. The above expands to:
//
// (BOOST_MSVC) != 0 && (BOOST_MSVC) < 1300
//
// When used for workarounds that apply to the latest known version
// and all earlier versions of a compiler, the following convention
// should be observed:
//
// #if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1301))
//
// The version number in this case corresponds to the last version in
// which the workaround was known to have been required. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is not the defined, the macro
// BOOST_TESTED_AT(x) expands to "!= 0", which effectively activates
// the workaround for any version of the compiler. When
// BOOST_DETECT_OUTDATED_WORKAROUNDS is defined, a compiler warning or
// error will be issued if the compiler version exceeds the argument
// to BOOST_TESTED_AT(). This can be used to locate workarounds which
// may be obsoleted by newer versions.
# ifndef BOOST_STRICT_CONFIG
#include <boost/config.hpp>
#ifndef __BORLANDC__
#define __BORLANDC___WORKAROUND_GUARD 1
#else
#define __BORLANDC___WORKAROUND_GUARD 0
#endif
#ifndef __CODEGEARC__
#define __CODEGEARC___WORKAROUND_GUARD 1
#else
#define __CODEGEARC___WORKAROUND_GUARD 0
#endif
#ifndef _MSC_VER
#define _MSC_VER_WORKAROUND_GUARD 1
#else
#define _MSC_VER_WORKAROUND_GUARD 0
#endif
#ifndef _MSC_FULL_VER
#define _MSC_FULL_VER_WORKAROUND_GUARD 1
#else
#define _MSC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC
#define BOOST_MSVC_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_MSVC_FULL_VER
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 1
#else
#define BOOST_MSVC_FULL_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GNUC__
#define __GNUC___WORKAROUND_GUARD 1
#else
#define __GNUC___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_MINOR__
#define __GNUC_MINOR___WORKAROUND_GUARD 1
#else
#define __GNUC_MINOR___WORKAROUND_GUARD 0
#endif
#ifndef __GNUC_PATCHLEVEL__
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 1
#else
#define __GNUC_PATCHLEVEL___WORKAROUND_GUARD 0
#endif
#ifndef __IBMCPP__
#define __IBMCPP___WORKAROUND_GUARD 1
#else
#define __IBMCPP___WORKAROUND_GUARD 0
#endif
#ifndef __SUNPRO_CC
#define __SUNPRO_CC_WORKAROUND_GUARD 1
#else
#define __SUNPRO_CC_WORKAROUND_GUARD 0
#endif
#ifndef __DECCXX_VER
#define __DECCXX_VER_WORKAROUND_GUARD 1
#else
#define __DECCXX_VER_WORKAROUND_GUARD 0
#endif
#ifndef __MWERKS__
#define __MWERKS___WORKAROUND_GUARD 1
#else
#define __MWERKS___WORKAROUND_GUARD 0
#endif
#ifndef __EDG__
#define __EDG___WORKAROUND_GUARD 1
#else
#define __EDG___WORKAROUND_GUARD 0
#endif
#ifndef __EDG_VERSION__
#define __EDG_VERSION___WORKAROUND_GUARD 1
#else
#define __EDG_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __HP_aCC
#define __HP_aCC_WORKAROUND_GUARD 1
#else
#define __HP_aCC_WORKAROUND_GUARD 0
#endif
#ifndef __hpxstd98
#define __hpxstd98_WORKAROUND_GUARD 1
#else
#define __hpxstd98_WORKAROUND_GUARD 0
#endif
#ifndef _CRAYC
#define _CRAYC_WORKAROUND_GUARD 1
#else
#define _CRAYC_WORKAROUND_GUARD 0
#endif
#ifndef __DMC__
#define __DMC___WORKAROUND_GUARD 1
#else
#define __DMC___WORKAROUND_GUARD 0
#endif
#ifndef MPW_CPLUS
#define MPW_CPLUS_WORKAROUND_GUARD 1
#else
#define MPW_CPLUS_WORKAROUND_GUARD 0
#endif
#ifndef __COMO__
#define __COMO___WORKAROUND_GUARD 1
#else
#define __COMO___WORKAROUND_GUARD 0
#endif
#ifndef __COMO_VERSION__
#define __COMO_VERSION___WORKAROUND_GUARD 1
#else
#define __COMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef __INTEL_COMPILER
#define __INTEL_COMPILER_WORKAROUND_GUARD 1
#else
#define __INTEL_COMPILER_WORKAROUND_GUARD 0
#endif
#ifndef __ICL
#define __ICL_WORKAROUND_GUARD 1
#else
#define __ICL_WORKAROUND_GUARD 0
#endif
#ifndef _COMPILER_VERSION
#define _COMPILER_VERSION_WORKAROUND_GUARD 1
#else
#define _COMPILER_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef _RWSTD_VER
#define _RWSTD_VER_WORKAROUND_GUARD 1
#else
#define _RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_RWSTD_VER
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 1
#else
#define BOOST_RWSTD_VER_WORKAROUND_GUARD 0
#endif
#ifndef __GLIBCPP__
#define __GLIBCPP___WORKAROUND_GUARD 1
#else
#define __GLIBCPP___WORKAROUND_GUARD 0
#endif
#ifndef _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 1
#else
#define _GLIBCXX_USE_C99_FP_MACROS_DYNAMIC_WORKAROUND_GUARD 0
#endif
#ifndef __SGI_STL_PORT
#define __SGI_STL_PORT_WORKAROUND_GUARD 1
#else
#define __SGI_STL_PORT_WORKAROUND_GUARD 0
#endif
#ifndef _STLPORT_VERSION
#define _STLPORT_VERSION_WORKAROUND_GUARD 1
#else
#define _STLPORT_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef __LIBCOMO_VERSION__
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 1
#else
#define __LIBCOMO_VERSION___WORKAROUND_GUARD 0
#endif
#ifndef _CPPLIB_VER
#define _CPPLIB_VER_WORKAROUND_GUARD 1
#else
#define _CPPLIB_VER_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_CXX_VERSION
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_CXX_VERSION_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL_WIN
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WIN_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_DINKUMWARE_STDLIB
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 1
#else
#define BOOST_DINKUMWARE_STDLIB_WORKAROUND_GUARD 0
#endif
#ifndef BOOST_INTEL
#define BOOST_INTEL_WORKAROUND_GUARD 1
#else
#define BOOST_INTEL_WORKAROUND_GUARD 0
#endif
// Always define to zero, if it's used it'll be defined my MPL:
#define BOOST_MPL_CFG_GCC_WORKAROUND_GUARD 0
# define BOOST_WORKAROUND(symbol, test) \
((symbol ## _WORKAROUND_GUARD + 0 == 0) && \
(symbol != 0) && (1 % (( (symbol test) ) + 1)))
// ^ ^ ^ ^
// The extra level of parenthesis nesting above, along with the
// BOOST_OPEN_PAREN indirection below, is required to satisfy the
// broken preprocessor in MWCW 8.3 and earlier.
//
// The basic mechanism works as follows:
// (symbol test) + 1 => if (symbol test) then 2 else 1
// 1 % ((symbol test) + 1) => if (symbol test) then 1 else 0
//
// The complication with % is for cooperation with BOOST_TESTED_AT().
// When "test" is BOOST_TESTED_AT(x) and
// BOOST_DETECT_OUTDATED_WORKAROUNDS is #defined,
//
// symbol test => if (symbol <= x) then 1 else -1
// (symbol test) + 1 => if (symbol <= x) then 2 else 0
// 1 % ((symbol test) + 1) => if (symbol <= x) then 1 else divide-by-zero
//
# ifdef BOOST_DETECT_OUTDATED_WORKAROUNDS
# define BOOST_OPEN_PAREN (
# define BOOST_TESTED_AT(value) > value) ?(-1): BOOST_OPEN_PAREN 1
# else
# define BOOST_TESTED_AT(value) != ((value)-(value))
# endif
# else
# define BOOST_WORKAROUND(symbol, test) 0
# endif
#endif // WORKAROUND_DWA2002126_HPP
@@ -0,0 +1,57 @@
#ifndef BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
#define BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2001-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/void_fwd.hpp>
#include <boost/mpl/aux_/na.hpp>
#include <boost/mpl/aux_/config/lambda.hpp>
#if !defined(BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT)
# include <boost/mpl/int.hpp>
# include <boost/mpl/aux_/lambda_arity_param.hpp>
# include <boost/mpl/aux_/template_arity_fwd.hpp>
namespace boost { namespace mpl {
template<
typename T = na
, typename Tag = void_
BOOST_MPL_AUX_LAMBDA_ARITY_PARAM(
typename Arity = int_< aux::template_arity<T>::value >
)
>
struct lambda;
}}
#else // BOOST_MPL_CFG_NO_FULL_LAMBDA_SUPPORT
# include <boost/mpl/bool.hpp>
namespace boost { namespace mpl {
template<
typename T = na
, typename Tag = void_
, typename Protect = true_
>
struct lambda;
}}
#endif
#endif // BOOST_MPL_LAMBDA_FWD_HPP_INCLUDED
@@ -0,0 +1,90 @@
// Boost.Range library
//
// Copyright Thorsten Ottosen 2003-2004. Use, modification and
// distribution is subject to the Boost Software License, Version
// 1.0. (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// For more information, see http://www.boost.org/libs/range/
//
#ifndef BOOST_RANGE_SIZE_TYPE_HPP
#define BOOST_RANGE_SIZE_TYPE_HPP
#if defined(_MSC_VER)
# pragma once
#endif
#include <boost/range/config.hpp>
#include <boost/range/difference_type.hpp>
#include <boost/range/concepts.hpp>
#include <boost/range/has_range_iterator.hpp>
#include <boost/utility/enable_if.hpp>
#include <boost/type_traits/make_unsigned.hpp>
#include <boost/type_traits/remove_const.hpp>
#include <cstddef>
#include <utility>
namespace boost
{
namespace detail
{
//////////////////////////////////////////////////////////////////////////
// default
//////////////////////////////////////////////////////////////////////////
template<typename T>
class has_size_type
{
typedef char no_type;
struct yes_type { char dummy[2]; };
template<typename C>
static yes_type test(BOOST_DEDUCED_TYPENAME C::size_type x);
template<typename C>
static no_type test(...);
public:
static const bool value = sizeof(test<T>(0)) == sizeof(yes_type);
};
template<typename C, typename Enabler=void>
struct range_size_
{
typedef BOOST_DEDUCED_TYPENAME make_unsigned<
BOOST_DEDUCED_TYPENAME range_difference<C>::type
>::type type;
};
template<typename C>
struct range_size_<
C,
BOOST_DEDUCED_TYPENAME ::boost::enable_if<has_size_type<C>, void>::type
>
{
typedef BOOST_DEDUCED_TYPENAME C::size_type type;
};
template<typename C, bool B = range_detail::has_type< range_iterator<C> >::value>
struct range_size
{ };
template<typename C>
struct range_size<C, true>
: range_size_<C>
{ };
}
template< class T >
struct range_size :
detail::range_size<T>
{ };
} // namespace boost
#endif
@@ -0,0 +1,96 @@
#include "IARURegions.hpp"
#include <algorithm>
#include <QString>
#include <QVariant>
#include <QModelIndex>
#include <QMetaType>
#include "moc_IARURegions.cpp"
namespace
{
// human readable strings for each Region enumeration value
char const * const region_names[] =
{
"All",
"Region 1",
"Region 2",
"Region 3",
};
std::size_t constexpr region_names_size = sizeof (region_names) / sizeof (region_names[0]);
}
IARURegions::IARURegions (QObject * parent)
: QAbstractListModel {parent}
{
static_assert (region_names_size == SENTINAL,
"region_names array must match Region enumeration");
}
char const * IARURegions::name (Region r)
{
return region_names[static_cast<int> (r)];
}
auto IARURegions::value (int r) -> Region
{
if (r < 0 || r + 1 >= SENTINAL) return ALL;
return static_cast<Region> (r);
}
QVariant IARURegions::data (QModelIndex const& index, int role) const
{
QVariant item;
if (index.isValid ())
{
auto const& row = index.row ();
switch (role)
{
case Qt::ToolTipRole:
case Qt::AccessibleDescriptionRole:
item = tr ("IARU Region");
break;
case Qt::EditRole:
item = static_cast<Region> (row);
break;
case Qt::DisplayRole:
case Qt::AccessibleTextRole:
item = region_names[row];
break;
case Qt::TextAlignmentRole:
item = Qt::AlignHCenter + Qt::AlignVCenter;
break;
}
}
return item;
}
QVariant IARURegions::headerData (int section, Qt::Orientation orientation, int role) const
{
QVariant result;
if (Qt::DisplayRole == role && Qt::Horizontal == orientation)
{
result = tr ("IARU Region");
}
else
{
result = QAbstractListModel::headerData (section, orientation, role);
}
return result;
}
#if !defined (QT_NO_DEBUG_STREAM)
ENUM_QDEBUG_OPS_IMPL (IARURegions, Region);
#endif
ENUM_QDATASTREAM_OPS_IMPL (IARURegions, Region);
ENUM_CONVERSION_OPS_IMPL (IARURegions, Region);
@@ -0,0 +1,25 @@
/*==============================================================================
Copyright (c) 2011 Hartmut Kaiser
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_PHOENIX_PREPROCESSED_CATCH_PUSH_BACK)
#define BOOST_PHOENIX_PREPROCESSED_CATCH_PUSH_BACK
#if BOOST_PHOENIX_LIMIT <= 10
#include <boost/phoenix/statement/detail/preprocessed/catch_push_back_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
#include <boost/phoenix/statement/detail/preprocessed/catch_push_back_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
#include <boost/phoenix/statement/detail/preprocessed/catch_push_back_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
#include <boost/phoenix/statement/detail/preprocessed/catch_push_back_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
#include <boost/phoenix/statement/detail/preprocessed/catch_push_back_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
#endif
@@ -0,0 +1,30 @@
/////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2014-2015
//
// 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/intrusive for documentation.
//
/////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_INTRUSIVE_DETAIL_MINIMAL_PAIR_HEADER_HPP
#define BOOST_INTRUSIVE_DETAIL_MINIMAL_PAIR_HEADER_HPP
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#//Try to avoid including <utility>, as it's quite big in C++11
#if defined(BOOST_GNU_STDLIB)
# include <bits/stl_pair.h>
#else
# include <utility> //Fallback
#endif
#
#endif //BOOST_INTRUSIVE_DETAIL_MINIMAL_PAIR_HEADER_HPP
@@ -0,0 +1,71 @@
!
! readwav - open and read the header of a WAV format file
!
! On successful exit the file is left positioned at the start of the
! data.
!
! Example of usage:
!
! use readwav
! integer*2 sample
! type(wav_header) wav
! call wav%read ('file.wav')
! write (*,*) 'Sample rate is: ', wav%audio_format%sample_rate
! do i=0,wav%data_size
! read (unit=wav%lun) sample
! ! process sample
! end do
!
module readwav
implicit none
type format_chunk
integer*2 audio_format
integer*2 num_channels
integer sample_rate
integer byte_rate
integer*2 block_align
integer*2 bits_per_sample
end type format_chunk
type, public :: wav_header
integer :: lun
type(format_chunk) :: audio_format
integer :: data_size
contains
procedure :: read
end type wav_header
private
contains
subroutine read (this, filename)
implicit none
type riff_descriptor
character(len=4) :: id
integer :: size
end type riff_descriptor
class(wav_header), intent(inout) :: this
character(len=*), intent(in) :: filename
integer :: filepos
type(riff_descriptor) :: desc
character(len=4) :: riff_type
open (newunit=this%lun, file=filename, access='stream', form='unformatted', status='old')
read (unit=this%lun) desc,riff_type
inquire (unit=this%lun, pos=filepos)
do
read (unit=this%lun, pos=filepos) desc
inquire (unit=this%lun, pos=filepos)
if (desc%id .eq. 'fmt ') then
read (unit=this%lun) this%audio_format
else if (desc%id .eq. 'data') then
this%data_size = desc%size
exit
end if
filepos = filepos + (desc%size + 1) / 2 * 2 ! pad to even alignment
end do
end subroutine read
end module readwav
@@ -0,0 +1,68 @@
WSJT modes: Modulation Parameters
---------------------------------
------------------------------------------------------------------------
Mode nsps Rate B t_sym t_msg Suggested
(baud) (Hz) (ms) (s) applications
------------------------------------------------------------------------
Fast modes, sample Rate 11025 Hz:
------------------------------------------------------------------------
JTMS 8 689 1378 0.7 0.097 MS on 144+
FSK441 25 441 1764 2.3 0.129 MS
ISCAT-A 512 21.5 905 46.4 1.11 Aircraft Scatter
ISCAT-B 256 43.1 1809 23.2 0.56 Ionoscatter (6m)
JT6M 512 21.5 947 46.4 1.32 Ionoscatter (6m)
Slow modes, sample Rate 11025 Hz:
------------------------------------------------------------------------
JT65A 4096 2.69 178 372 46.81 EME 50 MHz
JT65B 4096 2.69 355 372 46.81 EME 144, 432
JT65C 4096 2.69 711 372 46.81 EME 1296-and-up
JT4A 2520 4.375 17.5 229 47.09 QRP HF dxing
JT4B 2520 4.375 35 229 47.09
JT4C 2520 4.375 70 229 47.09
JT4D 2520 4.375 158 229 47.09
JT4E 2520 4.375 315 229 47.09
JT4F 2520 4.375 630 229 47.09 Microwave EME
JT4G 2520 4.375 1260 229 47.09 Microwave EME
------------------------------------------------------------------------
Mode nsps Rate B t_sym t_msg Suggested
(baud) (Hz) (ms) (s) applications
------------------------------------------------------------------------
Slow modes, sample Rate 12000 Hz:
------------------------------------------------------------------------
JT9A 6912 1.736 15.625 576 48.96 QRP HF dxing
JT9B 6912 1.736 28.125 576 48.96
JT9C 6912 1.736 56.25 576 48.96
JT9D 6912 1.736 112.5 576 48.96
JT9E 6912 1.736 225 576 48.96
JT9F 6912 1.736 450 576 48.96
JT9G 6912 1.736 900 576 48.96 Microwave EME?
JT9H 6912 1.736 1800 576 48.96 Microwave EME?
WSPR 8192 1.465 5.86 683 110.59 Propagation probe
------------------------------------------------------------------------
Fast modes, sample Rate 12000 Hz:
------------------------------------------------------------------------
JT9B 3840 3.125 28.125 320 27.20 Not yet...
JT9C 1920 6.25 56.25 160 13.60 Not yet...
JT9D 960 12.5 112.5 80 6.80 Ionoscatter
JT9E 480 25 225 40 3.40 Ionoscatter
JT9F 240 50 450 20 1.70 Ionoscatter
JT9G 120 100 900 10 0.85 Ionoscatter
JT9H 60 200 1800 5 0.43 Ionoscat (no 10m)
JTMSK 6 2000 2000 0.5 0.117 MS
------------------------------------------------------------------------
nsps - Samples per symbol, at stated sample rate
Rate - Keying rate (baud)
B - Bandwidth (Hz)
t_sym - Symbol duration (ms)
t_msg - Time (s) to transmit typical 18-character message
@@ -0,0 +1,111 @@
/*
[auto_generated]
boost/numeric/odeint/integrate/detail/integrate_const.hpp
[begin_description]
integrate const implementation
[end_description]
Copyright 2009-2012 Karsten Ahnert
Copyright 2009-2012 Mario Mulansky
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/range/algorithm/for_each.hpp>
#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/iterator/const_step_time_iterator.hpp>
#include <boost/numeric/odeint/iterator/integrate/detail/integrate_adaptive.hpp>
#include <boost/numeric/odeint/iterator/integrate/detail/functors.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
)
{
size_t obs_calls = 0;
boost::for_each( make_const_step_time_range( stepper , system , start_state ,
start_time , end_time , dt ) ,
// should we use traits<Stepper>::state_type here instead of State? NO!
obs_caller< Observer >( obs_calls , observer ) );
// step integration steps gives step+1 observer calls
return obs_calls-1;
}
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 step = 0;
while( less_eq_with_sign( static_cast<Time>(time+time_step) , end_time , dt ) )
{
obs( start_state , time );
detail::integrate_adaptive( stepper , system , start_state , 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 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 , dense_output_stepper_tag
)
{
size_t obs_calls = 0;
boost::for_each( make_const_step_time_range( stepper , system , start_state ,
start_time , end_time , dt ) ,
obs_caller< Observer >( obs_calls , observer ) );
return obs_calls-1;
}
} } } }
#endif
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

@@ -0,0 +1,59 @@
/*=============================================================================
Copyright (c) 2001-2011 Joel de Guzman
Copyright (c) 2007 Tobias Schwinger
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
==============================================================================*/
#if !defined(FUSION_SEQUENCE_BASE_04182005_0737)
#define FUSION_SEQUENCE_BASE_04182005_0737
#include <boost/config.hpp>
#include <boost/fusion/support/config.hpp>
#include <boost/mpl/begin_end_fwd.hpp>
namespace boost { namespace fusion
{
namespace detail
{
struct from_sequence_convertible_type
{};
}
template <typename Sequence>
struct sequence_base
{
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Sequence const&
derived() const BOOST_NOEXCEPT
{
return static_cast<Sequence const&>(*this);
}
BOOST_CXX14_CONSTEXPR BOOST_FUSION_GPU_ENABLED
Sequence&
derived() BOOST_NOEXCEPT
{
return static_cast<Sequence&>(*this);
}
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
operator detail::from_sequence_convertible_type() const BOOST_NOEXCEPT
{
return detail::from_sequence_convertible_type();
}
};
struct fusion_sequence_tag;
}}
namespace boost { namespace mpl
{
// Deliberately break mpl::begin, so it doesn't lie that a Fusion sequence
// is not an MPL sequence by returning mpl::void_.
// In other words: Fusion Sequences are always MPL Sequences, but they can
// be incompletely defined.
template<> struct begin_impl< boost::fusion::fusion_sequence_tag >;
}}
#endif
@@ -0,0 +1,56 @@
/*
Copyright Rene Rivera 2008-2015
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_PREDEF_COMPILER_KAI_H
#define BOOST_PREDEF_COMPILER_KAI_H
#include <boost/predef/version_number.h>
#include <boost/predef/make.h>
/*`
[heading `BOOST_COMP_KCC`]
Kai C++ compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__KCC`] [__predef_detection__]]
[[`__KCC_VERSION`] [V.R.P]]
]
*/
#define BOOST_COMP_KCC BOOST_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__KCC)
# define BOOST_COMP_KCC_DETECTION BOOST_PREDEF_MAKE_0X_VRPP(__KCC_VERSION)
#endif
#ifdef BOOST_COMP_KCC_DETECTION
# if defined(BOOST_PREDEF_DETAIL_COMP_DETECTED)
# define BOOST_COMP_KCC_EMULATED BOOST_COMP_KCC_DETECTION
# else
# undef BOOST_COMP_KCC
# define BOOST_COMP_KCC BOOST_COMP_KCC_DETECTION
# endif
# define BOOST_COMP_KCC_AVAILABLE
# include <boost/predef/detail/comp_detected.h>
#endif
#define BOOST_COMP_KCC_NAME "Kai C++"
#endif
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC,BOOST_COMP_KCC_NAME)
#ifdef BOOST_COMP_KCC_EMULATED
#include <boost/predef/detail/test.h>
BOOST_PREDEF_DECLARE_TEST(BOOST_COMP_KCC_EMULATED,BOOST_COMP_KCC_NAME)
#endif

Some files were not shown because too many files have changed in this diff Show More