Initial Commit

This commit is contained in:
Jordan Sherer
2018-02-08 21:28:33 -05:00
commit 678c1d3966
14352 changed files with 3176737 additions and 0 deletions
@@ -0,0 +1,175 @@
program jt9sim
! Generate simulated data for testing of WSJT-X
use wavhdr
use packjt
parameter (NTMAX=120)
parameter (NMAX=NTMAX*12000)
type(hdr) h
integer*2 iwave(NMAX) !Generated waveform (no noise)
real*4 dat(NMAX)
real*8 f0,f,dt,twopi,phi,dphi,baud,fspan,fsample,freq
character msg*22,msg0*22,message*22,msgsent*22,arg*8,fname*11
integer*4 i4tone(85) !Channel symbols (values 0-8)
integer*4 i4DataSymNoGray(69) !Data Symbols, values 0-7
integer*1 i1ScrambledBits(207) !Unpacked bits, scrambled order
integer*1 i1Bits(207) !Encoded information-carrying bits
integer*1 i1SoftSymbols(207)
include 'jt9sync.f90'
nargs=iargc()
if(nargs.ne.6) then
print*,'Usage: jt9sim "message" fspan nsigs minutes SNR nfiles'
print*,'Example: jt9sim "CQ K1ABC FN42" 200 20 2 -28 1'
print*,' '
print*,'Enter message = "" to use entries in msgs.txt.'
print*,'Enter SNR = 0 to generate a range of SNRs.'
print*,'Enter SNR = 99 to generate a noiseless signal at frequency fspan'
go to 999
endif
call getarg(1,msg0)
call fmtmsg(msg0,iz)
message=msg0 !Transmitted message
call getarg(2,arg)
read(arg,*) fspan !Total freq range (Hz)
call getarg(3,arg)
read(arg,*) nsigs !Number of signals in each file
call getarg(4,arg)
read(arg,*) minutes !Length of file (1 2 5 10 30 minutes)
call getarg(5,arg)
read(arg,*) snrdb !S/N in dB (2500 hz reference BW)
call getarg(6,arg)
read(arg,*) nfiles !Number of files
rmsdb=25.
rms=10.0**(0.05*rmsdb)
fsample=12000.d0 !Sample rate (Hz)
dt=1.d0/fsample !Sample interval (s)
twopi=8.d0*atan(1.d0)
npts=12000*(60*minutes-6)
nsps=0
if(minutes.eq.1) nsps=6912
if(minutes.eq.2) nsps=15360
if(minutes.eq.5) nsps=40960
if(minutes.eq.10) nsps=82944
if(minutes.eq.30) nsps=252000
if(nsps.eq.0) stop 'Bad value for minutes.'
f0=1400.d0 !Center frequency (Hz)
! f0=3000.d0 !Center frequency (Hz)
! f0=1500.0
! if(minutes.eq.5) f0=1100.
! if(minutes.eq.10) f0=1050.
! if(minutes.eq.30) f0=1025.
call init_random_seed() ! seed Fortran RANDOM_NUMBER generator
call sgran() ! see C rand generator (used in gran)
h=default_header(12000,npts)
k=0 !Silence compiler warning
if(msg0(1:3).eq.'sin') read(msg0(4:),*) sinfreq
if(message.eq."") open(12,file='msgs.txt',status='old')
write(*,1000)
1000 format('File N freq S/N Message'/ &
'---------------------------------------------------')
do ifile=1,nfiles !Loop over all files
nmin=(ifile-1)*minutes
ihr=nmin/60
imin=mod(nmin,60)
write(fname,1002) ihr,imin !Create output filename
1002 format('000000_',2i2.2)
open(10,file=fname//'.wav',access='stream',status='unknown')
if(snrdb.lt.90) then
do i=1,npts
dat(i)=gran()
enddo
else
dat(1:npts)=0.
endif
if(msg0.ne.' ') then
call gen9(message,0,msgsent,i4tone,itype) !Encode message into tone #s
endif
rewind 12
do isig=1,nsigs !Loop over multiple signals
if(msg0.eq.' ') then
read(12,1004) message !Use pre-generated message texts
1004 format(a22)
call gen9(message,0,msgsent,i4tone,itype)
endif
f=f0
if(nsigs.gt.1) f=f0 - 0.5d0*fspan + fspan*(isig-1.d0)/(nsigs-1.d0)
snrdbx=snrdb
! snrdbx=snrdb + (ifile-1)*4.0
sig=10.0**(0.05*snrdbx)
if(snrdb.gt.90.0) sig=1.0
write(*,1020) ifile,isig,f,snrdbx,msgsent
1020 format(i3,i4,f10.3,f7.1,2x,a22)
phi=0.
baud=12000.d0/nsps
k=12000 !Start audio at t = 1.0 s
! f1=0.0001 * (ifile-1)
f1=0.
! print*,ifile-1,f1
dphi2=0.
ddphi2=twopi*f1*dt/60.0
do isym=1,85
freq=f + i4tone(isym)*baud
if(msg0(1:3).eq.'sin') freq=sinfreq
dphi=twopi*freq*dt + dphi2
do i=1,nsps
phi=phi + dphi
dphi2=dphi2 + ddphi2
if(phi.lt.-twopi) phi=phi+twopi
if(phi.gt.twopi) phi=phi-twopi
xphi=phi
k=k+1
dat(k)=dat(k) + sig*sin(xphi) !Use lookup table for i*2 sin(x) ?
enddo
enddo
enddo
fac=32767.0/nsigs
if(snrdb.ge.90.0) iwave(1:npts)=nint(fac*dat(1:npts))
if(snrdb.lt.90.0) iwave(1:npts)=nint(rms*dat(1:npts))
write(10) h,iwave(1:npts)
close(10)
! We're done! Now decode the data symbols from i4tone, as a test.
if(msg0.ne.' ') then
j=0
do i=1,85
if(isync(i).eq.1) cycle
j=j+1
i4DataSymNoGray(j)=igray(i4tone(i)-1,-1)
enddo
call unpackbits(i4DataSymNoGray,69,3,i1ScrambledBits)
call interleave9(i1ScrambledBits,-1,i1Bits)
do i=1,206
i4=-10
if(i1Bits(i).eq.1) i4=10
i1SoftSymbols(i)=i4
enddo
limit=1000
call jt9fano(i1SoftSymbols,limit,nlim,msg)
if(msg.ne.msg0) print*,'Decode error: ',msg0,' ',msg
endif
enddo
999 end program jt9sim
@@ -0,0 +1 @@
IDI_ICON1 ICON DISCARDABLE "icons/windows-icons/wsjtx.ico"
@@ -0,0 +1,47 @@
# /* **************************************************************************
# * *
# * (C) Copyright Edward Diener 2011. *
# * (C) Copyright Paul Mensonides 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. */
#
# ifndef BOOST_PREPROCESSOR_ARRAY_TO_LIST_HPP
# define BOOST_PREPROCESSOR_ARRAY_TO_LIST_HPP
#
# include <boost/preprocessor/cat.hpp>
# include <boost/preprocessor/config/config.hpp>
# include <boost/preprocessor/array/size.hpp>
# include <boost/preprocessor/control/if.hpp>
# include <boost/preprocessor/tuple/to_list.hpp>
#
# /* BOOST_PP_ARRAY_TO_LIST */
#
# define BOOST_PP_ARRAY_TO_LIST(array) \
BOOST_PP_IF \
( \
BOOST_PP_ARRAY_SIZE(array), \
BOOST_PP_ARRAY_TO_LIST_DO, \
BOOST_PP_ARRAY_TO_LIST_EMPTY \
) \
(array) \
/**/
#
# define BOOST_PP_ARRAY_TO_LIST_EMPTY(array) BOOST_PP_NIL
#
# if BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MSVC()
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(BOOST_PP_TUPLE_TO_LIST, array)
# define BOOST_PP_ARRAY_TO_LIST_I(m, args) BOOST_PP_ARRAY_TO_LIST_II(m, args)
# define BOOST_PP_ARRAY_TO_LIST_II(m, args) BOOST_PP_CAT(m ## args,)
# elif BOOST_PP_CONFIG_FLAGS() & BOOST_PP_CONFIG_MWCC()
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_ARRAY_TO_LIST_I(array)
# define BOOST_PP_ARRAY_TO_LIST_I(array) BOOST_PP_TUPLE_TO_LIST ## array
# else
# define BOOST_PP_ARRAY_TO_LIST_DO(array) BOOST_PP_TUPLE_TO_LIST array
# endif
#
# endif
@@ -0,0 +1,617 @@
//////////////////////////////////////////////////////////////////////////////
//
// (C) Copyright Ion Gaztanaga 2005-2013. Distributed under the Boost
// Software License, Version 1.0. (See accompanying file
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// See http://www.boost.org/libs/interprocess for documentation.
//
//////////////////////////////////////////////////////////////////////////////
//Thread launching functions are adapted from boost/detail/lightweight_thread.hpp
//
// boost/detail/lightweight_thread.hpp
//
// Copyright (c) 2002 Peter Dimov and Multi Media Ltd.
// 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
#ifndef BOOST_INTERPROCESS_DETAIL_OS_THREAD_FUNCTIONS_HPP
#define BOOST_INTERPROCESS_DETAIL_OS_THREAD_FUNCTIONS_HPP
#ifndef BOOST_CONFIG_HPP
# include <boost/config.hpp>
#endif
#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
#include <boost/interprocess/detail/config_begin.hpp>
#include <boost/interprocess/detail/workaround.hpp>
#include <boost/interprocess/streams/bufferstream.hpp>
#include <boost/interprocess/detail/posix_time_types_wrk.hpp>
#include <cstddef>
#include <ostream>
#if defined(BOOST_INTERPROCESS_WINDOWS)
# include <boost/interprocess/detail/win32_api.hpp>
# include <process.h>
#else
# include <pthread.h>
# include <unistd.h>
# include <sched.h>
# include <time.h>
# ifdef BOOST_INTERPROCESS_BSD_DERIVATIVE
//Some *BSD systems (OpenBSD & NetBSD) need sys/param.h before sys/sysctl.h, whereas
//others (FreeBSD & Darwin) need sys/types.h
# include <sys/types.h>
# include <sys/param.h>
# include <sys/sysctl.h>
# endif
//According to the article "C/C++ tip: How to measure elapsed real time for benchmarking"
# if defined(CLOCK_MONOTONIC_PRECISE) //BSD
# define BOOST_INTERPROCESS_CLOCK_MONOTONIC CLOCK_MONOTONIC_PRECISE
# elif defined(CLOCK_MONOTONIC_RAW) //Linux
# define BOOST_INTERPROCESS_CLOCK_MONOTONIC CLOCK_MONOTONIC_RAW
# elif defined(CLOCK_HIGHRES) //Solaris
# define BOOST_INTERPROCESS_CLOCK_MONOTONIC CLOCK_HIGHRES
# elif defined(CLOCK_MONOTONIC) //POSIX (AIX, BSD, Linux, Solaris)
# define BOOST_INTERPROCESS_CLOCK_MONOTONIC CLOCK_MONOTONIC
# elif !defined(CLOCK_MONOTONIC) && (defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__))
# include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
# define BOOST_INTERPROCESS_MATCH_ABSOLUTE_TIME
# else
# error "No high resolution steady clock in your system, please provide a patch"
# endif
#endif
namespace boost {
namespace interprocess {
namespace ipcdetail{
#if defined (BOOST_INTERPROCESS_WINDOWS)
typedef unsigned long OS_process_id_t;
typedef unsigned long OS_thread_id_t;
struct OS_thread_t
{
OS_thread_t()
: m_handle()
{}
void* handle() const
{ return m_handle; }
void* m_handle;
};
typedef OS_thread_id_t OS_systemwide_thread_id_t;
//process
inline OS_process_id_t get_current_process_id()
{ return winapi::get_current_process_id(); }
inline OS_process_id_t get_invalid_process_id()
{ return OS_process_id_t(0); }
//thread
inline OS_thread_id_t get_current_thread_id()
{ return winapi::get_current_thread_id(); }
inline OS_thread_id_t get_invalid_thread_id()
{ return OS_thread_id_t(0xffffffff); }
inline bool equal_thread_id(OS_thread_id_t id1, OS_thread_id_t id2)
{ return id1 == id2; }
//return the system tick in ns
inline unsigned long get_system_tick_ns()
{
unsigned long curres;
winapi::set_timer_resolution(10000, 0, &curres);
//Windows API returns the value in hundreds of ns
return (curres - 1ul)*100ul;
}
//return the system tick in us
inline unsigned long get_system_tick_us()
{
unsigned long curres;
winapi::set_timer_resolution(10000, 0, &curres);
//Windows API returns the value in hundreds of ns
return (curres - 1ul)/10ul + 1ul;
}
typedef unsigned __int64 OS_highres_count_t;
inline unsigned long get_system_tick_in_highres_counts()
{
__int64 freq;
unsigned long curres;
winapi::set_timer_resolution(10000, 0, &curres);
//Frequency in counts per second
if(!winapi::query_performance_frequency(&freq)){
//Tick resolution in ms
return (curres-1ul)/10000ul + 1ul;
}
else{
//In femtoseconds
__int64 count_fs = (1000000000000000LL - 1LL)/freq + 1LL;
__int64 tick_counts = (static_cast<__int64>(curres)*100000000LL - 1LL)/count_fs + 1LL;
return static_cast<unsigned long>(tick_counts);
}
}
inline OS_highres_count_t get_current_system_highres_count()
{
__int64 count;
if(!winapi::query_performance_counter(&count)){
count = winapi::get_tick_count();
}
return count;
}
inline void zero_highres_count(OS_highres_count_t &count)
{ count = 0; }
inline bool is_highres_count_zero(const OS_highres_count_t &count)
{ return count == 0; }
template <class Ostream>
inline Ostream &ostream_highres_count(Ostream &ostream, const OS_highres_count_t &count)
{
ostream << count;
return ostream;
}
inline OS_highres_count_t system_highres_count_subtract(const OS_highres_count_t &l, const OS_highres_count_t &r)
{ return l - r; }
inline bool system_highres_count_less(const OS_highres_count_t &l, const OS_highres_count_t &r)
{ return l < r; }
inline bool system_highres_count_less_ul(const OS_highres_count_t &l, unsigned long r)
{ return l < static_cast<OS_highres_count_t>(r); }
inline void thread_sleep_tick()
{ winapi::sleep_tick(); }
inline void thread_yield()
{ winapi::sched_yield(); }
inline void thread_sleep(unsigned int ms)
{ winapi::sleep(ms); }
//systemwide thread
inline OS_systemwide_thread_id_t get_current_systemwide_thread_id()
{
return get_current_thread_id();
}
inline void systemwide_thread_id_copy
(const volatile OS_systemwide_thread_id_t &from, volatile OS_systemwide_thread_id_t &to)
{
to = from;
}
inline bool equal_systemwide_thread_id(const OS_systemwide_thread_id_t &id1, const OS_systemwide_thread_id_t &id2)
{
return equal_thread_id(id1, id2);
}
inline OS_systemwide_thread_id_t get_invalid_systemwide_thread_id()
{
return get_invalid_thread_id();
}
inline long double get_current_process_creation_time()
{
winapi::interprocess_filetime CreationTime, ExitTime, KernelTime, UserTime;
winapi::get_process_times
( winapi::get_current_process(), &CreationTime, &ExitTime, &KernelTime, &UserTime);
typedef long double ldouble_t;
const ldouble_t resolution = (100.0l/1000000000.0l);
return CreationTime.dwHighDateTime*(ldouble_t(1u<<31u)*2.0l*resolution) +
CreationTime.dwLowDateTime*resolution;
}
inline unsigned int get_num_cores()
{
winapi::system_info sysinfo;
winapi::get_system_info( &sysinfo );
//in Windows dw is long which is equal in bits to int
return static_cast<unsigned>(sysinfo.dwNumberOfProcessors);
}
#else //#if defined (BOOST_INTERPROCESS_WINDOWS)
typedef pthread_t OS_thread_t;
typedef pthread_t OS_thread_id_t;
typedef pid_t OS_process_id_t;
struct OS_systemwide_thread_id_t
{
OS_systemwide_thread_id_t()
: pid(), tid()
{}
OS_systemwide_thread_id_t(pid_t p, pthread_t t)
: pid(p), tid(t)
{}
OS_systemwide_thread_id_t(const OS_systemwide_thread_id_t &x)
: pid(x.pid), tid(x.tid)
{}
OS_systemwide_thread_id_t(const volatile OS_systemwide_thread_id_t &x)
: pid(x.pid), tid(x.tid)
{}
OS_systemwide_thread_id_t & operator=(const OS_systemwide_thread_id_t &x)
{ pid = x.pid; tid = x.tid; return *this; }
OS_systemwide_thread_id_t & operator=(const volatile OS_systemwide_thread_id_t &x)
{ pid = x.pid; tid = x.tid; return *this; }
void operator=(const OS_systemwide_thread_id_t &x) volatile
{ pid = x.pid; tid = x.tid; }
pid_t pid;
pthread_t tid;
};
inline void systemwide_thread_id_copy
(const volatile OS_systemwide_thread_id_t &from, volatile OS_systemwide_thread_id_t &to)
{
to.pid = from.pid;
to.tid = from.tid;
}
//process
inline OS_process_id_t get_current_process_id()
{ return ::getpid(); }
inline OS_process_id_t get_invalid_process_id()
{ return pid_t(0); }
//thread
inline OS_thread_id_t get_current_thread_id()
{ return ::pthread_self(); }
inline OS_thread_id_t get_invalid_thread_id()
{
static pthread_t invalid_id;
return invalid_id;
}
inline bool equal_thread_id(OS_thread_id_t id1, OS_thread_id_t id2)
{ return 0 != pthread_equal(id1, id2); }
inline void thread_yield()
{ ::sched_yield(); }
#ifndef BOOST_INTERPROCESS_MATCH_ABSOLUTE_TIME
typedef struct timespec OS_highres_count_t;
#else
typedef unsigned long long OS_highres_count_t;
#endif
inline unsigned long get_system_tick_ns()
{
#ifdef _SC_CLK_TCK
long ticks_per_second =::sysconf(_SC_CLK_TCK); // ticks per sec
if(ticks_per_second <= 0){ //Try a typical value on error
ticks_per_second = 100;
}
return 999999999ul/static_cast<unsigned long>(ticks_per_second)+1ul;
#else
#error "Can't obtain system tick value for your system, please provide a patch"
#endif
}
inline unsigned long get_system_tick_in_highres_counts()
{
#ifndef BOOST_INTERPROCESS_MATCH_ABSOLUTE_TIME
return get_system_tick_ns();
#else
mach_timebase_info_data_t info;
mach_timebase_info(&info);
//ns
return static_cast<unsigned long>
(
static_cast<double>(get_system_tick_ns())
/ (static_cast<double>(info.numer) / info.denom)
);
#endif
}
//return system ticks in us
inline unsigned long get_system_tick_us()
{
return (get_system_tick_ns()-1)/1000ul + 1ul;
}
inline OS_highres_count_t get_current_system_highres_count()
{
#if defined(BOOST_INTERPROCESS_CLOCK_MONOTONIC)
struct timespec count;
::clock_gettime(BOOST_INTERPROCESS_CLOCK_MONOTONIC, &count);
return count;
#elif defined(BOOST_INTERPROCESS_MATCH_ABSOLUTE_TIME)
return ::mach_absolute_time();
#endif
}
#ifndef BOOST_INTERPROCESS_MATCH_ABSOLUTE_TIME
inline void zero_highres_count(OS_highres_count_t &count)
{ count.tv_sec = 0; count.tv_nsec = 0; }
inline bool is_highres_count_zero(const OS_highres_count_t &count)
{ return count.tv_sec == 0 && count.tv_nsec == 0; }
template <class Ostream>
inline Ostream &ostream_highres_count(Ostream &ostream, const OS_highres_count_t &count)
{
ostream << count.tv_sec << "s:" << count.tv_nsec << "ns";
return ostream;
}
inline OS_highres_count_t system_highres_count_subtract(const OS_highres_count_t &l, const OS_highres_count_t &r)
{
OS_highres_count_t res;
if (l.tv_nsec < r.tv_nsec){
res.tv_nsec = 1000000000 + l.tv_nsec - r.tv_nsec;
res.tv_sec = l.tv_sec - 1 - r.tv_sec;
}
else{
res.tv_nsec = l.tv_nsec - r.tv_nsec;
res.tv_sec = l.tv_sec - r.tv_sec;
}
return res;
}
inline bool system_highres_count_less(const OS_highres_count_t &l, const OS_highres_count_t &r)
{ return l.tv_sec < r.tv_sec || (l.tv_sec == r.tv_sec && l.tv_nsec < r.tv_nsec); }
inline bool system_highres_count_less_ul(const OS_highres_count_t &l, unsigned long r)
{ return !l.tv_sec && (static_cast<unsigned long>(l.tv_nsec) < r); }
#else
inline void zero_highres_count(OS_highres_count_t &count)
{ count = 0; }
inline bool is_highres_count_zero(const OS_highres_count_t &count)
{ return count == 0; }
template <class Ostream>
inline Ostream &ostream_highres_count(Ostream &ostream, const OS_highres_count_t &count)
{
ostream << count ;
return ostream;
}
inline OS_highres_count_t system_highres_count_subtract(const OS_highres_count_t &l, const OS_highres_count_t &r)
{ return l - r; }
inline bool system_highres_count_less(const OS_highres_count_t &l, const OS_highres_count_t &r)
{ return l < r; }
inline bool system_highres_count_less_ul(const OS_highres_count_t &l, unsigned long r)
{ return l < static_cast<OS_highres_count_t>(r); }
#endif
inline void thread_sleep_tick()
{
struct timespec rqt;
//Sleep for the half of the tick time
rqt.tv_sec = 0;
rqt.tv_nsec = get_system_tick_ns()/2;
::nanosleep(&rqt, 0);
}
inline void thread_sleep(unsigned int ms)
{
struct timespec rqt;
rqt.tv_sec = ms/1000u;
rqt.tv_nsec = (ms%1000u)*1000000u;
::nanosleep(&rqt, 0);
}
//systemwide thread
inline OS_systemwide_thread_id_t get_current_systemwide_thread_id()
{
return OS_systemwide_thread_id_t(::getpid(), ::pthread_self());
}
inline bool equal_systemwide_thread_id(const OS_systemwide_thread_id_t &id1, const OS_systemwide_thread_id_t &id2)
{
return (0 != pthread_equal(id1.tid, id2.tid)) && (id1.pid == id2.pid);
}
inline OS_systemwide_thread_id_t get_invalid_systemwide_thread_id()
{
return OS_systemwide_thread_id_t(get_invalid_process_id(), get_invalid_thread_id());
}
inline long double get_current_process_creation_time()
{ return 0.0L; }
inline unsigned int get_num_cores()
{
#ifdef _SC_NPROCESSORS_ONLN
long cores = ::sysconf(_SC_NPROCESSORS_ONLN);
// sysconf returns -1 if the name is invalid, the option does not exist or
// does not have a definite limit.
// if sysconf returns some other negative number, we have no idea
// what is going on. Default to something safe.
if(cores <= 0){
return 1;
}
//Check for overflow (unlikely)
else if(static_cast<unsigned long>(cores) >=
static_cast<unsigned long>(static_cast<unsigned int>(-1))){
return static_cast<unsigned int>(-1);
}
else{
return static_cast<unsigned int>(cores);
}
#elif defined(BOOST_INTERPROCESS_BSD_DERIVATIVE) && defined(HW_NCPU)
int request[2] = { CTL_HW, HW_NCPU };
int num_cores;
std::size_t result_len = sizeof(num_cores);
if ( (::sysctl (request, 2, &num_cores, &result_len, 0, 0) < 0) || (num_cores <= 0) ){
//Return a safe value
return 1;
}
else{
return static_cast<unsigned int>(num_cores);
}
#endif
}
inline int thread_create(OS_thread_t * thread, void *(*start_routine)(void*), void* arg)
{ return pthread_create(thread, 0, start_routine, arg); }
inline void thread_join(OS_thread_t thread)
{ (void)pthread_join(thread, 0); }
#endif //#if defined (BOOST_INTERPROCESS_WINDOWS)
typedef char pid_str_t[sizeof(OS_process_id_t)*3+1];
inline void get_pid_str(pid_str_t &pid_str, OS_process_id_t pid)
{
bufferstream bstream(pid_str, sizeof(pid_str));
bstream << pid << std::ends;
}
inline void get_pid_str(pid_str_t &pid_str)
{ get_pid_str(pid_str, get_current_process_id()); }
#if defined(BOOST_INTERPROCESS_WINDOWS)
inline int thread_create( OS_thread_t * thread, unsigned (__stdcall * start_routine) (void*), void* arg )
{
void* h = (void*)_beginthreadex( 0, 0, start_routine, arg, 0, 0 );
if( h != 0 ){
thread->m_handle = h;
return 0;
}
else{
return 1;
}
thread->m_handle = (void*)_beginthreadex( 0, 0, start_routine, arg, 0, 0 );
return thread->m_handle != 0;
}
inline void thread_join( OS_thread_t thread)
{
winapi::wait_for_single_object( thread.handle(), winapi::infinite_time );
winapi::close_handle( thread.handle() );
}
#endif
class abstract_thread
{
public:
virtual ~abstract_thread() {}
virtual void run() = 0;
};
template<class T>
class os_thread_func_ptr_deleter
{
public:
explicit os_thread_func_ptr_deleter(T* p)
: m_p(p)
{}
T *release()
{ T *p = m_p; m_p = 0; return p; }
T *get() const
{ return m_p; }
T *operator ->() const
{ return m_p; }
~os_thread_func_ptr_deleter()
{ delete m_p; }
private:
T *m_p;
};
#if defined(BOOST_INTERPROCESS_WINDOWS)
inline unsigned __stdcall launch_thread_routine( void * pv )
{
os_thread_func_ptr_deleter<abstract_thread> pt( static_cast<abstract_thread *>( pv ) );
pt->run();
return 0;
}
#else
extern "C" void * launch_thread_routine( void * pv );
inline void * launch_thread_routine( void * pv )
{
os_thread_func_ptr_deleter<abstract_thread> pt( static_cast<abstract_thread *>( pv ) );
pt->run();
return 0;
}
#endif
template<class F>
class launch_thread_impl
: public abstract_thread
{
public:
explicit launch_thread_impl( F f )
: f_( f )
{}
void run()
{ f_(); }
private:
F f_;
};
template<class F>
inline int thread_launch( OS_thread_t & pt, F f )
{
os_thread_func_ptr_deleter<abstract_thread> p( new launch_thread_impl<F>( f ) );
int r = thread_create(&pt, launch_thread_routine, p.get());
if( r == 0 ){
p.release();
}
return r;
}
} //namespace ipcdetail{
} //namespace interprocess {
} //namespace boost {
#include <boost/interprocess/detail/config_end.hpp>
#endif //BOOST_INTERPROCESS_DETAIL_OS_THREAD_FUNCTIONS_HPP
@@ -0,0 +1,145 @@
// (C) Copyright David Abrahams 2002.
// (C) Copyright Jeremy Siek 2002.
// (C) Copyright Thomas Witt 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 BOOST_INDIRECT_ITERATOR_23022003THW_HPP
#define BOOST_INDIRECT_ITERATOR_23022003THW_HPP
#include <boost/iterator.hpp>
#include <boost/iterator/iterator_adaptor.hpp>
#include <boost/pointee.hpp>
#include <boost/indirect_reference.hpp>
#include <boost/detail/iterator.hpp>
#include <boost/detail/indirect_traits.hpp>
#include <boost/type_traits/is_same.hpp>
#include <boost/type_traits/add_reference.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/identity.hpp>
#include <boost/mpl/eval_if.hpp>
#include <boost/mpl/not.hpp>
#include <boost/mpl/has_xxx.hpp>
#ifdef BOOST_MPL_CFG_NO_HAS_XXX
# include <boost/shared_ptr.hpp>
# include <boost/scoped_ptr.hpp>
# include <boost/mpl/bool.hpp>
# include <memory>
#endif
#include <boost/iterator/detail/config_def.hpp> // must be last #include
namespace boost {
namespace iterators {
template <class Iter, class Value, class Category, class Reference, class Difference>
class indirect_iterator;
namespace detail
{
template <class Iter, class Value, class Category, class Reference, class Difference>
struct indirect_base
{
typedef typename boost::detail::iterator_traits<Iter>::value_type dereferenceable;
typedef iterator_adaptor<
indirect_iterator<Iter, Value, Category, Reference, Difference>
, Iter
, typename ia_dflt_help<
Value, pointee<dereferenceable>
>::type
, Category
, typename ia_dflt_help<
Reference
, mpl::eval_if<
is_same<Value,use_default>
, indirect_reference<dereferenceable>
, add_reference<Value>
>
>::type
, Difference
> type;
};
template <>
struct indirect_base<int, int, int, int, int> {};
} // namespace detail
template <
class Iterator
, class Value = use_default
, class Category = use_default
, class Reference = use_default
, class Difference = use_default
>
class indirect_iterator
: public detail::indirect_base<
Iterator, Value, Category, Reference, Difference
>::type
{
typedef typename detail::indirect_base<
Iterator, Value, Category, Reference, Difference
>::type super_t;
friend class iterator_core_access;
public:
indirect_iterator() {}
indirect_iterator(Iterator iter)
: super_t(iter) {}
template <
class Iterator2, class Value2, class Category2
, class Reference2, class Difference2
>
indirect_iterator(
indirect_iterator<
Iterator2, Value2, Category2, Reference2, Difference2
> const& y
, typename enable_if_convertible<Iterator2, Iterator>::type* = 0
)
: super_t(y.base())
{}
private:
typename super_t::reference dereference() const
{
# if BOOST_WORKAROUND(__BORLANDC__, < 0x5A0 )
return const_cast<super_t::reference>(**this->base());
# else
return **this->base();
# endif
}
};
template <class Iter>
inline
indirect_iterator<Iter> make_indirect_iterator(Iter x)
{
return indirect_iterator<Iter>(x);
}
template <class Traits, class Iter>
inline
indirect_iterator<Iter,Traits> make_indirect_iterator(Iter x, Traits* = 0)
{
return indirect_iterator<Iter, Traits>(x);
}
} // namespace iterators
using iterators::indirect_iterator;
using iterators::make_indirect_iterator;
} // namespace boost
#include <boost/iterator/detail/config_undef.hpp>
#endif // BOOST_INDIRECT_ITERATOR_23022003THW_HPP
@@ -0,0 +1,92 @@
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// Preprocessed version of "boost/mpl/greater_equal.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename Tag1
, typename Tag2
>
struct greater_equal_impl
: if_c<
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
)
, aux::cast2nd_impl< greater_equal_impl< Tag1,Tag1 >,Tag1, Tag2 >
, aux::cast1st_impl< greater_equal_impl< Tag2,Tag2 >,Tag1, Tag2 >
>::type
{
};
/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct greater_equal_impl< na,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct greater_equal_impl< na,Tag >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct greater_equal_impl< Tag,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename T > struct greater_equal_tag
{
typedef typename T::tag type;
};
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
>
struct greater_equal
: greater_equal_impl<
typename greater_equal_tag<N1>::type
, typename greater_equal_tag<N2>::type
>::template apply< N1,N2 >::type
{
};
BOOST_MPL_AUX_NA_SPEC2(2, 2, greater_equal)
}}
namespace boost { namespace mpl {
template<>
struct greater_equal_impl< integral_c_tag,integral_c_tag >
{
template< typename N1, typename N2 > struct apply
: bool_< ( BOOST_MPL_AUX_VALUE_WKND(N1)::value >= BOOST_MPL_AUX_VALUE_WKND(N2)::value ) >
{
};
};
}}
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

@@ -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_CORE_DETAIL_PHX2_RESULT_HPP)
#define BOOST_PHOENIX_PREPROCESSED_CORE_DETAIL_PHX2_RESULT_HPP
#if BOOST_PHOENIX_LIMIT <= 10
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result_10.hpp>
#elif BOOST_PHOENIX_LIMIT <= 20
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result_20.hpp>
#elif BOOST_PHOENIX_LIMIT <= 30
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result_30.hpp>
#elif BOOST_PHOENIX_LIMIT <= 40
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result_40.hpp>
#elif BOOST_PHOENIX_LIMIT <= 50
#include <boost/phoenix/core/detail/cpp03/preprocessed/phx2_result_50.hpp>
#else
#error "BOOST_PHOENIX_LIMIT out of bounds for preprocessed headers"
#endif
#endif
@@ -0,0 +1,162 @@
///////////////////////////////////////////////////////////////////////////////
/// \file args.hpp
/// Contains definition of \c term\<\>, \c list1\<\>, \c list2\<\>, ...
/// class templates.
//
// 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< typename Arg0 >
struct term
{
static const long arity = 0;
typedef Arg0 child0;
typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg0 back_;
};
template< typename Arg0 >
struct list1
{
static const long arity = 1;
typedef Arg0 child0;
typedef mpl::void_ child1; typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg0 back_;
};
template< typename Arg0 , typename Arg1 >
struct list2
{
static const long arity = 2;
typedef Arg0 child0; typedef Arg1 child1;
typedef mpl::void_ child2; typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg1 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 >
struct list3
{
static const long arity = 3;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2;
typedef mpl::void_ child3; typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg2 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 >
struct list4
{
static const long arity = 4;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3;
typedef mpl::void_ child4; typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg3 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
struct list5
{
static const long arity = 5;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4;
typedef mpl::void_ child5; typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg4 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
struct list6
{
static const long arity = 6;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5;
typedef mpl::void_ child6; typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg5 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
struct list7
{
static const long arity = 7;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6;
typedef mpl::void_ child7; typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg6 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
struct list8
{
static const long arity = 8;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7;
typedef mpl::void_ child8; typedef mpl::void_ child9;
typedef Arg7 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
struct list9
{
static const long arity = 9;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8;
typedef mpl::void_ child9;
typedef Arg8 back_;
};
template< typename Arg0 , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
struct list10
{
static const long arity = 10;
typedef Arg0 child0; typedef Arg1 child1; typedef Arg2 child2; typedef Arg3 child3; typedef Arg4 child4; typedef Arg5 child5; typedef Arg6 child6; typedef Arg7 child7; typedef Arg8 child8; typedef Arg9 child9;
typedef Arg9 back_;
};
@@ -0,0 +1,258 @@
#ifndef CONFIGURATION_HPP_
#define CONFIGURATION_HPP_
#include <QObject>
#include <QFont>
#include "Radio.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;
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;
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
@@ -0,0 +1,81 @@
#ifndef IARU_REGIONS_HPP__
#define IARU_REGIONS_HPP__
#include <QAbstractListModel>
#include "qt_helpers.hpp"
class QString;
class QVariant;
class QModelIndex;
//
// Class IARURegions - Qt model that implements the list of IARU regions
//
//
// Responsibilities
//
// Provides a single column list model that contains the human
// readable string version of the data region in the display
// role. Also provided is a translatable column header string and
// tool tip string.
//
//
// Collaborations
//
// Implements a concrete sub-class of the QAbstractListModel class.
//
class IARURegions final
: public QAbstractListModel
{
Q_OBJECT
Q_ENUMS (Region)
public:
//
// This enumeration contains the supported regions, to complement
// this an array of human readable strings in the implementation
// (IARURegions.cpp) must be maintained in parallel.
//
enum Region
{
ALL, // matches with all regions
R1,
R2,
R3,
SENTINAL // this must be last
};
Q_ENUM (Region)
explicit IARURegions (QObject * parent = nullptr);
// translate between enumeration and human readable strings
static char const * name (Region);
static Region value (int);
// Implement the QAbstractListModel interface
int rowCount (QModelIndex const& parent = QModelIndex {}) const override
{
return parent.isValid () ? 0 : SENTINAL; // Number of regionss in Region enumeration class
}
QVariant data (QModelIndex const&, int role = Qt::DisplayRole) const override;
QVariant headerData (int section, Qt::Orientation, int = Qt::DisplayRole) const override;
};
// Qt boilerplate to make the IARURegions::region enumeration a type
// that can be streamed and queued as a signal argument as well as
// showing the human readable string when output to debug streams.
#if QT_VERSION < 0x050500
// Qt 5.5 introduces the Q_ENUM macro which automatically registers
// the meta-type
Q_DECLARE_METATYPE (IARURegions::Region);
#endif
#if !defined (QT_NO_DEBUG_STREAM)
ENUM_QDEBUG_OPS_DECL (IARURegions, Region);
#endif
ENUM_QDATASTREAM_OPS_DECL (IARURegions, Region);
ENUM_CONVERSION_OPS_DECL (IARURegions, Region);
#endif
@@ -0,0 +1,75 @@
///////////////////////////////////////////////////////////////////////////////
// Copyright Christopher Kormanyos 2014.
// Copyright John Maddock 2014.
// Copyright Paul Bristow 2014.
// Distributed under the Boost Software License,
// Version 1.0. (See accompanying file LICENSE_1_0.txt
// or copy at http://www.boost.org/LICENSE_1_0.txt)
//
// Implement quadruple-precision std::numeric_limits<> support.
#ifndef _BOOST_CSTDFLOAT_LIMITS_2014_01_09_HPP_
#define _BOOST_CSTDFLOAT_LIMITS_2014_01_09_HPP_
#include <boost/math/cstdfloat/cstdfloat_types.hpp>
#if defined(BOOST_CSTDFLOAT_HAS_INTERNAL_FLOAT128_T) && defined(BOOST_MATH_USE_FLOAT128) && !defined(BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT)
#include <limits>
// Define the name of the global quadruple-precision function to be used for
// calculating quiet_NaN() in the specialization of std::numeric_limits<>.
#if defined(BOOST_INTEL)
#define BOOST_CSTDFLOAT_FLOAT128_SQRT __sqrtq
#elif defined(__GNUC__)
#define BOOST_CSTDFLOAT_FLOAT128_SQRT sqrtq
#endif
// Forward declaration of the quadruple-precision square root function.
extern "C" boost::math::cstdfloat::detail::float_internal128_t BOOST_CSTDFLOAT_FLOAT128_SQRT(boost::math::cstdfloat::detail::float_internal128_t) throw();
namespace std
{
template<>
class numeric_limits<boost::math::cstdfloat::detail::float_internal128_t>
{
public:
BOOST_STATIC_CONSTEXPR bool is_specialized = true;
static boost::math::cstdfloat::detail::float_internal128_t (min) () BOOST_NOEXCEPT { return BOOST_CSTDFLOAT_FLOAT128_MIN; }
static boost::math::cstdfloat::detail::float_internal128_t (max) () BOOST_NOEXCEPT { return BOOST_CSTDFLOAT_FLOAT128_MAX; }
static boost::math::cstdfloat::detail::float_internal128_t lowest() BOOST_NOEXCEPT { return -(max)(); }
BOOST_STATIC_CONSTEXPR int digits = 113;
BOOST_STATIC_CONSTEXPR int digits10 = 33;
BOOST_STATIC_CONSTEXPR int max_digits10 = 36;
BOOST_STATIC_CONSTEXPR bool is_signed = true;
BOOST_STATIC_CONSTEXPR bool is_integer = false;
BOOST_STATIC_CONSTEXPR bool is_exact = false;
BOOST_STATIC_CONSTEXPR int radix = 2;
static boost::math::cstdfloat::detail::float_internal128_t epsilon () { return BOOST_CSTDFLOAT_FLOAT128_EPS; }
static boost::math::cstdfloat::detail::float_internal128_t round_error() { return BOOST_FLOAT128_C(0.5); }
BOOST_STATIC_CONSTEXPR int min_exponent = -16381;
BOOST_STATIC_CONSTEXPR int min_exponent10 = static_cast<int>((min_exponent * 301L) / 1000L);
BOOST_STATIC_CONSTEXPR int max_exponent = +16384;
BOOST_STATIC_CONSTEXPR int max_exponent10 = static_cast<int>((max_exponent * 301L) / 1000L);
BOOST_STATIC_CONSTEXPR bool has_infinity = true;
BOOST_STATIC_CONSTEXPR bool has_quiet_NaN = true;
BOOST_STATIC_CONSTEXPR bool has_signaling_NaN = false;
BOOST_STATIC_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
BOOST_STATIC_CONSTEXPR bool has_denorm_loss = false;
static boost::math::cstdfloat::detail::float_internal128_t infinity () { return BOOST_FLOAT128_C(1.0) / BOOST_FLOAT128_C(0.0); }
static boost::math::cstdfloat::detail::float_internal128_t quiet_NaN () { return ::BOOST_CSTDFLOAT_FLOAT128_SQRT(BOOST_FLOAT128_C(-1.0)); }
static boost::math::cstdfloat::detail::float_internal128_t signaling_NaN() { return BOOST_FLOAT128_C(0.0); }
static boost::math::cstdfloat::detail::float_internal128_t denorm_min () { return BOOST_FLOAT128_C(0.0); }
BOOST_STATIC_CONSTEXPR bool is_iec559 = true;
BOOST_STATIC_CONSTEXPR bool is_bounded = false;
BOOST_STATIC_CONSTEXPR bool is_modulo = false;
BOOST_STATIC_CONSTEXPR bool traps = false;
BOOST_STATIC_CONSTEXPR bool tinyness_before = false;
BOOST_STATIC_CONSTEXPR float_round_style round_style = round_to_nearest;
};
} // namespace std
#endif // Not BOOST_CSTDFLOAT_NO_LIBQUADMATH_SUPPORT (i.e., the user would like to have libquadmath support)
#endif // _BOOST_CSTDFLOAT_LIMITS_2014_01_09_HPP_
@@ -0,0 +1,62 @@
/*=============================================================================
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_VECTOR_ITERATOR_05042005_0635)
#define FUSION_VECTOR_ITERATOR_05042005_0635
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/support/iterator_base.hpp>
#include <boost/fusion/container/vector/detail/deref_impl.hpp>
#include <boost/fusion/container/vector/detail/value_of_impl.hpp>
#include <boost/fusion/container/vector/detail/next_impl.hpp>
#include <boost/fusion/container/vector/detail/prior_impl.hpp>
#include <boost/fusion/container/vector/detail/equal_to_impl.hpp>
#include <boost/fusion/container/vector/detail/distance_impl.hpp>
#include <boost/fusion/container/vector/detail/advance_impl.hpp>
#include <boost/type_traits/add_const.hpp>
#include <boost/mpl/int.hpp>
namespace boost { namespace fusion
{
struct vector_iterator_tag;
struct random_access_traversal_tag;
template <typename Vector, int N>
struct vector_iterator_identity;
template <typename Vector, int N>
struct vector_iterator : iterator_base<vector_iterator<Vector, N> >
{
typedef mpl::int_<N> index;
typedef Vector vector;
typedef vector_iterator_tag fusion_tag;
typedef random_access_traversal_tag category;
typedef vector_iterator_identity<
typename add_const<Vector>::type, N> identity;
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
vector_iterator(Vector& in_vec)
: vec(in_vec) {}
Vector& vec;
private:
// silence MSVC warning C4512: assignment operator could not be generated
vector_iterator& operator= (vector_iterator const&);
};
}}
#ifdef BOOST_FUSION_WORKAROUND_FOR_LWG_2408
namespace std
{
template <typename Vector, int N>
struct iterator_traits< ::boost::fusion::vector_iterator<Vector, N> >
{ };
}
#endif
#endif
@@ -0,0 +1,490 @@
// Copyright John Maddock 2006.
// Copyright Paul A. Bristow 2006, 2012.
// Copyright Thomas Mang 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_STATS_STUDENTS_T_HPP
#define BOOST_STATS_STUDENTS_T_HPP
// http://en.wikipedia.org/wiki/Student%27s_t_distribution
// http://www.itl.nist.gov/div898/handbook/eda/section3/eda3664.htm
#include <boost/math/distributions/fwd.hpp>
#include <boost/math/special_functions/beta.hpp> // for ibeta(a, b, x).
#include <boost/math/distributions/complement.hpp>
#include <boost/math/distributions/detail/common_error_handling.hpp>
#include <boost/math/distributions/normal.hpp>
#include <utility>
#ifdef BOOST_MSVC
# pragma warning(push)
# pragma warning(disable: 4702) // unreachable code (return after domain_error throw).
#endif
namespace boost{ namespace math{
template <class RealType = double, class Policy = policies::policy<> >
class students_t_distribution
{
public:
typedef RealType value_type;
typedef Policy policy_type;
students_t_distribution(RealType df) : df_(df)
{ // Constructor.
RealType result;
detail::check_df_gt0_to_inf( // Checks that df > 0 or df == inf.
"boost::math::students_t_distribution<%1%>::students_t_distribution", df_, &result, Policy());
} // students_t_distribution
RealType degrees_of_freedom()const
{
return df_;
}
// Parameter estimation:
static RealType find_degrees_of_freedom(
RealType difference_from_mean,
RealType alpha,
RealType beta,
RealType sd,
RealType hint = 100);
private:
// Data member:
RealType df_; // degrees of freedom is a real number or +infinity.
};
typedef students_t_distribution<double> students_t; // Convenience typedef for double version.
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> range(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of permissible values for random variable x.
// NOT including infinity.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline const std::pair<RealType, RealType> support(const students_t_distribution<RealType, Policy>& /*dist*/)
{ // Range of supported values for random variable x.
// This is range where cdf rises from 0 to 1, and outside it, the pdf is zero.
using boost::math::tools::max_value;
return std::pair<RealType, RealType>(-max_value<RealType>(), max_value<RealType>());
}
template <class RealType, class Policy>
inline RealType pdf(const students_t_distribution<RealType, Policy>& dist, const RealType& x)
{
BOOST_FPU_EXCEPTION_GUARD
BOOST_MATH_STD_USING // for ADL of std functions.
RealType error_result;
if(false == detail::check_x(
"boost::math::pdf(const students_t_distribution<%1%>&, %1%)", x, &error_result, Policy()))
return error_result;
RealType df = dist.degrees_of_freedom();
if(false == detail::check_df_gt0_to_inf( // Check that df > 0 or == +infinity.
"boost::math::pdf(const students_t_distribution<%1%>&, %1%)", df, &error_result, Policy()))
return error_result;
RealType result;
if ((boost::math::isinf)(x))
{ // +infinity.
normal_distribution<RealType, Policy> n(0, 1);
result = pdf(n, x);
return result;
}
RealType limit = policies::get_epsilon<RealType, Policy>();
// Use policies so that if policy requests lower precision,
// then get the normal distribution approximation earlier.
limit = static_cast<RealType>(1) / limit; // 1/eps
// for 64-bit double 1/eps = 4503599627370496
if (df > limit)
{ // Special case for really big degrees_of_freedom > 1 / eps
// - use normal distribution which is much faster and more accurate.
normal_distribution<RealType, Policy> n(0, 1);
result = pdf(n, x);
}
else
{ //
RealType basem1 = x * x / df;
if(basem1 < 0.125)
{
result = exp(-boost::math::log1p(basem1, Policy()) * (1+df) / 2);
}
else
{
result = pow(1 / (1 + basem1), (df + 1) / 2);
}
result /= sqrt(df) * boost::math::beta(df / 2, RealType(0.5f), Policy());
}
return result;
} // pdf
template <class RealType, class Policy>
inline RealType cdf(const students_t_distribution<RealType, Policy>& dist, const RealType& x)
{
RealType error_result;
if(false == detail::check_x(
"boost::math::pdf(const students_t_distribution<%1%>&, %1%)", x, &error_result, Policy()))
return error_result;
RealType df = dist.degrees_of_freedom();
// Error check:
if(false == detail::check_df_gt0_to_inf( // Check that df > 0 or == +infinity.
"boost::math::cdf(const students_t_distribution<%1%>&, %1%)", df, &error_result, Policy()))
return error_result;
if (x == 0)
{ // Special case with exact result.
return static_cast<RealType>(0.5);
}
if ((boost::math::isinf)(x))
{ // +infinity.
normal_distribution<RealType, Policy> n(0, 1);
RealType result = cdf(n, x);
return result;
}
RealType limit = policies::get_epsilon<RealType, Policy>();
// Use policies so that if policy requests lower precision,
// then get the normal distribution approximation earlier.
limit = static_cast<RealType>(1) / limit; // 1/eps
// for 64-bit double 1/eps = 4503599627370496
if (df > limit)
{ // Special case for really big degrees_of_freedom > 1 / eps (perhaps infinite?)
// - use normal distribution which is much faster and more accurate.
normal_distribution<RealType, Policy> n(0, 1);
RealType result = cdf(n, x);
return result;
}
else
{ // normal df case.
//
// Calculate probability of Student's t using the incomplete beta function.
// probability = ibeta(degrees_of_freedom / 2, 1/2, degrees_of_freedom / (degrees_of_freedom + t*t))
//
// However when t is small compared to the degrees of freedom, that formula
// suffers from rounding error, use the identity formula to work around
// the problem:
//
// I[x](a,b) = 1 - I[1-x](b,a)
//
// and:
//
// x = df / (df + t^2)
//
// so:
//
// 1 - x = t^2 / (df + t^2)
//
RealType x2 = x * x;
RealType probability;
if(df > 2 * x2)
{
RealType z = x2 / (df + x2);
probability = ibetac(static_cast<RealType>(0.5), df / 2, z, Policy()) / 2;
}
else
{
RealType z = df / (df + x2);
probability = ibeta(df / 2, static_cast<RealType>(0.5), z, Policy()) / 2;
}
return (x > 0 ? 1 - probability : probability);
}
} // cdf
template <class RealType, class Policy>
inline RealType quantile(const students_t_distribution<RealType, Policy>& dist, const RealType& p)
{
BOOST_MATH_STD_USING // for ADL of std functions
//
// Obtain parameters:
RealType probability = p;
// Check for domain errors:
RealType df = dist.degrees_of_freedom();
static const char* function = "boost::math::quantile(const students_t_distribution<%1%>&, %1%)";
RealType error_result;
if(false == (detail::check_df_gt0_to_inf( // Check that df > 0 or == +infinity.
function, df, &error_result, Policy())
&& detail::check_probability(function, probability, &error_result, Policy())))
return error_result;
// Special cases, regardless of degrees_of_freedom.
if (probability == 0)
return -policies::raise_overflow_error<RealType>(function, 0, Policy());
if (probability == 1)
return policies::raise_overflow_error<RealType>(function, 0, Policy());
if (probability == static_cast<RealType>(0.5))
return 0; //
//
#if 0
// This next block is disabled in favour of a faster method than
// incomplete beta inverse, but code retained for future reference:
//
// Calculate quantile of Student's t using the incomplete beta function inverse:
//
probability = (probability > 0.5) ? 1 - probability : probability;
RealType t, x, y;
x = ibeta_inv(degrees_of_freedom / 2, RealType(0.5), 2 * probability, &y);
if(degrees_of_freedom * y > tools::max_value<RealType>() * x)
t = tools::overflow_error<RealType>(function);
else
t = sqrt(degrees_of_freedom * y / x);
//
// Figure out sign based on the size of p:
//
if(p < 0.5)
t = -t;
return t;
#endif
//
// Depending on how many digits RealType has, this may forward
// to the incomplete beta inverse as above. Otherwise uses a
// faster method that is accurate to ~15 digits everywhere
// and a couple of epsilon at double precision and in the central
// region where most use cases will occur...
//
return boost::math::detail::fast_students_t_quantile(df, probability, Policy());
} // quantile
template <class RealType, class Policy>
inline RealType cdf(const complemented2_type<students_t_distribution<RealType, Policy>, RealType>& c)
{
return cdf(c.dist, -c.param);
}
template <class RealType, class Policy>
inline RealType quantile(const complemented2_type<students_t_distribution<RealType, Policy>, RealType>& c)
{
return -quantile(c.dist, c.param);
}
//
// Parameter estimation follows:
//
namespace detail{
//
// Functors for finding degrees of freedom:
//
template <class RealType, class Policy>
struct sample_size_func
{
sample_size_func(RealType a, RealType b, RealType s, RealType d)
: alpha(a), beta(b), ratio(s*s/(d*d)) {}
RealType operator()(const RealType& df)
{
if(df <= tools::min_value<RealType>())
{ //
return 1;
}
students_t_distribution<RealType, Policy> t(df);
RealType qa = quantile(complement(t, alpha));
RealType qb = quantile(complement(t, beta));
qa += qb;
qa *= qa;
qa *= ratio;
qa -= (df + 1);
return qa;
}
RealType alpha, beta, ratio;
};
} // namespace detail
template <class RealType, class Policy>
RealType students_t_distribution<RealType, Policy>::find_degrees_of_freedom(
RealType difference_from_mean,
RealType alpha,
RealType beta,
RealType sd,
RealType hint)
{
static const char* function = "boost::math::students_t_distribution<%1%>::find_degrees_of_freedom";
//
// Check for domain errors:
//
RealType error_result;
if(false == detail::check_probability(
function, alpha, &error_result, Policy())
&& detail::check_probability(function, beta, &error_result, Policy()))
return error_result;
if(hint <= 0)
hint = 1;
detail::sample_size_func<RealType, Policy> f(alpha, beta, sd, difference_from_mean);
tools::eps_tolerance<RealType> tol(policies::digits<RealType, Policy>());
boost::uintmax_t max_iter = policies::get_max_root_iterations<Policy>();
std::pair<RealType, RealType> r = tools::bracket_and_solve_root(f, hint, RealType(2), false, tol, max_iter, Policy());
RealType result = r.first + (r.second - r.first) / 2;
if(max_iter >= policies::get_max_root_iterations<Policy>())
{
return policies::raise_evaluation_error<RealType>(function, "Unable to locate solution in a reasonable time:"
" either there is no answer to how many degrees of freedom are required"
" or the answer is infinite. Current best guess is %1%", result, Policy());
}
return result;
}
template <class RealType, class Policy>
inline RealType mode(const students_t_distribution<RealType, Policy>& /*dist*/)
{
// Assume no checks on degrees of freedom are useful (unlike mean).
return 0; // Always zero by definition.
}
template <class RealType, class Policy>
inline RealType median(const students_t_distribution<RealType, Policy>& /*dist*/)
{
// Assume no checks on degrees of freedom are useful (unlike mean).
return 0; // Always zero by definition.
}
// See section 5.1 on moments at http://en.wikipedia.org/wiki/Student%27s_t-distribution
template <class RealType, class Policy>
inline RealType mean(const students_t_distribution<RealType, Policy>& dist)
{ // Revised for https://svn.boost.org/trac/boost/ticket/7177
RealType df = dist.degrees_of_freedom();
if(((boost::math::isnan)(df)) || (df <= 1) )
{ // mean is undefined for moment <= 1!
return policies::raise_domain_error<RealType>(
"boost::math::mean(students_t_distribution<%1%> const&, %1%)",
"Mean is undefined for degrees of freedom < 1 but got %1%.", df, Policy());
return std::numeric_limits<RealType>::quiet_NaN();
}
return 0;
} // mean
template <class RealType, class Policy>
inline RealType variance(const students_t_distribution<RealType, Policy>& dist)
{ // http://en.wikipedia.org/wiki/Student%27s_t-distribution
// Revised for https://svn.boost.org/trac/boost/ticket/7177
RealType df = dist.degrees_of_freedom();
if ((boost::math::isnan)(df) || (df <= 2))
{ // NaN or undefined for <= 2.
return policies::raise_domain_error<RealType>(
"boost::math::variance(students_t_distribution<%1%> const&, %1%)",
"variance is undefined for degrees of freedom <= 2, but got %1%.",
df, Policy());
return std::numeric_limits<RealType>::quiet_NaN(); // Undefined.
}
if ((boost::math::isinf)(df))
{ // +infinity.
return 1;
}
RealType limit = policies::get_epsilon<RealType, Policy>();
// Use policies so that if policy requests lower precision,
// then get the normal distribution approximation earlier.
limit = static_cast<RealType>(1) / limit; // 1/eps
// for 64-bit double 1/eps = 4503599627370496
if (df > limit)
{ // Special case for really big degrees_of_freedom > 1 / eps.
return 1;
}
else
{
return df / (df - 2);
}
} // variance
template <class RealType, class Policy>
inline RealType skewness(const students_t_distribution<RealType, Policy>& dist)
{
RealType df = dist.degrees_of_freedom();
if( ((boost::math::isnan)(df)) || (dist.degrees_of_freedom() <= 3))
{ // Undefined for moment k = 3.
return policies::raise_domain_error<RealType>(
"boost::math::skewness(students_t_distribution<%1%> const&, %1%)",
"Skewness is undefined for degrees of freedom <= 3, but got %1%.",
dist.degrees_of_freedom(), Policy());
return std::numeric_limits<RealType>::quiet_NaN();
}
return 0; // For all valid df, including infinity.
} // skewness
template <class RealType, class Policy>
inline RealType kurtosis(const students_t_distribution<RealType, Policy>& dist)
{
RealType df = dist.degrees_of_freedom();
if(((boost::math::isnan)(df)) || (df <= 4))
{ // Undefined or infinity for moment k = 4.
return policies::raise_domain_error<RealType>(
"boost::math::kurtosis(students_t_distribution<%1%> const&, %1%)",
"Kurtosis is undefined for degrees of freedom <= 4, but got %1%.",
df, Policy());
return std::numeric_limits<RealType>::quiet_NaN(); // Undefined.
}
if ((boost::math::isinf)(df))
{ // +infinity.
return 3;
}
RealType limit = policies::get_epsilon<RealType, Policy>();
// Use policies so that if policy requests lower precision,
// then get the normal distribution approximation earlier.
limit = static_cast<RealType>(1) / limit; // 1/eps
// for 64-bit double 1/eps = 4503599627370496
if (df > limit)
{ // Special case for really big degrees_of_freedom > 1 / eps.
return 3;
}
else
{
//return 3 * (df - 2) / (df - 4); re-arranged to
return 6 / (df - 4) + 3;
}
} // kurtosis
template <class RealType, class Policy>
inline RealType kurtosis_excess(const students_t_distribution<RealType, Policy>& dist)
{
// see http://mathworld.wolfram.com/Kurtosis.html
RealType df = dist.degrees_of_freedom();
if(((boost::math::isnan)(df)) || (df <= 4))
{ // Undefined or infinity for moment k = 4.
return policies::raise_domain_error<RealType>(
"boost::math::kurtosis_excess(students_t_distribution<%1%> const&, %1%)",
"Kurtosis_excess is undefined for degrees of freedom <= 4, but got %1%.",
df, Policy());
return std::numeric_limits<RealType>::quiet_NaN(); // Undefined.
}
if ((boost::math::isinf)(df))
{ // +infinity.
return 0;
}
RealType limit = policies::get_epsilon<RealType, Policy>();
// Use policies so that if policy requests lower precision,
// then get the normal distribution approximation earlier.
limit = static_cast<RealType>(1) / limit; // 1/eps
// for 64-bit double 1/eps = 4503599627370496
if (df > limit)
{ // Special case for really big degrees_of_freedom > 1 / eps.
return 0;
}
else
{
return 6 / (df - 4);
}
}
} // namespace math
} // namespace boost
#ifdef BOOST_MSVC
# pragma warning(pop)
#endif
// This include must be at the end, *after* the accessors
// for this distribution have been defined, in order to
// keep compilers that support two-phase lookup happy.
#include <boost/math/distributions/detail/derived_accessors.hpp>
#endif // BOOST_STATS_STUDENTS_T_HPP
@@ -0,0 +1,10 @@
/*
Copyright Rene Rivera 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_DETAIL_OS_DETECTED
#define BOOST_PREDEF_DETAIL_OS_DETECTED 1
#endif
@@ -0,0 +1,34 @@
// Boost.Units - A C++ library for zero-overhead dimensional analysis and
// unit/quantity manipulation and conversion
//
// Copyright (C) 2003-2008 Matthias Christian Schabel
// Copyright (C) 2008 Steven Watanabe
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#ifndef BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
#define BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
#include <boost/units/systems/si/base.hpp>
#include <boost/units/physical_dimensions/electric_charge.hpp>
namespace boost {
namespace units {
namespace si {
typedef unit<electric_charge_dimension,si::system> electric_charge;
BOOST_UNITS_STATIC_CONSTANT(coulomb,electric_charge);
BOOST_UNITS_STATIC_CONSTANT(coulombs,electric_charge);
} // namespace si
} // namespace units
} // namespace boost
#endif // BOOST_UNITS_SI_ELECTRIC_CHARGE_HPP
@@ -0,0 +1,146 @@
// Copyright Aleksey Gurtovoy 2000-2004
//
// Distributed under the Boost Software License, Version 1.0.
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
//
// *Preprocessed* version of the main "minus.hpp" header
// -- DO NOT modify by hand!
namespace boost { namespace mpl {
template<
typename Tag1
, typename Tag2
>
struct minus_impl
: if_c<
( BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag1)
> BOOST_MPL_AUX_NESTED_VALUE_WKND(int, Tag2)
)
, aux::cast2nd_impl< minus_impl< Tag1,Tag1 >,Tag1, Tag2 >
, aux::cast1st_impl< minus_impl< Tag2,Tag2 >,Tag1, Tag2 >
>::type
{
};
/// for Digital Mars C++/compilers with no CTPS/TTP support
template<> struct minus_impl< na,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct minus_impl< na,Tag >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename Tag > struct minus_impl< Tag,na >
{
template< typename U1, typename U2 > struct apply
{
typedef apply type;
BOOST_STATIC_CONSTANT(int, value = 0);
};
};
template< typename T > struct minus_tag
{
typedef typename T::tag type;
};
template<
typename BOOST_MPL_AUX_NA_PARAM(N1)
, typename BOOST_MPL_AUX_NA_PARAM(N2)
, typename N3 = na, typename N4 = na, typename N5 = na
>
struct minus
: minus< minus< minus< minus< N1,N2 >, N3>, N4>, N5>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(
5
, minus
, ( N1, N2, N3, N4, N5 )
)
};
template<
typename N1, typename N2, typename N3, typename N4
>
struct minus< N1,N2,N3,N4,na >
: minus< minus< minus< N1,N2 >, N3>, N4>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
5
, minus
, ( N1, N2, N3, N4, na )
)
};
template<
typename N1, typename N2, typename N3
>
struct minus< N1,N2,N3,na,na >
: minus< minus< N1,N2 >, N3>
{
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
5
, minus
, ( N1, N2, N3, na, na )
)
};
template<
typename N1, typename N2
>
struct minus< N1,N2,na,na,na >
: minus_impl<
typename minus_tag<N1>::type
, typename minus_tag<N2>::type
>::template apply< N1,N2 >::type
{
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(
5
, minus
, ( N1, N2, na, na, na )
)
};
BOOST_MPL_AUX_NA_SPEC2(2, 5, minus)
}}
namespace boost { namespace mpl {
template<>
struct minus_impl< integral_c_tag,integral_c_tag >
{
template< typename N1, typename N2 > struct apply
: integral_c<
typename aux::largest_int<
typename N1::value_type
, typename N2::value_type
>::type
, ( BOOST_MPL_AUX_VALUE_WKND(N1)::value
- BOOST_MPL_AUX_VALUE_WKND(N2)::value
)
>
{
};
};
}}
@@ -0,0 +1,48 @@
/*=============================================================================
Copyright (c) 2001-2013 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_MAP_TIE_07222005_1247)
#define FUSION_MAP_TIE_07222005_1247
#include <boost/fusion/support/config.hpp>
#include <boost/fusion/container/map/map.hpp>
#if !defined(BOOST_FUSION_HAS_VARIADIC_MAP)
# include <boost/fusion/container/generation/detail/pp_map_tie.hpp>
#else
///////////////////////////////////////////////////////////////////////////////
// C++11 variadic interface
///////////////////////////////////////////////////////////////////////////////
#include <boost/fusion/support/pair.hpp>
namespace boost { namespace fusion
{
namespace result_of
{
template <typename ...Key>
struct map_tie
{
template <typename ...T>
struct apply
{
typedef map<fusion::pair<Key, T&>...> type;
};
};
}
template <typename ...Key, typename ...T>
BOOST_CONSTEXPR BOOST_FUSION_GPU_ENABLED
inline map<fusion::pair<Key, T&>...>
map_tie(T&... arg)
{
typedef map<fusion::pair<Key, T&>...> result_type;
return result_type(arg...);
}
}}
#endif
#endif
@@ -0,0 +1,70 @@
//---------------------------------------------------------------------------//
// 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_LAMBDA_MAKE_PAIR_HPP
#define BOOST_COMPUTE_LAMBDA_MAKE_PAIR_HPP
#include <boost/compute/types/pair.hpp>
namespace boost {
namespace compute {
namespace lambda {
namespace detail {
// function wrapper for make_pair() in lambda expressions
struct make_pair_func
{
template<class Expr, class Args>
struct lambda_result
{
typedef typename proto::result_of::child_c<Expr, 1>::type Arg1;
typedef typename proto::result_of::child_c<Expr, 2>::type Arg2;
typedef typename lambda::result_of<Arg1, Args>::type T1;
typedef typename lambda::result_of<Arg2, Args>::type T2;
typedef std::pair<T1, T2> type;
};
template<class Context, class Arg1, class Arg2>
static void apply(Context &ctx, const Arg1 &arg1, const Arg2 &arg2)
{
typedef typename lambda::result_of<Arg1, typename Context::args_tuple>::type T1;
typedef typename lambda::result_of<Arg2, typename Context::args_tuple>::type T2;
ctx.stream << "boost_make_pair(";
ctx.stream << type_name<T1>() << ", ";
proto::eval(arg1, ctx);
ctx.stream << ", ";
ctx.stream << type_name<T2>() << ", ";
proto::eval(arg2, ctx);
ctx.stream << ")";
}
};
} // end detail namespace
// make_pair(first, second)
template<class Arg1, class Arg2>
inline typename proto::result_of::make_expr<
proto::tag::function, detail::make_pair_func, const Arg1&, const Arg2&
>::type const
make_pair(const Arg1 &first, const Arg2 &second)
{
return proto::make_expr<proto::tag::function>(
detail::make_pair_func(), ::boost::ref(first), ::boost::ref(second)
);
}
} // end lambda namespace
} // end compute namespace
} // end boost namespace
#endif // BOOST_COMPUTE_LAMBDA_MAKE_PAIR_HPP
@@ -0,0 +1,133 @@
/*
[auto_generated]
boost/numeric/odeint/integrate/integrate.hpp
[begin_description]
Convenience methods which choose the stepper for the current ODE.
[end_description]
Copyright 2011-2013 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_INTEGRATE_INTEGRATE_HPP_INCLUDED
#define BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_HPP_INCLUDED
#include <boost/utility/enable_if.hpp>
#include <boost/numeric/odeint/stepper/runge_kutta_dopri5.hpp>
#include <boost/numeric/odeint/stepper/controlled_runge_kutta.hpp>
#include <boost/numeric/odeint/integrate/null_observer.hpp>
#include <boost/numeric/odeint/integrate/integrate_adaptive.hpp>
// for has_value_type trait
#include <boost/numeric/odeint/algebra/detail/extract_value_type.hpp>
namespace boost {
namespace numeric {
namespace odeint {
/*
* ToDo :
*
* determine type of dxdt for units
*
*/
template< class System , class State , class Time , class Observer >
typename boost::enable_if< typename has_value_type<State>::type , size_t >::type
integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
{
typedef controlled_runge_kutta< runge_kutta_dopri5< State , typename State::value_type , State , Time > > stepper_type;
return integrate_adaptive( stepper_type() , system , start_state , start_time , end_time , dt , observer );
}
template< class Value , class System , class State , class Time , class Observer >
size_t
integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
{
typedef controlled_runge_kutta< runge_kutta_dopri5< State , Value , State , Time > > stepper_type;
return integrate_adaptive( stepper_type() , system , start_state , start_time , end_time , dt , observer );
}
/*
* the two overloads are needed in order to solve the forwarding problem
*/
template< class System , class State , class Time >
size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
{
return integrate( system , start_state , start_time , end_time , dt , null_observer() );
}
template< class Value , class System , class State , class Time >
size_t integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
{
return integrate< Value >( system , start_state , start_time , end_time , dt , null_observer() );
}
/**
* \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt , Observer observer )
* \brief Integrates the ODE.
*
* Integrates the ODE given by system from start_time to end_time starting
* with start_state as initial condition and dt as initial time step.
* This function uses a dense output dopri5 stepper and performs an adaptive
* integration with step size control, thus dt changes during the integration.
* This method uses standard error bounds of 1E-6.
* After each step, the observer is called.
*
* \attention A second version of this function template exists which explicitly
* expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt , obs );
*
* \param system The system function to solve, hence the r.h.s. of the
* ordinary differential equation.
* \param start_state The initial state.
* \param start_time Start time of the integration.
* \param end_time End time of the integration.
* \param dt Initial step size, will be adjusted during the integration.
* \param observer Observer that will be called after each time step.
* \return The number of steps performed.
*/
/**
* \fn integrate( System system , State &start_state , Time start_time , Time end_time , Time dt )
* \brief Integrates the ODE without observer calls.
*
* Integrates the ODE given by system from start_time to end_time starting
* with start_state as initial condition and dt as initial time step.
* This function uses a dense output dopri5 stepper and performs an adaptive
* integration with step size control, thus dt changes during the integration.
* This method uses standard error bounds of 1E-6.
* No observer is called.
*
* \attention A second version of this function template exists which explicitly
* expects the value type as template parameter, i.e. integrate< double >( sys , x , t0 , t1 , dt );
*
* \param system The system function to solve, hence the r.h.s. of the
* ordinary differential equation.
* \param start_state The initial state.
* \param start_time Start time of the integration.
* \param end_time End time of the integration.
* \param dt Initial step size, will be adjusted during the integration.
* \return The number of steps performed.
*/
} // namespace odeint
} // namespace numeric
} // namespace boost
#endif // BOOST_NUMERIC_ODEINT_INTEGRATE_INTEGRATE_HPP_INCLUDED
@@ -0,0 +1,5 @@
<!DOCTYPE RCC>
<RCC version="1.0">
<qresource>@message_aggregator_RESOURCES@
</qresource>
</RCC>
@@ -0,0 +1,48 @@
// 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) 2007-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_MOLE_BASE_UNIT_HPP
#define BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP
#include <string>
#include <boost/units/config.hpp>
#include <boost/units/base_unit.hpp>
#include <boost/units/physical_dimensions/amount.hpp>
namespace boost {
namespace units {
namespace si {
struct mole_base_unit : public base_unit<mole_base_unit, amount_dimension, -4>
{
static std::string name() { return("mole"); }
static std::string symbol() { return("mol"); }
};
} // namespace si
} // namespace units
} // namespace boost
#if BOOST_UNITS_HAS_BOOST_TYPEOF
#include BOOST_TYPEOF_INCREMENT_REGISTRATION_GROUP()
BOOST_TYPEOF_REGISTER_TYPE(boost::units::si::mole_base_unit)
#endif
//#include <boost/units/base_units/detail/conversions.hpp>
#endif // BOOST_UNITS_SI_MOLE_BASE_UNIT_HPP
@@ -0,0 +1,58 @@
#ifndef BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
#define BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
// Copyright Aleksey Gurtovoy 2002-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/if.hpp>
#include <boost/mpl/bool.hpp>
#include <boost/mpl/aux_/type_wrapper.hpp>
#include <boost/mpl/aux_/yes_no.hpp>
#include <boost/type_traits/is_reference.hpp>
namespace boost { namespace mpl { namespace aux {
template< typename T > struct is_class_helper
{
typedef int (T::* type)();
};
// MSVC 6.x-specific lightweight 'is_class' implementation;
// Distinguishing feature: does not instantiate the type being tested.
template< typename T >
struct msvc_is_class_impl
{
template< typename U>
static yes_tag test(type_wrapper<U>*, /*typename*/ is_class_helper<U>::type = 0);
static no_tag test(void const volatile*, ...);
enum { value = sizeof(test((type_wrapper<T>*)0)) == sizeof(yes_tag) };
typedef bool_<value> type;
};
// agurt, 17/sep/04: have to check for 'is_reference' upfront to avoid ICEs in
// complex metaprograms
template< typename T >
struct msvc_is_class
: if_<
is_reference<T>
, false_
, msvc_is_class_impl<T>
>::type
{
};
}}}
#endif // BOOST_MPL_AUX_MSVC_IS_CLASS_HPP_INCLUDED
@@ -0,0 +1,73 @@
// config.hpp --------------------------------------------------------------//
// Copyright 2013 Andrey Semashev
// Distributed under the Boost Software License, Version 1.0.
// See http://www.boost.org/LICENSE_1_0.txt
#ifndef BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
#define BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
#if defined __MINGW32__
#include <_mingw.h>
#endif
// BOOST_WINAPI_IS_MINGW indicates that the target Windows SDK is provided by MinGW (http://mingw.org/).
// BOOST_WINAPI_IS_MINGW_W64 indicates that the target Windows SDK is provided by MinGW-w64 (http://mingw-w64.org).
#if defined __MINGW32__
#if defined __MINGW64_VERSION_MAJOR
#define BOOST_WINAPI_IS_MINGW_W64
#else
#define BOOST_WINAPI_IS_MINGW
#endif
#endif
// These constants reflect _WIN32_WINNT_* macros from sdkddkver.h
// See also: http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745%28v=vs.85%29.aspx#setting_winver_or__win32_winnt
#define BOOST_WINAPI_VERSION_NT4 0x0400
#define BOOST_WINAPI_VERSION_WIN2K 0x0500
#define BOOST_WINAPI_VERSION_WINXP 0x0501
#define BOOST_WINAPI_VERSION_WS03 0x0502
#define BOOST_WINAPI_VERSION_WIN6 0x0600
#define BOOST_WINAPI_VERSION_VISTA 0x0600
#define BOOST_WINAPI_VERSION_WS08 0x0600
#define BOOST_WINAPI_VERSION_LONGHORN 0x0600
#define BOOST_WINAPI_VERSION_WIN7 0x0601
#define BOOST_WINAPI_VERSION_WIN8 0x0602
#define BOOST_WINAPI_VERSION_WINBLUE 0x0603
#define BOOST_WINAPI_VERSION_WINTHRESHOLD 0x0A00
#define BOOST_WINAPI_VERSION_WIN10 0x0A00
#if !defined(BOOST_USE_WINAPI_VERSION)
#if defined(_WIN32_WINNT)
#define BOOST_USE_WINAPI_VERSION _WIN32_WINNT
#elif defined(WINVER)
#define BOOST_USE_WINAPI_VERSION WINVER
#else
// By default use Windows Vista API on compilers that support it and XP on the others
#if (defined(_MSC_VER) && _MSC_VER < 1500) || defined(BOOST_WINAPI_IS_MINGW)
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WINXP
#else
#define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN6
#endif
#endif
#endif
#if defined(BOOST_USE_WINDOWS_H)
// We have to define the version macros so that windows.h provides the necessary symbols
#if !defined(_WIN32_WINNT)
#define _WIN32_WINNT BOOST_USE_WINAPI_VERSION
#endif
#if !defined(WINVER)
#define WINVER BOOST_USE_WINAPI_VERSION
#endif
#endif
#include <boost/config.hpp>
#ifdef BOOST_HAS_PRAGMA_ONCE
#pragma once
#endif
#endif // BOOST_DETAIL_WINAPI_CONFIG_HPP_INCLUDED_
@@ -0,0 +1,41 @@
#ifndef BOOST_MPL_INSERT_HPP_INCLUDED
#define BOOST_MPL_INSERT_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$
#include <boost/mpl/insert_fwd.hpp>
#include <boost/mpl/sequence_tag.hpp>
#include <boost/mpl/aux_/insert_impl.hpp>
#include <boost/mpl/aux_/na_spec.hpp>
#include <boost/mpl/aux_/lambda_support.hpp>
namespace boost { namespace mpl {
template<
typename BOOST_MPL_AUX_NA_PARAM(Sequence)
, typename BOOST_MPL_AUX_NA_PARAM(Pos_or_T)
, typename BOOST_MPL_AUX_NA_PARAM(T)
>
struct insert
: insert_impl< typename sequence_tag<Sequence>::type >
::template apply< Sequence,Pos_or_T,T >
{
BOOST_MPL_AUX_LAMBDA_SUPPORT(3,insert,(Sequence,Pos_or_T,T))
};
BOOST_MPL_AUX_NA_SPEC(3, insert)
}}
#endif // BOOST_MPL_INSERT_HPP_INCLUDED
@@ -0,0 +1,33 @@
/*=============================================================================
Copyright (c) 2011 Eric Niebler
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
{
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30>
struct vector31;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31>
struct vector32;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32>
struct vector33;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33>
struct vector34;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34>
struct vector35;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35>
struct vector36;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36>
struct vector37;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37>
struct vector38;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38>
struct vector39;
template <typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39>
struct vector40;
}}
@@ -0,0 +1,53 @@
// (C) Copyright Tobias Schwinger
//
// Use modification and distribution are subject to the boost Software License,
// Version 1.0. (See http://www.boost.org/LICENSE_1_0.txt).
//------------------------------------------------------------------------------
// no include guards, this file is intended for multiple inclusion
// input: BOOST_FT_syntax type macro to use
// input: BOOST_FT_cc empty or cc specifier
// input: BOOST_FT_ell empty or "..."
// input: BOOST_FT_cv empty or cv qualifiers
// input: BOOST_FT_flags single decimal integer encoding the flags
// output: BOOST_FT_n number of component types (arity+1)
// output: BOOST_FT_arity current arity
// output: BOOST_FT_type macro that expands to the type
// output: BOOST_FT_tplargs(p) template arguments with given prefix
// output: BOOST_FT_params(p) parameters with given prefix
# include <boost/function_types/detail/classifier_impl/arity30_0.hpp>
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,31> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,32> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,33> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,34> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,35> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,36> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,37> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,38> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,39> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 BOOST_FT_ell) BOOST_FT_cv);
template< typename R , typename T0 , typename T1 , typename T2 , typename T3 , typename T4 , typename T5 , typename T6 , typename T7 , typename T8 , typename T9 , typename T10 , typename T11 , typename T12 , typename T13 , typename T14 , typename T15 , typename T16 , typename T17 , typename T18 , typename T19 , typename T20 , typename T21 , typename T22 , typename T23 , typename T24 , typename T25 , typename T26 , typename T27 , typename T28 , typename T29 , typename T30 , typename T31 , typename T32 , typename T33 , typename T34 , typename T35 , typename T36 , typename T37 , typename T38 , typename T39 >
typename encode_charr<BOOST_FT_flags,BOOST_FT_cc_id,40> ::type
classifier_impl(BOOST_FT_syntax(BOOST_FT_cc, BOOST_PP_EMPTY) (T0 , T1 , T2 , T3 , T4 , T5 , T6 , T7 , T8 , T9 , T10 , T11 , T12 , T13 , T14 , T15 , T16 , T17 , T18 , T19 , T20 , T21 , T22 , T23 , T24 , T25 , T26 , T27 , T28 , T29 , T30 , T31 , T32 , T33 , T34 , T35 , T36 , T37 , T38 , T39 BOOST_FT_ell) BOOST_FT_cv);
Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

@@ -0,0 +1,70 @@
// boost/system/config.hpp -----------------------------------------------------------//
// Copyright Beman Dawes 2003, 2006
// 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/system for documentation.
#ifndef BOOST_SYSTEM_CONFIG_HPP
#define BOOST_SYSTEM_CONFIG_HPP
#include <boost/config.hpp>
#include <boost/predef/platform.h>
#include <boost/system/api_config.hpp> // for BOOST_POSIX_API or BOOST_WINDOWS_API
// This header implements separate compilation features as described in
// http://www.boost.org/more/separate_compilation.html
// normalize macros ------------------------------------------------------------------//
#if !defined(BOOST_SYSTEM_DYN_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK) \
&& !defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_ALL_STATIC_LINK)
# define BOOST_SYSTEM_STATIC_LINK
#endif
#if defined(BOOST_ALL_DYN_LINK) && !defined(BOOST_SYSTEM_DYN_LINK)
# define BOOST_SYSTEM_DYN_LINK
#elif defined(BOOST_ALL_STATIC_LINK) && !defined(BOOST_SYSTEM_STATIC_LINK)
# define BOOST_SYSTEM_STATIC_LINK
#endif
#if defined(BOOST_SYSTEM_DYN_LINK) && defined(BOOST_SYSTEM_STATIC_LINK)
# error Must not define both BOOST_SYSTEM_DYN_LINK and BOOST_SYSTEM_STATIC_LINK
#endif
// enable dynamic or static linking as requested --------------------------------------//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
# if defined(BOOST_SYSTEM_SOURCE)
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_EXPORT
# else
# define BOOST_SYSTEM_DECL BOOST_SYMBOL_IMPORT
# endif
#else
# define BOOST_SYSTEM_DECL
#endif
// enable automatic library variant selection ----------------------------------------//
#if !defined(BOOST_SYSTEM_SOURCE) && !defined(BOOST_ALL_NO_LIB) && !defined(BOOST_SYSTEM_NO_LIB)
//
// Set the name of our library, this will get undef'ed by auto_link.hpp
// once it's done with it:
//
#define BOOST_LIB_NAME boost_system
//
// If we're importing code from a dll, then tell auto_link.hpp about it:
//
#if defined(BOOST_ALL_DYN_LINK) || defined(BOOST_SYSTEM_DYN_LINK)
# define BOOST_DYN_LINK
#endif
//
// And include the header that does the work:
//
#include <boost/config/auto_link.hpp>
#endif // auto-linking disabled
#endif // BOOST_SYSTEM_CONFIG_HPP
@@ -0,0 +1,32 @@
JT4 JT9 9+65 JT65 QRA SCAT M144 WSPR Echo
---------------------------------------------------------------------
0. txFirstCheckBox 11 111 1 11 11 11 1
1. TxFreqSpinBox 11 111 1 11 11
2. RxFreqSpinBox 11 111 1 11 11 1
3. sbFtol 1 11 1 11 11 1
4. rptSpinBox 11 111 1 11 11 11 1
5. sbTR 11 1
6. sbCQRxFreq 1
7. cbShMsgs 1 1
8. cbFast9 11
9. cbAutoSeq 1
10. cbTx6 1
11. pbTxMode 1
12. pbR2T 11 11 1 11 11
13. pbT2R 11 11 1 11 11
14. cbTxLock 1 11 1 11 11
15. sbSubMode 1 1 1 11 11
16. syncSpinBox 1 1 1 11 11
17. WSPR_Controls_Widget 1
18. ClrAvgButton 11 1
---------------------------------------------------------------------
19. FastNormalDeep 11 11 1 11 1 1
20. IncludeAveraging 1 1
21. IncludeCorrelation 1 1
22. EchoGraph 1
---------------------------------------------------------------------
For each mode:
Column 1 applies when VHF features is OFF (or col 2 absent)
Column 2 (if present) applies when VHF features is ON
Column 3 (JT9 only) applies for submodes E-H with Fast checked