Initial Commit
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
// 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_PRESSURE_HPP
|
||||
#define BOOST_UNITS_SI_PRESSURE_HPP
|
||||
|
||||
#include <boost/units/systems/si/base.hpp>
|
||||
#include <boost/units/physical_dimensions/pressure.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
namespace si {
|
||||
|
||||
typedef unit<pressure_dimension,si::system> pressure;
|
||||
|
||||
// windef.h #defines pascal on Metrowerks compilers
|
||||
#if defined(__MWERKS__)
|
||||
#if !__option(only_std_keywords)
|
||||
#define BOOST_UNITS_NO_PASCAL 1
|
||||
#elif defined(pascal)
|
||||
#define BOOST_UNITS_NO_PASCAL 1
|
||||
#endif
|
||||
#elif defined(pascal)
|
||||
#define BOOST_UNITS_NO_PASCAL 1
|
||||
#elif BOOST_MSVC
|
||||
#define BOOST_UNITS_NO_PASCAL 1
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_UNITS_NO_PASCAL
|
||||
BOOST_UNITS_STATIC_CONSTANT(pascal,pressure);
|
||||
#endif
|
||||
BOOST_UNITS_STATIC_CONSTANT(pascals,pressure);
|
||||
|
||||
} // namespace si
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_SI_PRESSURE_HPP
|
||||
@@ -0,0 +1,39 @@
|
||||
/*=============================================================================
|
||||
Copyright (c) 2007 Tobias Schwinger
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
#if !defined(BOOST_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED)
|
||||
#define BOOST_FUSION_ITERATOR_RANGE_VALUE_AT_IMPL_HPP_INCLUDED
|
||||
|
||||
#include <boost/fusion/support/config.hpp>
|
||||
#include <boost/fusion/iterator/advance.hpp>
|
||||
#include <boost/fusion/iterator/value_of.hpp>
|
||||
|
||||
namespace boost { namespace fusion
|
||||
{
|
||||
struct iterator_range_tag;
|
||||
|
||||
namespace extension
|
||||
{
|
||||
template <typename Tag>
|
||||
struct value_at_impl;
|
||||
|
||||
template <>
|
||||
struct value_at_impl<iterator_range_tag>
|
||||
{
|
||||
template <typename Seq, typename N>
|
||||
struct apply
|
||||
{
|
||||
typedef typename Seq::begin_type begin_type;
|
||||
typedef typename result_of::advance<begin_type,N>::type pos;
|
||||
typedef typename result_of::value_of<pos>::type type;
|
||||
};
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
<table cellpadding=5>
|
||||
<tr>
|
||||
<th align="right">Click on</th>
|
||||
<th align="left">Action</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Waterfall:</td>
|
||||
<td><b>Click</b> to set the Rx frequency.<br/>
|
||||
<b>Shift-click</b> to set Tx frequency.<br/>
|
||||
<b>Ctrl-click</b> to set Rx and Tx frequencies.<br/>
|
||||
<b>Double-click</b> to decode at resulting Rx frequency.<br/>
|
||||
If <b>Lock Tx=Rx</b> is checked all actions set Tx/Rx.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Decoded text:</td>
|
||||
<td><b>Double-click</b> to copy second callsign to Dx Call,<br/>
|
||||
locator to Dx Grid; change Rx and Tx frequencies to<br/>
|
||||
decoded signal's frequency; generate standard messages.<br/>
|
||||
If first callsign is your own, Tx frequency is not<br/>
|
||||
changed unless <b>Ctrl</b> is held down when double-clicking.<br/>
|
||||
<br/>
|
||||
<b>Alt-Double-click</b> to move only Rx frequency when<br/>
|
||||
replying to a CQ or QRZ caller.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="right">Erase button:</td>
|
||||
<td><b>Click</b> to erase QSO window.<br/>
|
||||
<b>Double-click</b> to erase QSO and Band Activity windows.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
@@ -0,0 +1,110 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// This code comes from N1953 document by Howard E. Hinnant
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
#ifndef BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
|
||||
#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/container/detail/config_begin.hpp>
|
||||
#include <boost/container/detail/workaround.hpp>
|
||||
|
||||
#include <boost/container/detail/mpl.hpp>
|
||||
#include <boost/container/detail/type_traits.hpp>
|
||||
|
||||
namespace boost{
|
||||
namespace container {
|
||||
namespace container_detail {
|
||||
|
||||
template <class T, unsigned V>
|
||||
struct version_type
|
||||
: public container_detail::integral_constant<unsigned, V>
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
version_type(const version_type<T, 0>&);
|
||||
};
|
||||
|
||||
namespace impl{
|
||||
|
||||
template <class T,
|
||||
bool = container_detail::is_convertible<version_type<T, 0>, typename T::version>::value>
|
||||
struct extract_version
|
||||
{
|
||||
static const unsigned value = 1;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct extract_version<T, true>
|
||||
{
|
||||
static const unsigned value = T::version::value;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct has_version
|
||||
{
|
||||
private:
|
||||
struct two {char _[2];};
|
||||
template <class U> static two test(...);
|
||||
template <class U> static char test(const typename U::version*);
|
||||
public:
|
||||
static const bool value = sizeof(test<T>(0)) == 1;
|
||||
void dummy(){}
|
||||
};
|
||||
|
||||
template <class T, bool = has_version<T>::value>
|
||||
struct version
|
||||
{
|
||||
static const unsigned value = 1;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct version<T, true>
|
||||
{
|
||||
static const unsigned value = extract_version<T>::value;
|
||||
};
|
||||
|
||||
} //namespace impl
|
||||
|
||||
template <class T>
|
||||
struct version
|
||||
: public container_detail::integral_constant<unsigned, impl::version<T>::value>
|
||||
{};
|
||||
|
||||
template<class T, unsigned N>
|
||||
struct is_version
|
||||
{
|
||||
static const bool value =
|
||||
is_same< typename version<T>::type, integral_constant<unsigned, N> >::value;
|
||||
};
|
||||
|
||||
} //namespace container_detail {
|
||||
|
||||
typedef container_detail::integral_constant<unsigned, 0> version_0;
|
||||
typedef container_detail::integral_constant<unsigned, 1> version_1;
|
||||
typedef container_detail::integral_constant<unsigned, 2> version_2;
|
||||
|
||||
} //namespace container {
|
||||
} //namespace boost{
|
||||
|
||||
#include <boost/container/detail/config_end.hpp>
|
||||
|
||||
#endif //#define BOOST_CONTAINER_DETAIL_VERSION_TYPE_HPP
|
||||
@@ -0,0 +1,126 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
// boost variant/recursive_wrapper_fwd.hpp header file
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
//-----------------------------------------------------------------------------
|
||||
//
|
||||
// Copyright (c) 2002 Eric Friedman, Itay Maman
|
||||
// Copyright (c) 2016 Antony Polukhin
|
||||
//
|
||||
// Portions Copyright (C) 2002 David Abrahams
|
||||
//
|
||||
// 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_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
||||
#define BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
||||
|
||||
#include <boost/mpl/bool.hpp>
|
||||
#include <boost/mpl/aux_/config/ctps.hpp>
|
||||
#include <boost/mpl/aux_/lambda_support.hpp>
|
||||
#include <boost/type_traits/integral_constant.hpp>
|
||||
#include <boost/type_traits/is_constructible.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// class template recursive_wrapper
|
||||
//
|
||||
// Enables recursive types in templates by breaking cyclic dependencies.
|
||||
//
|
||||
// For example:
|
||||
//
|
||||
// class my;
|
||||
//
|
||||
// typedef variant< int, recursive_wrapper<my> > var;
|
||||
//
|
||||
// class my {
|
||||
// var var_;
|
||||
// ...
|
||||
// };
|
||||
//
|
||||
template <typename T> class recursive_wrapper;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_constructible partial specializations.
|
||||
//
|
||||
// recursive_wrapper<T> is constructible only from T and recursive_wrapper<T>.
|
||||
//
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, T> : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, const T> : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, T&> : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, const T&> : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T> > : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T> > : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<T>& > : boost::true_type{};
|
||||
template <class T> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<T>& > : boost::true_type{};
|
||||
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, U > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, U& > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const U& > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U> > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U> > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, recursive_wrapper<U>& > : boost::false_type{};
|
||||
template <class T, class U> struct is_constructible<recursive_wrapper<T>, const recursive_wrapper<U>& > : boost::false_type{};
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction is_recursive_wrapper (modeled on code by David Abrahams)
|
||||
//
|
||||
// True if specified type matches recursive_wrapper<T>.
|
||||
//
|
||||
|
||||
namespace detail {
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_wrapper_impl
|
||||
: mpl::false_
|
||||
{
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct is_recursive_wrapper_impl< recursive_wrapper<T> >
|
||||
: mpl::true_
|
||||
{
|
||||
};
|
||||
|
||||
|
||||
} // namespace detail
|
||||
|
||||
template< typename T > struct is_recursive_wrapper
|
||||
: public ::boost::integral_constant<bool,(::boost::detail::is_recursive_wrapper_impl<T>::value)>
|
||||
{
|
||||
public:
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_recursive_wrapper,(T))
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// metafunction unwrap_recursive
|
||||
//
|
||||
// If specified type T matches recursive_wrapper<U>, then U; else T.
|
||||
//
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct unwrap_recursive
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT(1,unwrap_recursive,(T))
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct unwrap_recursive< recursive_wrapper<T> >
|
||||
{
|
||||
typedef T type;
|
||||
|
||||
BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,unwrap_recursive,(T))
|
||||
};
|
||||
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_VARIANT_RECURSIVE_WRAPPER_FWD_HPP
|
||||
@@ -0,0 +1,324 @@
|
||||
#include "echoplot.h"
|
||||
#include "commons.h"
|
||||
#include <math.h>
|
||||
#include <QDebug>
|
||||
#include "moc_echoplot.cpp"
|
||||
|
||||
#define MAX_SCREENSIZE 2048
|
||||
|
||||
|
||||
EPlotter::EPlotter(QWidget *parent) : //EPlotter Constructor
|
||||
QFrame(parent)
|
||||
{
|
||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
|
||||
setFocusPolicy(Qt::StrongFocus);
|
||||
setAttribute(Qt::WA_PaintOnScreen,false);
|
||||
setAutoFillBackground(false);
|
||||
setAttribute(Qt::WA_OpaquePaintEvent, false);
|
||||
setAttribute(Qt::WA_NoSystemBackground, true);
|
||||
|
||||
m_StartFreq = -200;
|
||||
m_fftBinWidth=12000.0/32768.0;
|
||||
m_binsPerPixel=1;
|
||||
m_fSpan=1000.0;
|
||||
m_hdivs = HORZ_DIVS;
|
||||
m_Running = false;
|
||||
m_paintEventBusy=false;
|
||||
m_2DPixmap = QPixmap(0,0);
|
||||
m_ScalePixmap = QPixmap(0,0);
|
||||
m_OverlayPixmap = QPixmap(0,0);
|
||||
m_Size = QSize(0,0);
|
||||
m_TxFreq = 1500;
|
||||
m_line = 0;
|
||||
m_dBStepSize=10;
|
||||
}
|
||||
|
||||
EPlotter::~EPlotter() { } // Destructor
|
||||
|
||||
QSize EPlotter::minimumSizeHint() const
|
||||
{
|
||||
return QSize(50, 50);
|
||||
}
|
||||
|
||||
QSize EPlotter::sizeHint() const
|
||||
{
|
||||
return QSize(180, 180);
|
||||
}
|
||||
|
||||
void EPlotter::resizeEvent(QResizeEvent* ) //resizeEvent()
|
||||
{
|
||||
if(!size().isValid()) return;
|
||||
if( m_Size != size() ) { //if changed, resize pixmaps to new screensize
|
||||
m_Size = size();
|
||||
m_w = m_Size.width();
|
||||
m_h = m_Size.height();
|
||||
m_h1=30;
|
||||
m_h2=m_h-m_h1;
|
||||
m_2DPixmap = QPixmap(m_Size.width(), m_h2);
|
||||
m_2DPixmap.fill(Qt::black);
|
||||
m_OverlayPixmap = QPixmap(m_Size.width(), m_h2);
|
||||
m_ScalePixmap = QPixmap(m_w,30);
|
||||
m_ScalePixmap.fill(Qt::white);
|
||||
m_fSpan=m_w*m_fftBinWidth*m_binsPerPixel;
|
||||
m_StartFreq=50 * int((-0.5*m_fSpan)/50.0 - 0.5);
|
||||
}
|
||||
DrawOverlay();
|
||||
draw();
|
||||
}
|
||||
|
||||
void EPlotter::paintEvent(QPaintEvent *) // paintEvent()
|
||||
{
|
||||
if(m_paintEventBusy) return;
|
||||
m_paintEventBusy=true;
|
||||
QPainter painter(this);
|
||||
painter.drawPixmap(0,0,m_ScalePixmap);
|
||||
painter.drawPixmap(0,m_h1,m_2DPixmap);
|
||||
m_paintEventBusy=false;
|
||||
}
|
||||
|
||||
void EPlotter::draw() //draw()
|
||||
{
|
||||
int i,j,y;
|
||||
float blue[4096],red[4096];
|
||||
float gain = pow(10.0,(m_plotGain/20.0));
|
||||
QPen penBlue(QColor(0,255,255),1);
|
||||
QPen penRed(Qt::red,1);
|
||||
QPen penRed2(Qt::red,2);
|
||||
QPen penBlack(Qt::black,1);
|
||||
QPen penBlack2(Qt::black,2);
|
||||
|
||||
if(m_2DPixmap.size().width()==0) return;
|
||||
QPainter painter2D(&m_2DPixmap);
|
||||
QRect tmp(0,0,m_w,m_h2);
|
||||
if(m_nColor < 2) {
|
||||
painter2D.fillRect(tmp,Qt::black);
|
||||
} else {
|
||||
painter2D.fillRect(tmp,Qt::white);
|
||||
painter2D.setPen(penBlack);
|
||||
painter2D.drawLine(0,0,m_w,0);
|
||||
}
|
||||
|
||||
QPoint LineBuf[MAX_SCREENSIZE];
|
||||
|
||||
if(m_binsPerPixel==0) m_binsPerPixel=1;
|
||||
j=0;
|
||||
for(i=0; i<4096/m_binsPerPixel; i++) {
|
||||
blue[i]=0.0;
|
||||
red[i]=0.0;
|
||||
for(int k=0; k<m_binsPerPixel; k++) {
|
||||
blue[i]+=echocom_.blue[j];
|
||||
red[i]+=echocom_.red[j];
|
||||
j++;
|
||||
}
|
||||
}
|
||||
if(m_smooth>0) {
|
||||
for(i=0; i<m_smooth; i++) {
|
||||
int n4096=4096;
|
||||
smo121_(blue,&n4096);
|
||||
smo121_(red,&n4096);
|
||||
}
|
||||
}
|
||||
|
||||
// check i0 value! ...
|
||||
int i0=2048/m_binsPerPixel + int(m_StartFreq/(m_fftBinWidth*m_binsPerPixel));
|
||||
if(m_blue) {
|
||||
painter2D.setPen(penBlue);
|
||||
j=0;
|
||||
for(i=0; i<m_w; i++) {
|
||||
y = 0.9*m_h2 - gain*(m_h/10.0)*(blue[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
|
||||
LineBuf[j].setX(i);
|
||||
LineBuf[j].setY(y);
|
||||
j++;
|
||||
}
|
||||
painter2D.drawPolyline(LineBuf,j);
|
||||
}
|
||||
switch (m_nColor) {
|
||||
case 0: painter2D.setPen(penRed); break;
|
||||
case 1: painter2D.setPen(penRed2); break;
|
||||
case 2: painter2D.setPen(penRed); break;
|
||||
case 3: painter2D.setPen(penRed2); break;
|
||||
case 4: painter2D.setPen(penBlack); break;
|
||||
case 5: painter2D.setPen(penBlack2); break;
|
||||
}
|
||||
|
||||
j=0;
|
||||
for(int i=0; i<m_w; i++) {
|
||||
y = 0.9*m_h2 - gain*(m_h/10.0)*(red[i0+i]-1.0) - 0.01*m_h2*m_plotZero;
|
||||
LineBuf[j].setX(i);
|
||||
LineBuf[j].setY(y);
|
||||
j++;
|
||||
}
|
||||
painter2D.drawPolyline(LineBuf,j);
|
||||
update(); //trigger a new paintEvent
|
||||
}
|
||||
|
||||
void EPlotter::DrawOverlay() //DrawOverlay()
|
||||
{
|
||||
if(m_OverlayPixmap.isNull() or m_2DPixmap.isNull()) return;
|
||||
// int w = m_WaterfallPixmap.width();
|
||||
int x,y;
|
||||
|
||||
QRect rect;
|
||||
QPainter painter(&m_OverlayPixmap);
|
||||
painter.initFrom(this);
|
||||
QLinearGradient gradient(0, 0, 0 ,m_h2); //fill background with gradient
|
||||
gradient.setColorAt(1, Qt::black);
|
||||
gradient.setColorAt(0, Qt::darkBlue);
|
||||
painter.setBrush(gradient);
|
||||
painter.drawRect(0, 0, m_w, m_h2);
|
||||
painter.setBrush(Qt::SolidPattern);
|
||||
|
||||
m_fSpan = m_w*m_fftBinWidth*m_binsPerPixel;
|
||||
m_freqPerDiv=20;
|
||||
if(m_fSpan>250) m_freqPerDiv=50;
|
||||
if(m_fSpan>500) m_freqPerDiv=100;
|
||||
if(m_fSpan>1000) m_freqPerDiv=200;
|
||||
if(m_fSpan>2000) m_freqPerDiv=500;
|
||||
|
||||
// m_StartFreq=50 * int((-0.5*m_fSpan)/50.0 - 0.5);
|
||||
m_StartFreq=m_freqPerDiv * int((-0.5*m_fSpan)/m_freqPerDiv - 0.5);
|
||||
|
||||
float pixPerHdiv = m_freqPerDiv/(m_fftBinWidth*m_binsPerPixel);
|
||||
float pixPerVdiv = float(m_h2)/float(VERT_DIVS);
|
||||
|
||||
m_hdivs = m_w*m_fftBinWidth*m_binsPerPixel/m_freqPerDiv + 0.9999;
|
||||
|
||||
painter.setPen(QPen(Qt::white, 1,Qt::DotLine));
|
||||
for( int i=1; i<m_hdivs; i++) //draw vertical grids
|
||||
{
|
||||
x=int(i*pixPerHdiv);
|
||||
painter.drawLine(x,0,x,m_h2);
|
||||
}
|
||||
|
||||
for( int i=1; i<VERT_DIVS; i++) //draw horizontal grids
|
||||
{
|
||||
y = (int)( (float)i*pixPerVdiv );
|
||||
painter.drawLine(0,y,m_w,y);
|
||||
}
|
||||
|
||||
QRect rect0;
|
||||
QPainter painter0(&m_ScalePixmap);
|
||||
painter0.initFrom(this);
|
||||
|
||||
//create Font to use for scales
|
||||
QFont Font("Arial");
|
||||
Font.setPointSize(12);
|
||||
QFontMetrics metrics(Font);
|
||||
Font.setWeight(QFont::Normal);
|
||||
painter0.setFont(Font);
|
||||
painter0.setPen(Qt::black);
|
||||
|
||||
m_ScalePixmap.fill(Qt::white);
|
||||
painter0.drawRect(0, 0, m_w, 30);
|
||||
|
||||
//draw tick marks on upper scale
|
||||
for( int i=1; i<m_hdivs; i++) { //major ticks
|
||||
x = (int)( (float)i*pixPerHdiv );
|
||||
painter0.drawLine(x,18,x,30);
|
||||
}
|
||||
int minor=5;
|
||||
if(m_freqPerDiv==200) minor=4;
|
||||
for( int i=1; i<minor*m_hdivs; i++) { //minor ticks
|
||||
x = i*pixPerHdiv/minor;
|
||||
painter0.drawLine(x,24,x,30);
|
||||
}
|
||||
|
||||
//draw frequency values
|
||||
MakeFrequencyStrs();
|
||||
for( int i=0; i<=m_hdivs; i++) {
|
||||
if(0==i) {
|
||||
//left justify the leftmost text
|
||||
x = (int)( (float)i*pixPerHdiv);
|
||||
rect0.setRect(x,0, (int)pixPerHdiv, 20);
|
||||
painter0.drawText(rect0, Qt::AlignLeft|Qt::AlignVCenter,
|
||||
m_HDivText[i]);
|
||||
}
|
||||
else if(m_hdivs == i) {
|
||||
//right justify the rightmost text
|
||||
x = (int)( (float)i*pixPerHdiv - pixPerHdiv);
|
||||
rect0.setRect(x,0, (int)pixPerHdiv, 20);
|
||||
painter0.drawText(rect0, Qt::AlignRight|Qt::AlignVCenter,
|
||||
m_HDivText[i]);
|
||||
} else {
|
||||
//center justify the rest of the text
|
||||
x = (int)( (float)i*pixPerHdiv - pixPerHdiv/2);
|
||||
rect0.setRect(x,0, (int)pixPerHdiv, 20);
|
||||
painter0.drawText(rect0, Qt::AlignHCenter|Qt::AlignVCenter,
|
||||
m_HDivText[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
QPen pen1(Qt::red, 3); //Mark Tx Freq with red tick
|
||||
painter0.setPen(pen1);
|
||||
x = XfromFreq(m_TxFreq);
|
||||
painter0.drawLine(x,17,x,30);
|
||||
*/
|
||||
}
|
||||
|
||||
void EPlotter::MakeFrequencyStrs() //MakeFrequencyStrs
|
||||
{
|
||||
float freq;
|
||||
for(int i=0; i<=m_hdivs; i++) {
|
||||
freq=m_StartFreq + i*m_freqPerDiv;
|
||||
m_HDivText[i].setNum((int)freq);
|
||||
}
|
||||
}
|
||||
|
||||
int EPlotter::XfromFreq(float f) //XfromFreq()
|
||||
{
|
||||
int x = (int) m_w * (f - m_StartFreq)/m_fSpan;
|
||||
if(x<0 ) return 0;
|
||||
if(x>m_w) return m_w;
|
||||
return x;
|
||||
}
|
||||
|
||||
float EPlotter::FreqfromX(int x) //FreqfromX()
|
||||
{
|
||||
return float(m_StartFreq + x*m_fftBinWidth*m_binsPerPixel);
|
||||
}
|
||||
|
||||
void EPlotter::SetRunningState(bool running) //SetRunningState()
|
||||
{
|
||||
m_Running = running;
|
||||
}
|
||||
|
||||
void EPlotter::setPlotZero(int plotZero) //setPlotZero()
|
||||
{
|
||||
m_plotZero=plotZero;
|
||||
}
|
||||
|
||||
int EPlotter::getPlotZero() //getPlotZero()
|
||||
{
|
||||
return m_plotZero;
|
||||
}
|
||||
|
||||
void EPlotter::setPlotGain(int plotGain) //setPlotGain()
|
||||
{
|
||||
m_plotGain=plotGain;
|
||||
}
|
||||
|
||||
int EPlotter::getPlotGain() //getPlotGain()
|
||||
{
|
||||
return m_plotGain;
|
||||
}
|
||||
|
||||
void EPlotter::setSmooth(int n) //setSmooth()
|
||||
{
|
||||
m_smooth=n;
|
||||
}
|
||||
|
||||
int EPlotter::getSmooth() //getSmooth()
|
||||
{
|
||||
return m_smooth;
|
||||
}
|
||||
|
||||
void EPlotter::setColors(qint32 n) //setSmooth()
|
||||
{
|
||||
m_nColor=n;
|
||||
draw();
|
||||
}
|
||||
|
||||
int EPlotter::plotWidth(){return m_2DPixmap.width();}
|
||||
|
||||
void EPlotter::UpdateOverlay() {DrawOverlay();}
|
||||
@@ -0,0 +1,20 @@
|
||||
// (C) Copyright Steve Cleary, Beman Dawes, Howard Hinnant & John Maddock 2000.
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/utility for most recent version including documentation.
|
||||
|
||||
// See boost/detail/compressed_pair.hpp
|
||||
// for full copyright notices.
|
||||
|
||||
#ifndef BOOST_COMPRESSED_PAIR_HPP
|
||||
#define BOOST_COMPRESSED_PAIR_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#include <boost/detail/compressed_pair.hpp>
|
||||
|
||||
#endif // BOOST_COMPRESSED_PAIR_HPP
|
||||
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/util/stepper_traits.hpp
|
||||
|
||||
[begin_description]
|
||||
tba.
|
||||
[end_description]
|
||||
|
||||
Copyright 2013 Karsten Ahnert
|
||||
Copyright 2013 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_UTIL_STEPPER_TRAITS_HPP_DEFINED
|
||||
#define BOOST_NUMERIC_ODEINT_UTIL_STEPPER_TRAITS_HPP_DEFINED
|
||||
|
||||
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
|
||||
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
namespace traits {
|
||||
|
||||
template< class Stepper >
|
||||
struct state_type
|
||||
{
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< Stepper >::type stepper_type;
|
||||
typedef typename stepper_type::state_type type;
|
||||
};
|
||||
|
||||
template< class Stepper >
|
||||
struct time_type
|
||||
{
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< Stepper >::type stepper_type;
|
||||
typedef typename stepper_type::time_type type;
|
||||
};
|
||||
|
||||
template< class Stepper >
|
||||
struct stepper_category
|
||||
{
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< Stepper >::type stepper_type;
|
||||
typedef typename stepper_type::stepper_category type;
|
||||
};
|
||||
|
||||
template< class Stepper >
|
||||
struct value_type
|
||||
{
|
||||
typedef typename boost::numeric::odeint::unwrap_reference< Stepper >::type stepper_type;
|
||||
typedef typename stepper_type::value_type type;
|
||||
};
|
||||
|
||||
} // namespace traits
|
||||
} // namespace odeint
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_UTIL_STEPPER_TRAITS_HPP_DEFINED
|
||||
@@ -0,0 +1,16 @@
|
||||
// Copyright David Abrahams 2002.
|
||||
// Distributed under the Boost Software License, Version 1.0. (See
|
||||
// accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef VALUE_HOLDER_FWD_DWA2002311_HPP
|
||||
# define VALUE_HOLDER_FWD_DWA2002311_HPP
|
||||
|
||||
namespace boost { namespace python { namespace objects {
|
||||
|
||||
struct no_back_reference;
|
||||
|
||||
template <class CallbackType = no_back_reference> struct value_holder_generator;
|
||||
|
||||
}}} // namespace boost::python::object
|
||||
|
||||
#endif // VALUE_HOLDER_FWD_DWA2002311_HPP
|
||||
@@ -0,0 +1,32 @@
|
||||
// (C) Copyright 2009-2011 Frederic Bron.
|
||||
//
|
||||
// Use, modification and distribution are subject to the Boost Software License,
|
||||
// Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt).
|
||||
//
|
||||
// See http://www.boost.org/libs/type_traits for most recent version including documentation.
|
||||
|
||||
#ifndef BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
|
||||
#define BOOST_TT_HAS_LOGICAL_NOT_HPP_INCLUDED
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800)
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wunused-value"
|
||||
#endif
|
||||
|
||||
#define BOOST_TT_TRAIT_NAME has_logical_not
|
||||
#define BOOST_TT_TRAIT_OP !
|
||||
#define BOOST_TT_FORBIDDEN_IF\
|
||||
false
|
||||
|
||||
#include <boost/type_traits/detail/has_prefix_operator.hpp>
|
||||
|
||||
#undef BOOST_TT_TRAIT_NAME
|
||||
#undef BOOST_TT_TRAIT_OP
|
||||
#undef BOOST_TT_FORBIDDEN_IF
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__ > 40800)
|
||||
#pragma GCC diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
sfrsd.c
|
||||
|
||||
A soft-decision decoder for the JT65 (63,12) Reed-Solomon code.
|
||||
|
||||
This decoding scheme is built around Phil Karn's Berlekamp-Massey
|
||||
errors and erasures decoder. The approach is inspired by a number of
|
||||
publications, including the stochastic Chase decoder described
|
||||
in "Stochastic Chase Decoding of Reed-Solomon Codes", by Leroux et al.,
|
||||
IEEE Communications Letters, Vol. 14, No. 9, September 2010 and
|
||||
"Soft-Decision Decoding of Reed-Solomon Codes Using Successive Error-
|
||||
and-Erasure Decoding," by Soo-Woong Lee and B. V. K. Vijaya Kumar.
|
||||
|
||||
Steve Franke K9AN, Urbana IL, September 2015
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <time.h>
|
||||
#include <string.h>
|
||||
#include "sfrsd2.h"
|
||||
|
||||
//***************************************************************************
|
||||
void usage(void)
|
||||
{
|
||||
printf("Usage: sfrsd [options...] <path to kvasd.dat>\n");
|
||||
printf(" input file should be in kvasd format\n");
|
||||
printf("\n");
|
||||
printf("Options:\n");
|
||||
printf(" -n number of random erasure vectors to try\n");
|
||||
printf(" -v verbose\n");
|
||||
}
|
||||
|
||||
int main(int argc, char *argv[]){
|
||||
|
||||
extern char *optarg;
|
||||
extern int optind;
|
||||
|
||||
int correct[63], indx[63], param[8];
|
||||
int c,i;
|
||||
char *infile;
|
||||
|
||||
FILE *datfile, *logfile;
|
||||
int nsec, maxe, nads;
|
||||
float xlambda;
|
||||
int mrsym[63],mrprob[63],mr2sym[63],mr2prob[63];
|
||||
int nsec2,ncount,dat4[12];
|
||||
int ntrials, nverbose, ntry;
|
||||
int nhard;
|
||||
double tt;
|
||||
|
||||
ntrials=10000;
|
||||
nverbose=1;
|
||||
|
||||
while ( (c = getopt(argc, argv, "n:qv")) !=-1 ) {
|
||||
switch (c) {
|
||||
case 'n':
|
||||
ntrials=(int)strtof(optarg,NULL);
|
||||
printf("ntrials set to %d\n",ntrials);
|
||||
break;
|
||||
case 'v':
|
||||
nverbose=1;
|
||||
break;
|
||||
case 'q': //accept (and ignore) -q option for WSJT10 compatibility
|
||||
break;
|
||||
case '?':
|
||||
usage();
|
||||
exit(1);
|
||||
}
|
||||
}
|
||||
|
||||
if( optind+1 > argc) {
|
||||
// usage();
|
||||
// exit(1);
|
||||
infile="kvasd.dat";
|
||||
} else {
|
||||
infile=argv[optind];
|
||||
}
|
||||
|
||||
logfile=fopen("/tmp/sfrsd.log","a");
|
||||
if( !logfile ) {
|
||||
printf("Unable to open sfrsd.log\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
datfile=fopen(infile,"rb");
|
||||
if( !datfile ) {
|
||||
printf("Unable to open kvasd.dat\n");
|
||||
exit(1);
|
||||
} else {
|
||||
fread(&nsec,sizeof(int),1,datfile);
|
||||
fread(&xlambda,sizeof(float),1,datfile);
|
||||
fread(&maxe,sizeof(int),1,datfile);
|
||||
fread(&nads,sizeof(int),1,datfile);
|
||||
fread(&mrsym,sizeof(int),63,datfile);
|
||||
fread(&mrprob,sizeof(int),63,datfile);
|
||||
fread(&mr2sym,sizeof(int),63,datfile);
|
||||
fread(&mr2prob,sizeof(int),63,datfile);
|
||||
fread(&nsec2,sizeof(int),1,datfile);
|
||||
fread(&ncount,sizeof(int),1,datfile);
|
||||
fread(&dat4,sizeof(int),12,datfile);
|
||||
fclose(datfile);
|
||||
}
|
||||
|
||||
sfrsd2_(mrsym,mrprob,mr2sym,mr2prob,&ntrials,&nverbose,correct,param,indx,&tt,&ntry);
|
||||
nhard=param[1];
|
||||
if( nhard>=0 ) {
|
||||
for (i=0; i<12; i++) {
|
||||
dat4[i]=correct[11-i];
|
||||
}
|
||||
} else {
|
||||
nhard=-1;
|
||||
memset(dat4,0,12*sizeof(int));
|
||||
}
|
||||
datfile=fopen(infile,"wb");
|
||||
if( !datfile ) {
|
||||
printf("Unable to open kvasd.dat\n");
|
||||
return 1;
|
||||
} else {
|
||||
fwrite(&nsec,sizeof(int),1,datfile);
|
||||
fwrite(&xlambda,sizeof(float),1,datfile);
|
||||
fwrite(&maxe,sizeof(int),1,datfile);
|
||||
fwrite(&nads,sizeof(int),1,datfile);
|
||||
fwrite(&mrsym,sizeof(int),63,datfile);
|
||||
fwrite(&mrprob,sizeof(int),63,datfile);
|
||||
fwrite(&mr2sym,sizeof(int),63,datfile);
|
||||
fwrite(&mr2prob,sizeof(int),63,datfile);
|
||||
fwrite(&nsec2,sizeof(int),1,datfile);
|
||||
fwrite(&nhard,sizeof(int),1,datfile);
|
||||
fwrite(&dat4,sizeof(int),12,datfile);
|
||||
fclose(datfile);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
CC = gcc
|
||||
#CC = clang
|
||||
FC = gfortran
|
||||
|
||||
FFLAGS = -O2 -Wall -Wno-conversion
|
||||
CFLAGS= -Wall -Wno-missing-braces -O2
|
||||
#LDFLAGS = -L/JTSDK/fftw3f
|
||||
LIBS = c:/JTSDK/fftw3f/libfftw3-3.dll -lm
|
||||
|
||||
# Default rules
|
||||
%.o: %.c $(DEPS)
|
||||
${CC} ${CFLAGS} -c $<
|
||||
%.o: %.f
|
||||
${FC} ${FFLAGS} -c $<
|
||||
%.o: %.F
|
||||
${FC} ${FFLAGS} -c $<
|
||||
%.o: %.f90
|
||||
${FC} ${FFLAGS} -c $<
|
||||
%.o: %.F90
|
||||
${FC} ${FFLAGS} -c $<
|
||||
|
||||
all: wsprd
|
||||
|
||||
DEPS = fano.h
|
||||
OBJS1 = wsprd.o wsprd_utils.o fano.o tab.o nhash.o
|
||||
wsprd: $(OBJS1)
|
||||
$(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LIBS)
|
||||
|
||||
clean:
|
||||
rm *.o wsprd
|
||||
@@ -0,0 +1,819 @@
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// Copyright 2011 John Maddock. Distributed under the Boost
|
||||
// Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MP_ET_OPS_HPP
|
||||
#define BOOST_MP_ET_OPS_HPP
|
||||
|
||||
namespace boost{ namespace multiprecision{
|
||||
|
||||
//
|
||||
// Non-member operators for number:
|
||||
//
|
||||
// Unary operators first.
|
||||
// Note that these *must* return by value, even though that's somewhat against
|
||||
// existing practice. The issue is that in C++11 land one could easily and legitimately
|
||||
// write:
|
||||
// auto x = +1234_my_user_defined_suffix;
|
||||
// which would result in a dangling-reference-to-temporary if unary + returned a reference
|
||||
// to it's argument. While return-by-value is obviously inefficient in other situations
|
||||
// the reality is that no one ever uses unary operator+ anyway...!
|
||||
//
|
||||
template <class B, expression_template_option ExpressionTemplates>
|
||||
inline BOOST_CONSTEXPR const number<B, ExpressionTemplates> operator + (const number<B, ExpressionTemplates>& v) { return v; }
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline BOOST_CONSTEXPR const detail::expression<tag, Arg1, Arg2, Arg3, Arg4> operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return v; }
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, number<B, et_on> > operator - (const number<B, et_on>& v)
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG(is_signed_number<B>::value, "Negating an unsigned type results in ill-defined behavior.");
|
||||
return detail::expression<detail::negate, number<B, et_on> >(v);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v)
|
||||
{
|
||||
BOOST_STATIC_ASSERT_MSG((is_signed_number<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value), "Negating an unsigned type results in ill-defined behavior.");
|
||||
return detail::expression<detail::negate, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v);
|
||||
}
|
||||
template <class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::complement_immediates, number<B, et_on> > >::type
|
||||
operator ~ (const number<B, et_on>& v) { return detail::expression<detail::complement_immediates, number<B, et_on> >(v); }
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator ~ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& v) { return detail::expression<detail::bitwise_complement, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(v); }
|
||||
//
|
||||
// Then addition:
|
||||
//
|
||||
template <class B>
|
||||
inline detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator + (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, number<B, et_on>, V > >::type
|
||||
operator + (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type
|
||||
operator + (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
||||
operator + (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::plus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
||||
operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
||||
operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator + (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::plus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator + (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::plus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Fused multiply add:
|
||||
//
|
||||
template <class V, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>,
|
||||
detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
||||
operator + (const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a);
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>,
|
||||
detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
||||
operator + (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
||||
operator + (const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a);
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
||||
operator + (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_add, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
||||
}
|
||||
//
|
||||
// Fused multiply subtract:
|
||||
//
|
||||
template <class V, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>,
|
||||
detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> > >::type
|
||||
operator - (const V& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >
|
||||
(detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(b.left(), b.right(), a));
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::result_type>,
|
||||
detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V> >::type
|
||||
operator - (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, V>(a.left(), a.right(), b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >
|
||||
operator - (const number<B, ET>& a, const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> > >
|
||||
(detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(b.left(), b.right(), a));
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >
|
||||
operator - (const detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_subtract, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::left_type, typename detail::expression<detail::multiply_immediates, Arg1, Arg2, Arg3, Arg4>::right_type, number<B, ET> >(a.left(), a.right(), b);
|
||||
}
|
||||
//
|
||||
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
||||
//
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::minus, number<B, ET>, Arg1>
|
||||
operator + (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, number<B, ET>, Arg1>(a, b.left_ref());
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::minus, number<B, ET>, Arg1>
|
||||
operator + (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, number<B, ET>, Arg1>(b, a.left_ref());
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator + (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref());
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref());
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type
|
||||
operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(b, a.left_ref());
|
||||
}
|
||||
template <class B, class B2, expression_template_option ET>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type
|
||||
operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(b, a.left_ref());
|
||||
}
|
||||
template <class B2, expression_template_option ET, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> > >::type
|
||||
operator + (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator + (const detail::expression<detail::negate, number<B, et_on> >& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b.left_ref()));
|
||||
}
|
||||
//
|
||||
// Subtraction:
|
||||
//
|
||||
template <class B>
|
||||
inline detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator - (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, number<B, et_on>, V > >::type
|
||||
operator - (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::subtract_immediates, V, number<B, et_on> > >::type
|
||||
operator - (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::subtract_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
||||
operator - (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
||||
operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
||||
operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator - (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::minus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator - (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::minus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
||||
//
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::plus, number<B, ET>, Arg1>
|
||||
operator - (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::plus, number<B, ET>, Arg1>(a, b.left_ref());
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >
|
||||
operator - (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::plus, number<B, ET>, Arg1> >(
|
||||
detail::expression<detail::plus, number<B, ET>, Arg1>(b, a.left_ref()));
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator - (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref());
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> > >(
|
||||
detail::expression<detail::add_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V > > >::type
|
||||
operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, V > >(detail::expression<detail::add_immediates, number<B, et_on>, V >(a.left_ref(), b));
|
||||
}
|
||||
template <class B, class B2, expression_template_option ET>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
||||
operator - (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> > >(detail::expression<detail::add_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::add_immediates, V, number<B, et_on> > >::type
|
||||
operator - (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, V, number<B, et_on> >(a, b.left_ref());
|
||||
}
|
||||
template <class B2, expression_template_option ET, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> > >::type
|
||||
operator - (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::add_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref());
|
||||
}
|
||||
//
|
||||
// Multiplication:
|
||||
//
|
||||
template <class B>
|
||||
inline detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator * (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::multiply_immediates, number<B, et_on>, V > >::type
|
||||
operator * (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::multiply_immediates, V, number<B, et_on> > >::type
|
||||
operator * (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::multiply_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
||||
operator * (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::multiplies, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
||||
operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
||||
operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator * (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::multiplies, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator * (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::multiplies, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
||||
//
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >
|
||||
operator * (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
||||
detail::expression<detail::multiplies, number<B, ET>, Arg1> (a, b.left_ref()));
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >
|
||||
operator * (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiplies, number<B, ET>, Arg1> >(
|
||||
detail::expression<detail::multiplies, number<B, ET>, Arg1>(b, a.left_ref()));
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator * (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()));
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> > >(
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B, et_on> >(b, a.left_ref()));
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > >::type
|
||||
operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > (
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, V >(a.left_ref(), b));
|
||||
}
|
||||
template <class B, class B2, expression_template_option ET>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
||||
operator * (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > (
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > > >::type
|
||||
operator * (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, V > >(
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, V >(b.left_ref(), a));
|
||||
}
|
||||
template <class B2, expression_template_option ET, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
||||
operator * (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> > >(
|
||||
detail::expression<detail::multiply_immediates, number<B, et_on>, number<B2, ET> >(b.left_ref(), a));
|
||||
}
|
||||
//
|
||||
// Division:
|
||||
//
|
||||
template <class B>
|
||||
inline detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >
|
||||
operator / (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::divide_immediates, number<B, et_on>, V > >::type
|
||||
operator / (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::divide_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::divide_immediates, V, number<B, et_on> > >::type
|
||||
operator / (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, expression_template_option ET, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >
|
||||
operator / (const number<B, ET>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::divides, number<B, ET>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >
|
||||
operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, ET> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >
|
||||
operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator / (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::divides, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>, detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator / (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::divides, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Repeat operator for negated arguments: propagate the negation to the top level to avoid temporaries:
|
||||
//
|
||||
template <class B, expression_template_option ET, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >
|
||||
operator / (const number<B, ET>& a, const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divides, number<B, ET>, Arg1> >(
|
||||
detail::expression<detail::divides, number<B, ET>, Arg1>(a, b.left_ref()));
|
||||
}
|
||||
template <class Arg1, class Arg2, class Arg3, class Arg4, class B, expression_template_option ET>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >
|
||||
operator / (const detail::expression<detail::negate, Arg1, Arg2, Arg3, Arg4>& a, const number<B, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divides, Arg1, number<B, ET> > >(
|
||||
detail::expression<detail::divides, Arg1, number<B, ET> >(a.left_ref(), b));
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator / (const number<B, et_on>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >(
|
||||
detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a, b.left_ref()));
|
||||
}
|
||||
template <class B>
|
||||
inline detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >
|
||||
operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> > >(
|
||||
detail::expression<detail::divide_immediates, number<B, et_on>, number<B, et_on> >(a.left_ref(), b));
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V > > >::type
|
||||
operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, V > >(
|
||||
detail::expression<detail::divide_immediates, number<B, et_on>, V>(a.left_ref(), b));
|
||||
}
|
||||
template <class B, class B2, expression_template_option ET>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > > >::type
|
||||
operator / (const detail::expression<detail::negate, number<B, et_on> >& a, const number<B2, ET>& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> > >(
|
||||
detail::expression<detail::divide_immediates, number<B, et_on>, number<B2, ET> >(a.left_ref(), b));
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<V, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > > >::type
|
||||
operator / (const V& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, V, number<B, et_on> > >(
|
||||
detail::expression<detail::divide_immediates, V, number<B, et_on> >(a, b.left_ref()));
|
||||
}
|
||||
template <class B2, expression_template_option ET, class B>
|
||||
inline typename enable_if<is_compatible_arithmetic_type<number<B2, ET>, number<B, et_on> >, detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > > >::type
|
||||
operator / (const number<B2, ET>& a, const detail::expression<detail::negate, number<B, et_on> >& b)
|
||||
{
|
||||
return detail::expression<detail::negate, detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> > >(
|
||||
detail::expression<detail::divide_immediates, number<B2, ET>, number<B, et_on> >(a, b.left_ref()));
|
||||
}
|
||||
//
|
||||
// Modulus:
|
||||
//
|
||||
template <class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> > >::type
|
||||
operator % (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::modulus_immediates, number<B, et_on>, V > >::type
|
||||
operator % (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::modulus_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value && (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::modulus_immediates, V, number<B, et_on> > >::type
|
||||
operator % (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator % (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
||||
operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
||||
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
||||
operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator % (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::modulus, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator % (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::modulus, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Left shift:
|
||||
//
|
||||
template <class B, class I>
|
||||
inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer), detail::expression<detail::shift_left, number<B, et_on>, I > >::type
|
||||
operator << (const number<B, et_on>& a, const I& b)
|
||||
{
|
||||
return detail::expression<detail::shift_left, number<B, et_on>, I>(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I>
|
||||
inline typename enable_if_c<is_integral<I>::value && (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type
|
||||
operator << (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b)
|
||||
{
|
||||
return detail::expression<detail::shift_left, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b);
|
||||
}
|
||||
//
|
||||
// Right shift:
|
||||
//
|
||||
template <class B, class I>
|
||||
inline typename enable_if_c<is_integral<I>::value && (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::shift_right, number<B, et_on>, I > >::type
|
||||
operator >> (const number<B, et_on>& a, const I& b)
|
||||
{
|
||||
return detail::expression<detail::shift_right, number<B, et_on>, I>(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class I>
|
||||
inline typename enable_if_c<is_integral<I>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I> >::type
|
||||
operator >> (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const I& b)
|
||||
{
|
||||
return detail::expression<detail::shift_right, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, I>(a, b);
|
||||
}
|
||||
//
|
||||
// Bitwise AND:
|
||||
//
|
||||
template <class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> > >::type
|
||||
operator & (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V > >::type
|
||||
operator & (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> > >::type
|
||||
operator & (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator & (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
||||
operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
||||
operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator & (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator & (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_and, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Bitwise OR:
|
||||
//
|
||||
template <class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> > >::type
|
||||
operator| (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V > >::type
|
||||
operator| (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> > >::type
|
||||
operator| (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator| (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
||||
operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
||||
operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator| (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator| (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_or, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
//
|
||||
// Bitwise XOR:
|
||||
//
|
||||
template <class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> > >::type
|
||||
operator^ (const number<B, et_on>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V > >::type
|
||||
operator^ (const number<B, et_on>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor_immediates, number<B, et_on>, V >(a, b);
|
||||
}
|
||||
template <class V, class B>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, number<B, et_on> >::value
|
||||
&& (number_category<B>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> > >::type
|
||||
operator^ (const V& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor_immediates, V, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class B, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator^ (const number<B, et_on>& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor, number<B, et_on>, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class B>
|
||||
inline typename enable_if_c<number_category<B>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> > >::type
|
||||
operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const number<B, et_on>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, number<B, et_on> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class tag2, class Arg1b, class Arg2b, class Arg3b, class Arg4b>
|
||||
inline typename enable_if_c<number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer,
|
||||
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> > >::type
|
||||
operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, detail::expression<tag2, Arg1b, Arg2b, Arg3b, Arg4b> >(a, b);
|
||||
}
|
||||
template <class tag, class Arg1, class Arg2, class Arg3, class Arg4, class V>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer),
|
||||
detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V > >::type
|
||||
operator^ (const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& a, const V& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor, detail::expression<tag, Arg1, Arg2, Arg3, Arg4>, V >(a, b);
|
||||
}
|
||||
template <class V, class tag, class Arg1, class Arg2, class Arg3, class Arg4>
|
||||
inline typename enable_if_c<is_compatible_arithmetic_type<V, typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value
|
||||
&& (number_category<typename detail::expression<tag, Arg1, Arg2, Arg3, Arg4>::result_type>::value == number_kind_integer), detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> > >::type
|
||||
operator^ (const V& a, const detail::expression<tag, Arg1, Arg2, Arg3, Arg4>& b)
|
||||
{
|
||||
return detail::expression<detail::bitwise_xor, V, detail::expression<tag, Arg1, Arg2, Arg3, Arg4> >(a, b);
|
||||
}
|
||||
|
||||
}} // namespaces
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,578 @@
|
||||
/*==============================================================================
|
||||
Copyright (c) 2005-2010 Joel de Guzman
|
||||
Copyright (c) 2010 Thomas Heller
|
||||
Copyright (c) 2016 Kohei Takahashi
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0. (See accompanying
|
||||
file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
==============================================================================*/
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1, typename Context>
|
||||
struct result<This(A0 , A1, Context)>
|
||||
: result<This(A0 const& , A1 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1, typename Context>
|
||||
struct result<This(A0 & , A1 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1>
|
||||
{};
|
||||
template <typename A0 , typename A1, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2, typename Context>
|
||||
struct result<This(A0 , A1 , A2, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 & , A15 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 & , A15 & , A16 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 & , A15 & , A16 & , A17 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 & , A15 & , A16 & , A17 & , A18 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, ctx)
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
struct result<This(A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19, Context)>
|
||||
: result<This(A0 const& , A1 const& , A2 const& , A3 const& , A4 const& , A5 const& , A6 const& , A7 const& , A8 const& , A9 const& , A10 const& , A11 const& , A12 const& , A13 const& , A14 const& , A15 const& , A16 const& , A17 const& , A18 const& , A19 const&, Context)>
|
||||
{};
|
||||
template <typename This, typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
struct result<This(A0 & , A1 & , A2 & , A3 & , A4 & , A5 & , A6 & , A7 & , A8 & , A9 & , A10 & , A11 & , A12 & , A13 & , A14 & , A15 & , A16 & , A17 & , A18 & , A19 &, Context)>
|
||||
: result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>
|
||||
{};
|
||||
template <typename A0 , typename A1 , typename A2 , typename A3 , typename A4 , typename A5 , typename A6 , typename A7 , typename A8 , typename A9 , typename A10 , typename A11 , typename A12 , typename A13 , typename A14 , typename A15 , typename A16 , typename A17 , typename A18 , typename A19, typename Context>
|
||||
typename result_of::mem_fun_ptr_eval<Context, A0 , A1 , A2 , A3 , A4 , A5 , A6 , A7 , A8 , A9 , A10 , A11 , A12 , A13 , A14 , A15 , A16 , A17 , A18 , A19>::type
|
||||
operator()(
|
||||
A0 const& a0 , A1 const& a1 , A2 const& a2 , A3 const& a3 , A4 const& a4 , A5 const& a5 , A6 const& a6 , A7 const& a7 , A8 const& a8 , A9 const& a9 , A10 const& a10 , A11 const& a11 , A12 const& a12 , A13 const& a13 , A14 const& a14 , A15 const& a15 , A16 const& a16 , A17 const& a17 , A18 const& a18 , A19 const& a19
|
||||
, Context const & ctx
|
||||
) const
|
||||
{
|
||||
return
|
||||
(
|
||||
get_pointer(boost::phoenix::eval(a0, ctx))
|
||||
->*boost::phoenix::eval(a1, ctx)
|
||||
)(
|
||||
boost::phoenix::eval(a2, ctx) , boost::phoenix::eval(a3, ctx) , boost::phoenix::eval(a4, ctx) , boost::phoenix::eval(a5, ctx) , boost::phoenix::eval(a6, ctx) , boost::phoenix::eval(a7, ctx) , boost::phoenix::eval(a8, ctx) , boost::phoenix::eval(a9, ctx) , boost::phoenix::eval(a10, ctx) , boost::phoenix::eval(a11, ctx) , boost::phoenix::eval(a12, ctx) , boost::phoenix::eval(a13, ctx) , boost::phoenix::eval(a14, ctx) , boost::phoenix::eval(a15, ctx) , boost::phoenix::eval(a16, ctx) , boost::phoenix::eval(a17, ctx) , boost::phoenix::eval(a18, ctx) , boost::phoenix::eval(a19, ctx)
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,96 @@
|
||||
#ifndef BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
|
||||
#define BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
|
||||
|
||||
// MS compatible compilers support #pragma once
|
||||
#if defined(_MSC_VER)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
/////////1/////////2/////////3/////////4/////////5/////////6/////////7/////////8
|
||||
// basic_text_iarchive.hpp
|
||||
|
||||
// (C) Copyright 2002 Robert Ramey - http://www.rrsd.com .
|
||||
// Use, modification and distribution is subject to the Boost Software
|
||||
// License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for updates, documentation, and revision history.
|
||||
|
||||
// archives stored as text - note these ar templated on the basic
|
||||
// stream templates to accommodate wide (and other?) kind of characters
|
||||
//
|
||||
// note the fact that on libraries without wide characters, ostream is
|
||||
// is not a specialization of basic_ostream which in fact is not defined
|
||||
// in such cases. So we can't use basic_ostream<IStream::char_type> but rather
|
||||
// use two template parameters
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/detail/workaround.hpp>
|
||||
|
||||
#include <boost/archive/detail/common_iarchive.hpp>
|
||||
|
||||
#include <boost/archive/detail/abi_prefix.hpp> // must be the last header
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4511 4512)
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace archive {
|
||||
|
||||
namespace detail {
|
||||
template<class Archive> class interface_iarchive;
|
||||
} // namespace detail
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////
|
||||
// class basic_text_iarchive - read serialized objects from a input text stream
|
||||
template<class Archive>
|
||||
class BOOST_SYMBOL_VISIBLE basic_text_iarchive :
|
||||
public detail::common_iarchive<Archive>
|
||||
{
|
||||
#ifdef BOOST_NO_MEMBER_TEMPLATE_FRIENDS
|
||||
public:
|
||||
#else
|
||||
protected:
|
||||
#if BOOST_WORKAROUND(BOOST_MSVC, < 1500)
|
||||
// for some inexplicable reason insertion of "class" generates compile erro
|
||||
// on msvc 7.1
|
||||
friend detail::interface_iarchive<Archive>;
|
||||
#else
|
||||
friend class detail::interface_iarchive<Archive>;
|
||||
#endif
|
||||
#endif
|
||||
// intermediate level to support override of operators
|
||||
// fot templates in the absence of partial function
|
||||
// template ordering
|
||||
typedef detail::common_iarchive<Archive> detail_common_iarchive;
|
||||
template<class T>
|
||||
void load_override(T & t){
|
||||
this->detail_common_iarchive::load_override(t);
|
||||
}
|
||||
// text file don't include the optional information
|
||||
void load_override(class_id_optional_type & /*t*/){}
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
load_override(class_name_type & t);
|
||||
|
||||
BOOST_ARCHIVE_OR_WARCHIVE_DECL void
|
||||
init(void);
|
||||
|
||||
basic_text_iarchive(unsigned int flags) :
|
||||
detail::common_iarchive<Archive>(flags)
|
||||
{}
|
||||
~basic_text_iarchive(){}
|
||||
};
|
||||
|
||||
} // namespace archive
|
||||
} // namespace boost
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
#pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#include <boost/archive/detail/abi_suffix.hpp> // pops abi_suffix.hpp pragmas
|
||||
|
||||
#endif // BOOST_ARCHIVE_BASIC_TEXT_IARCHIVE_HPP
|
||||
@@ -0,0 +1,46 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef BOOST_PREDEF_OS_AMIGAOS_H
|
||||
#define BOOST_PREDEF_OS_AMIGAOS_H
|
||||
|
||||
#include <boost/predef/version_number.h>
|
||||
#include <boost/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `BOOST_OS_AMIGAOS`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/AmigaOS AmigaOS] operating system.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`AMIGA`] [__predef_detection__]]
|
||||
[[`__amigaos__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if !defined(BOOST_PREDEF_DETAIL_OS_DETECTED) && ( \
|
||||
defined(AMIGA) || defined(__amigaos__) \
|
||||
)
|
||||
# undef BOOST_OS_AMIGAOS
|
||||
# define BOOST_OS_AMIGAOS BOOST_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if BOOST_OS_AMIGAOS
|
||||
# define BOOST_OS_AMIGAOS_AVAILABLE
|
||||
# include <boost/predef/detail/os_detected.h>
|
||||
#endif
|
||||
|
||||
#define BOOST_OS_AMIGAOS_NAME "AmigaOS"
|
||||
|
||||
#endif
|
||||
|
||||
#include <boost/predef/detail/test.h>
|
||||
BOOST_PREDEF_DECLARE_TEST(BOOST_OS_AMIGAOS,BOOST_OS_AMIGAOS_NAME)
|
||||
@@ -0,0 +1,35 @@
|
||||
# /* **************************************************************************
|
||||
# * *
|
||||
# * (C) Copyright Paul Mensonides 2002.
|
||||
# * Distributed under the Boost Software License, Version 1.0. (See
|
||||
# * accompanying file LICENSE_1_0.txt or copy at
|
||||
# * http://www.boost.org/LICENSE_1_0.txt)
|
||||
# * *
|
||||
# ************************************************************************** */
|
||||
#
|
||||
# /* See http://www.boost.org for most recent version. */
|
||||
#
|
||||
# ifndef BOOST_PREPROCESSOR_DEBUG_LINE_HPP
|
||||
# define BOOST_PREPROCESSOR_DEBUG_LINE_HPP
|
||||
#
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
# include <boost/preprocessor/config/config.hpp>
|
||||
# include <boost/preprocessor/iteration/iterate.hpp>
|
||||
# include <boost/preprocessor/stringize.hpp>
|
||||
#
|
||||
# /* BOOST_PP_LINE */
|
||||
#
|
||||
# if BOOST_PP_CONFIG_EXTENDED_LINE_INFO
|
||||
# define BOOST_PP_LINE(line, file) line BOOST_PP_CAT(BOOST_PP_LINE_, BOOST_PP_IS_ITERATING)(file)
|
||||
# define BOOST_PP_LINE_BOOST_PP_IS_ITERATING(file) #file
|
||||
# define BOOST_PP_LINE_1(file) BOOST_PP_STRINGIZE(file BOOST_PP_CAT(BOOST_PP_LINE_I_, BOOST_PP_ITERATION_DEPTH())())
|
||||
# define BOOST_PP_LINE_I_1() [BOOST_PP_FRAME_ITERATION(1)]
|
||||
# define BOOST_PP_LINE_I_2() BOOST_PP_LINE_I_1()[BOOST_PP_FRAME_ITERATION(2)]
|
||||
# define BOOST_PP_LINE_I_3() BOOST_PP_LINE_I_2()[BOOST_PP_FRAME_ITERATION(3)]
|
||||
# define BOOST_PP_LINE_I_4() BOOST_PP_LINE_I_3()[BOOST_PP_FRAME_ITERATION(4)]
|
||||
# define BOOST_PP_LINE_I_5() BOOST_PP_LINE_I_4()[BOOST_PP_FRAME_ITERATION(5)]
|
||||
# else
|
||||
# define BOOST_PP_LINE(line, file) line __FILE__
|
||||
# endif
|
||||
#
|
||||
# endif
|
||||
@@ -0,0 +1,185 @@
|
||||
// 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_CONVERSION_HPP
|
||||
#define BOOST_UNITS_CONVERSION_HPP
|
||||
|
||||
/// \file
|
||||
/// \brief Template for defining conversions between quantities.
|
||||
|
||||
#include <boost/units/detail/conversion_impl.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace units {
|
||||
|
||||
template<class From, class To>
|
||||
struct conversion_helper;
|
||||
|
||||
#ifdef BOOST_UNITS_DOXYGEN
|
||||
|
||||
/// Template for defining conversions between
|
||||
/// quantities. This template should be specialized
|
||||
/// for every quantity that allows conversions.
|
||||
/// For example, if you have a two units
|
||||
/// called pair and dozen you would write
|
||||
/// @code
|
||||
/// namespace boost {
|
||||
/// namespace units {
|
||||
/// template<class T0, class T1>
|
||||
/// struct conversion_helper<quantity<dozen, T0>, quantity<pair, T1> >
|
||||
/// {
|
||||
/// static quantity<pair, T1> convert(const quantity<dozen, T0>& source)
|
||||
/// {
|
||||
/// return(quantity<pair, T1>::from_value(6 * source.value()));
|
||||
/// }
|
||||
/// };
|
||||
/// }
|
||||
/// }
|
||||
/// @endcode
|
||||
///
|
||||
/// In most cases, the predefined specializations for @c unit
|
||||
/// and @c absolute should be sufficient, so users should rarely
|
||||
/// need to use this.
|
||||
template<class From, class To>
|
||||
struct conversion_helper
|
||||
{
|
||||
static To convert(const From&);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
/// Defines the conversion factor from a base unit to any unit
|
||||
/// or to another base unit with the correct dimensions. Uses
|
||||
/// of this macro must appear at global scope.
|
||||
/// If the destination unit is a base unit or a unit that contains
|
||||
/// only one base unit which is raised to the first power (e.g. feet->meters)
|
||||
/// the reverse (meters->feet in this example) need not be defined explicitly.
|
||||
#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR(Source, Destination, type_, value_) \
|
||||
namespace boost { \
|
||||
namespace units { \
|
||||
template<> \
|
||||
struct select_base_unit_converter< \
|
||||
unscale<Source>::type, \
|
||||
unscale<reduce_unit<Destination::unit_type>::type>::type \
|
||||
> \
|
||||
{ \
|
||||
typedef Source source_type; \
|
||||
typedef reduce_unit<Destination::unit_type>::type destination_type; \
|
||||
}; \
|
||||
template<> \
|
||||
struct base_unit_converter<Source, reduce_unit<Destination::unit_type>::type> \
|
||||
{ \
|
||||
static const bool is_defined = true; \
|
||||
typedef type_ type; \
|
||||
static type value() { return(value_); } \
|
||||
}; \
|
||||
} \
|
||||
} \
|
||||
void boost_units_require_semicolon()
|
||||
|
||||
/// Defines the conversion factor from a base unit to any other base
|
||||
/// unit with the same dimensions. Params should be a Boost.Preprocessor
|
||||
/// Seq of template parameters, such as (class T1)(class T2)
|
||||
/// All uses of must appear at global scope. The reverse conversion will
|
||||
/// be defined automatically. This macro is a little dangerous, because,
|
||||
/// unlike the non-template form, it will silently fail if either base
|
||||
/// unit is scaled. This is probably not an issue if both the source
|
||||
/// and destination types depend on the template parameters, but be aware
|
||||
/// that a generic conversion to kilograms is not going to work.
|
||||
#define BOOST_UNITS_DEFINE_CONVERSION_FACTOR_TEMPLATE(Params, Source, Destination, type_, value_) \
|
||||
namespace boost { \
|
||||
namespace units { \
|
||||
template<BOOST_PP_SEQ_ENUM(Params)> \
|
||||
struct base_unit_converter< \
|
||||
Source, \
|
||||
BOOST_UNITS_MAKE_HETEROGENEOUS_UNIT(Destination, typename Source::dimension_type)\
|
||||
> \
|
||||
{ \
|
||||
static const bool is_defined = true; \
|
||||
typedef type_ type; \
|
||||
static type value() { return(value_); } \
|
||||
}; \
|
||||
} \
|
||||
} \
|
||||
void boost_units_require_semicolon()
|
||||
|
||||
/// Specifies the default conversion to be applied when
|
||||
/// no direct conversion is available.
|
||||
/// Source is a base unit. Dest is any unit with the
|
||||
/// same dimensions.
|
||||
#define BOOST_UNITS_DEFAULT_CONVERSION(Source, Dest) \
|
||||
namespace boost { \
|
||||
namespace units { \
|
||||
template<> \
|
||||
struct unscaled_get_default_conversion<unscale<Source>::type> \
|
||||
{ \
|
||||
static const bool is_defined = true; \
|
||||
typedef Dest::unit_type type; \
|
||||
}; \
|
||||
} \
|
||||
} \
|
||||
void boost_units_require_semicolon()
|
||||
|
||||
/// Specifies the default conversion to be applied when
|
||||
/// no direct conversion is available.
|
||||
/// Params is a PP Sequence of template arguments.
|
||||
/// Source is a base unit. Dest is any unit with the
|
||||
/// same dimensions. The source must not be a scaled
|
||||
/// base unit.
|
||||
#define BOOST_UNITS_DEFAULT_CONVERSION_TEMPLATE(Params, Source, Dest) \
|
||||
namespace boost { \
|
||||
namespace units { \
|
||||
template<BOOST_PP_SEQ_ENUM(Params)> \
|
||||
struct unscaled_get_default_conversion<Source> \
|
||||
{ \
|
||||
static const bool is_defined = true; \
|
||||
typedef typename Dest::unit_type type; \
|
||||
}; \
|
||||
} \
|
||||
} \
|
||||
void boost_units_require_semicolon()
|
||||
|
||||
/// INTERNAL ONLY
|
||||
/// Users should not create their units in namespace boost::units.
|
||||
/// If we want to make this public it needs to allow better control over
|
||||
/// the namespaces. --SJW.
|
||||
/// template that defines a base_unit and conversion to another dimensionally-consistent unit
|
||||
#define BOOST_UNITS_DEFINE_BASE_UNIT_WITH_CONVERSIONS(namespace_, name_, name_string_, symbol_string_, factor, unit, id)\
|
||||
namespace boost { \
|
||||
namespace units { \
|
||||
namespace namespace_ { \
|
||||
struct name_ ## _base_unit \
|
||||
: base_unit<name_ ## _base_unit, unit::dimension_type, id> { \
|
||||
static const char* name() { return(name_string_); } \
|
||||
static const char* symbol() { return(symbol_string_); } \
|
||||
}; \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
BOOST_UNITS_DEFINE_CONVERSION_FACTOR(namespace_::name_ ## _base_unit, unit, double, factor); \
|
||||
BOOST_UNITS_DEFAULT_CONVERSION(namespace_::name_ ## _base_unit, unit)
|
||||
|
||||
/// Find the conversion factor between two units.
|
||||
template<class FromUnit,class ToUnit>
|
||||
inline
|
||||
typename one_to_double_type<
|
||||
typename detail::conversion_factor_helper<FromUnit, ToUnit>::type
|
||||
>::type
|
||||
conversion_factor(const FromUnit&,const ToUnit&)
|
||||
{
|
||||
return(one_to_double(detail::conversion_factor_helper<FromUnit, ToUnit>::value()));
|
||||
}
|
||||
|
||||
} // namespace units
|
||||
|
||||
} // namespace boost
|
||||
|
||||
#endif // BOOST_UNITS_CONVERSION_HPP
|
||||
@@ -0,0 +1,40 @@
|
||||
|
||||
// Copyright Aleksey Gurtovoy 2001-2004
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
// Preprocessed version of "boost/mpl/aux_/template_arity.hpp" header
|
||||
// -- DO NOT modify by hand!
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
template< bool >
|
||||
struct template_arity_impl
|
||||
{
|
||||
template< typename F > struct result_
|
||||
: mpl::int_< -1 >
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
template<>
|
||||
struct template_arity_impl<true>
|
||||
{
|
||||
template< typename F > struct result_
|
||||
: F::arity
|
||||
{
|
||||
};
|
||||
};
|
||||
|
||||
template< typename F >
|
||||
struct template_arity
|
||||
: template_arity_impl< ::boost::mpl::aux::has_rebind<F>::value >
|
||||
::template result_<F>
|
||||
{
|
||||
};
|
||||
|
||||
}}}
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
subroutine wspr_fsk8_wav(baud,xdt,f0,itone,snrdb,iwave)
|
||||
|
||||
! Generate iwave() from itone().
|
||||
|
||||
include 'wspr_fsk8_params.f90'
|
||||
integer itone(NN)
|
||||
integer*2 iwave(NMAX)
|
||||
real*8 twopi,dt,dphi,phi
|
||||
real dat(NMAX)
|
||||
|
||||
twopi=8.d0*atan(1.d0)
|
||||
dt=1.d0/12000.d0
|
||||
|
||||
dat=0.
|
||||
if(snrdb.lt.90) then
|
||||
do i=1,NMAX
|
||||
dat(i)=gran() !Generate gaussian noise, rms = 1.0
|
||||
enddo
|
||||
bandwidth_ratio=2500.0/6000.0
|
||||
sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snrdb)
|
||||
else
|
||||
sig=1.0
|
||||
endif
|
||||
|
||||
phi=0.d0
|
||||
k=nint((xdt+1.0)/dt)
|
||||
do j=1,NN
|
||||
dphi=twopi*(f0+ itone(j)*baud)*dt
|
||||
if(k.eq.0) phi=-dphi
|
||||
do i=1,NSPS0
|
||||
k=k+1
|
||||
phi=phi+dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
if(k.gt.0 .and. k.le.NMAX) dat(k)=dat(k) + sig*sin(xphi)
|
||||
enddo
|
||||
enddo
|
||||
fac=32767.0
|
||||
rms=100.0
|
||||
if(snrdb.ge.90.0) iwave=nint(fac*dat)
|
||||
if(snrdb.lt.90.0) iwave=nint(rms*dat)
|
||||
|
||||
return
|
||||
end subroutine wspr_fsk8_wav
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,412 @@
|
||||
|
||||
// NO INCLUDE GUARDS, THE HEADER IS INTENDED FOR MULTIPLE INCLUSION!
|
||||
|
||||
#if !defined(BOOST_PP_IS_ITERATING)
|
||||
|
||||
// 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/limits/unrolling.hpp>
|
||||
# include <boost/mpl/aux_/preprocessor/repeat.hpp>
|
||||
# include <boost/mpl/aux_/config/ctps.hpp>
|
||||
# include <boost/mpl/aux_/nttp_decl.hpp>
|
||||
|
||||
# include <boost/preprocessor/arithmetic/sub.hpp>
|
||||
# include <boost/preprocessor/iterate.hpp>
|
||||
# include <boost/preprocessor/dec.hpp>
|
||||
# include <boost/preprocessor/inc.hpp>
|
||||
# include <boost/preprocessor/cat.hpp>
|
||||
|
||||
// local macros, #undef-ined at the end of the header
|
||||
|
||||
# define AUX778076_ITER_FOLD_FORWARD_STEP(unused, n_, unused2) \
|
||||
typedef typename apply2< \
|
||||
ForwardOp \
|
||||
, BOOST_PP_CAT(fwd_state,n_) \
|
||||
, AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,n_)) \
|
||||
>::type BOOST_PP_CAT(fwd_state,BOOST_PP_INC(n_)); \
|
||||
typedef typename mpl::next<BOOST_PP_CAT(iter,n_)>::type \
|
||||
BOOST_PP_CAT(iter,BOOST_PP_INC(n_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC(n_) \
|
||||
typedef typename apply2< \
|
||||
BackwardOp \
|
||||
, BOOST_PP_CAT(bkwd_state,n_) \
|
||||
, AUX778076_FOLD_IMPL_OP(BOOST_PP_CAT(iter,BOOST_PP_DEC(n_))) \
|
||||
>::type BOOST_PP_CAT(bkwd_state,BOOST_PP_DEC(n_)); \
|
||||
/**/
|
||||
|
||||
# define AUX778076_ITER_FOLD_BACKWARD_STEP(unused, n_, j) \
|
||||
AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC( \
|
||||
BOOST_PP_SUB_D(1,j,n_) \
|
||||
) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(n_) \
|
||||
typedef typename nested_chunk::state BOOST_PP_CAT(bkwd_state,n_);
|
||||
/**/
|
||||
|
||||
# define AUX778076_FOLD_IMPL_NAME \
|
||||
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_impl) \
|
||||
/**/
|
||||
|
||||
# define AUX778076_FOLD_CHUNK_NAME \
|
||||
BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_chunk) \
|
||||
/**/
|
||||
|
||||
namespace boost { namespace mpl { namespace aux {
|
||||
|
||||
/// forward declaration
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(long, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME;
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(long, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State fwd_state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX778076_ITER_FOLD_FORWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
|
||||
, BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING)
|
||||
, Last
|
||||
, BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING)
|
||||
, BackwardOp
|
||||
, ForwardOp
|
||||
> nested_chunk;
|
||||
|
||||
AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING)
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX778076_ITER_FOLD_BACKWARD_STEP
|
||||
, BOOST_MPL_LIMIT_UNROLLING
|
||||
)
|
||||
|
||||
typedef bkwd_state0 state;
|
||||
typedef typename nested_chunk::iterator iterator;
|
||||
};
|
||||
|
||||
// fallback implementation for sequences of unknown size
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<-1,First,Last,State,BackwardOp,ForwardOp>
|
||||
{
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
-1
|
||||
, typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
|
||||
, BackwardOp
|
||||
, ForwardOp
|
||||
> nested_step;
|
||||
|
||||
typedef typename apply2<
|
||||
BackwardOp
|
||||
, typename nested_step::state
|
||||
, AUX778076_FOLD_IMPL_OP(First)
|
||||
>::type state;
|
||||
|
||||
typedef typename nested_step::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<-1,Last,Last,State,BackwardOp,ForwardOp>
|
||||
{
|
||||
typedef State state;
|
||||
typedef Last iterator;
|
||||
};
|
||||
|
||||
#else // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
|
||||
struct AUX778076_FOLD_CHUNK_NAME;
|
||||
|
||||
# define BOOST_PP_ITERATION_PARAMS_1 \
|
||||
(3,(0, BOOST_MPL_LIMIT_UNROLLING, <boost/mpl/aux_/reverse_fold_impl_body.hpp>))
|
||||
# include BOOST_PP_ITERATE()
|
||||
|
||||
// implementation for N that exceeds BOOST_MPL_LIMIT_UNROLLING
|
||||
template< BOOST_MPL_AUX_NTTP_DECL(long, N) >
|
||||
struct AUX778076_FOLD_CHUNK_NAME
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State fwd_state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX778076_ITER_FOLD_FORWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
typedef AUX778076_FOLD_IMPL_NAME<
|
||||
( (N - BOOST_MPL_LIMIT_UNROLLING) < 0 ? 0 : N - BOOST_MPL_LIMIT_UNROLLING )
|
||||
, BOOST_PP_CAT(iter,BOOST_MPL_LIMIT_UNROLLING)
|
||||
, Last
|
||||
, BOOST_PP_CAT(fwd_state,BOOST_MPL_LIMIT_UNROLLING)
|
||||
, BackwardOp
|
||||
, ForwardOp
|
||||
> nested_chunk;
|
||||
|
||||
AUX778076_FIRST_BACKWARD_STATE_TYPEDEF(BOOST_MPL_LIMIT_UNROLLING)
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
BOOST_MPL_LIMIT_UNROLLING
|
||||
, AUX778076_ITER_FOLD_BACKWARD_STEP
|
||||
, BOOST_MPL_LIMIT_UNROLLING
|
||||
)
|
||||
|
||||
typedef bkwd_state0 state;
|
||||
typedef typename nested_chunk::iterator iterator;
|
||||
};
|
||||
};
|
||||
|
||||
// fallback implementation for sequences of unknown size
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step);
|
||||
|
||||
template<
|
||||
typename Last
|
||||
, typename State
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)
|
||||
{
|
||||
typedef Last iterator;
|
||||
typedef State state;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct AUX778076_FOLD_CHUNK_NAME<-1>
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef typename if_<
|
||||
typename is_same<First,Last>::type
|
||||
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_null_step)<Last,State>
|
||||
, BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)<First,Last,State,BackwardOp,ForwardOp>
|
||||
>::type res_;
|
||||
|
||||
typedef typename res_::state state;
|
||||
typedef typename res_::iterator iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct BOOST_PP_CAT(AUX778076_FOLD_IMPL_NAME_PREFIX,_step)
|
||||
{
|
||||
typedef AUX778076_FOLD_CHUNK_NAME<-1>::template result_<
|
||||
typename mpl::next<First>::type
|
||||
, Last
|
||||
, typename apply2<ForwardOp,State,AUX778076_FOLD_IMPL_OP(First)>::type
|
||||
, BackwardOp
|
||||
, ForwardOp
|
||||
> nested_step;
|
||||
|
||||
typedef typename apply2<
|
||||
BackwardOp
|
||||
, typename nested_step::state
|
||||
, AUX778076_FOLD_IMPL_OP(First)
|
||||
>::type state;
|
||||
|
||||
typedef typename nested_step::iterator iterator;
|
||||
};
|
||||
|
||||
template<
|
||||
BOOST_MPL_AUX_NTTP_DECL(long, N)
|
||||
, typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME
|
||||
: AUX778076_FOLD_CHUNK_NAME<N>
|
||||
::template result_<First,Last,State,BackwardOp,ForwardOp>
|
||||
{
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
}}}
|
||||
|
||||
# undef AUX778076_FIRST_BACKWARD_STATE_TYPEDEF
|
||||
# undef AUX778076_ITER_FOLD_BACKWARD_STEP
|
||||
# undef AUX778076_ITER_FOLD_BACKWARD_STEP_FUNC
|
||||
# undef AUX778076_ITER_FOLD_FORWARD_STEP
|
||||
|
||||
#undef AUX778076_FOLD_IMPL_OP
|
||||
#undef AUX778076_FOLD_IMPL_NAME_PREFIX
|
||||
|
||||
///// iteration
|
||||
|
||||
#else
|
||||
|
||||
# define n_ BOOST_PP_FRAME_ITERATION(1)
|
||||
|
||||
#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) \
|
||||
&& !defined(BOOST_MPL_CFG_NO_NONTYPE_TEMPLATE_PARTIAL_SPEC)
|
||||
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct AUX778076_FOLD_IMPL_NAME<n_,First,Last,State,BackwardOp,ForwardOp>
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State fwd_state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
n_
|
||||
, AUX778076_ITER_FOLD_FORWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_);
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
n_
|
||||
, AUX778076_ITER_FOLD_BACKWARD_STEP
|
||||
, n_
|
||||
)
|
||||
|
||||
typedef bkwd_state0 state;
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<> struct AUX778076_FOLD_CHUNK_NAME<n_>
|
||||
{
|
||||
template<
|
||||
typename First
|
||||
, typename Last
|
||||
, typename State
|
||||
, typename BackwardOp
|
||||
, typename ForwardOp
|
||||
>
|
||||
struct result_
|
||||
{
|
||||
typedef First iter0;
|
||||
typedef State fwd_state0;
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
n_
|
||||
, AUX778076_ITER_FOLD_FORWARD_STEP
|
||||
, unused
|
||||
)
|
||||
|
||||
typedef BOOST_PP_CAT(fwd_state,n_) BOOST_PP_CAT(bkwd_state,n_);
|
||||
|
||||
BOOST_MPL_PP_REPEAT(
|
||||
n_
|
||||
, AUX778076_ITER_FOLD_BACKWARD_STEP
|
||||
, n_
|
||||
)
|
||||
|
||||
typedef bkwd_state0 state;
|
||||
typedef BOOST_PP_CAT(iter,n_) iterator;
|
||||
};
|
||||
|
||||
#if defined(BOOST_MPL_CFG_MSVC_60_ETI_BUG)
|
||||
/// ETI workaround
|
||||
template<> struct result_<int,int,int,int,int>
|
||||
{
|
||||
typedef int state;
|
||||
typedef int iterator;
|
||||
};
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif // BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION
|
||||
|
||||
# undef n_
|
||||
|
||||
#endif // BOOST_PP_IS_ITERATING
|
||||
@@ -0,0 +1,148 @@
|
||||
// Boost compiler configuration selection header file
|
||||
|
||||
// (C) Copyright John Maddock 2001 - 2003.
|
||||
// (C) Copyright Martin Wille 2003.
|
||||
// (C) Copyright Guillaume Melquiond 2003.
|
||||
//
|
||||
// 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.
|
||||
|
||||
// locate which compiler we are using and define
|
||||
// BOOST_COMPILER_CONFIG as needed:
|
||||
|
||||
#if defined __CUDACC__
|
||||
// NVIDIA CUDA C++ compiler for GPU
|
||||
# include "boost/config/compiler/nvcc.hpp"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__GCCXML__)
|
||||
// GCC-XML emulates other compilers, it has to appear first here!
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc_xml.hpp"
|
||||
|
||||
#elif defined(_CRAYC)
|
||||
// EDG based Cray compiler:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/cray.hpp"
|
||||
|
||||
#elif defined __COMO__
|
||||
// Comeau C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/comeau.hpp"
|
||||
|
||||
#elif defined(__PATHSCALE__) && (__PATHCC__ >= 4)
|
||||
// PathScale EKOPath compiler (has to come before clang and gcc)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pathscale.hpp"
|
||||
|
||||
#elif defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
|
||||
// Intel
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/intel.hpp"
|
||||
|
||||
#elif defined __clang__ && !defined(__CUDACC__) && !defined(__ibmxl__)
|
||||
// when using clang and cuda at same time, you want to appear as gcc
|
||||
// Clang C++ emulates GCC, so it has to appear early.
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/clang.hpp"
|
||||
|
||||
#elif defined __DMC__
|
||||
// Digital Mars C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/digitalmars.hpp"
|
||||
|
||||
# elif defined(__GNUC__) && !defined(__ibmxl__)
|
||||
// GNU C++:
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/gcc.hpp"
|
||||
|
||||
#elif defined __KCC
|
||||
// Kai C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/kai.hpp"
|
||||
|
||||
#elif defined __sgi
|
||||
// SGI MIPSpro C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sgi_mipspro.hpp"
|
||||
|
||||
#elif defined __DECCXX
|
||||
// Compaq Tru64 Unix cxx
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/compaq_cxx.hpp"
|
||||
|
||||
#elif defined __ghs
|
||||
// Greenhills C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/greenhills.hpp"
|
||||
|
||||
#elif defined __CODEGEARC__
|
||||
// CodeGear - must be checked for before Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/codegear.hpp"
|
||||
|
||||
#elif defined __BORLANDC__
|
||||
// Borland
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/borland.hpp"
|
||||
|
||||
#elif defined __MWERKS__
|
||||
// Metrowerks CodeWarrior
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/metrowerks.hpp"
|
||||
|
||||
#elif defined __SUNPRO_CC
|
||||
// Sun Workshop Compiler C++
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/sunpro_cc.hpp"
|
||||
|
||||
#elif defined __HP_aCC
|
||||
// HP aCC
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/hp_acc.hpp"
|
||||
|
||||
#elif defined(__MRC__) || defined(__SC__)
|
||||
// MPW MrCpp or SCpp
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/mpw.hpp"
|
||||
|
||||
#elif defined(__ibmxl__)
|
||||
// IBM XL C/C++ for Linux (Little Endian)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/xlcpp.hpp"
|
||||
|
||||
#elif defined(__IBMCPP__)
|
||||
// IBM Visual Age or IBM XL C/C++ for Linux (Big Endian)
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/vacpp.hpp"
|
||||
|
||||
#elif defined(__PGI)
|
||||
// Portland Group Inc.
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/pgi.hpp"
|
||||
|
||||
#elif defined _MSC_VER
|
||||
// Microsoft Visual C++
|
||||
//
|
||||
// Must remain the last #elif since some other vendors (Metrowerks, for
|
||||
// example) also #define _MSC_VER
|
||||
# define BOOST_COMPILER_CONFIG "boost/config/compiler/visualc.hpp"
|
||||
|
||||
#elif defined (BOOST_ASSERT_CONFIG)
|
||||
// this must come last - generate an error if we don't
|
||||
// recognise the compiler:
|
||||
# error "Unknown compiler - please configure (http://www.boost.org/libs/config/config.htm#configuring) and report the results to the main boost mailing list (http://www.boost.org/more/mailing_lists.htm#main)"
|
||||
|
||||
#endif
|
||||
|
||||
#if 0
|
||||
//
|
||||
// This section allows dependency scanners to find all the headers we *might* include:
|
||||
//
|
||||
#include <boost/config/compiler/gcc_xml.hpp>
|
||||
#include <boost/config/compiler/cray.hpp>
|
||||
#include <boost/config/compiler/comeau.hpp>
|
||||
#include <boost/config/compiler/pathscale.hpp>
|
||||
#include <boost/config/compiler/intel.hpp>
|
||||
#include <boost/config/compiler/clang.hpp>
|
||||
#include <boost/config/compiler/digitalmars.hpp>
|
||||
#include <boost/config/compiler/gcc.hpp>
|
||||
#include <boost/config/compiler/kai.hpp>
|
||||
#include <boost/config/compiler/sgi_mipspro.hpp>
|
||||
#include <boost/config/compiler/compaq_cxx.hpp>
|
||||
#include <boost/config/compiler/greenhills.hpp>
|
||||
#include <boost/config/compiler/codegear.hpp>
|
||||
#include <boost/config/compiler/borland.hpp>
|
||||
#include <boost/config/compiler/metrowerks.hpp>
|
||||
#include <boost/config/compiler/sunpro_cc.hpp>
|
||||
#include <boost/config/compiler/hp_acc.hpp>
|
||||
#include <boost/config/compiler/mpw.hpp>
|
||||
#include <boost/config/compiler/vacpp.hpp>
|
||||
#include <boost/config/compiler/pgi.hpp>
|
||||
#include <boost/config/compiler/visualc.hpp>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,67 @@
|
||||
/*
|
||||
[auto_generated]
|
||||
boost/numeric/odeint/integrate/detail/integrate_times.hpp
|
||||
|
||||
[begin_description]
|
||||
Default integrate times implementation.
|
||||
[end_description]
|
||||
|
||||
Copyright 2009-2012 Karsten Ahnert
|
||||
Copyright 2009-2012 Mario Mulansky
|
||||
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or
|
||||
copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
|
||||
#ifndef BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
#define BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_TIMES_HPP_INCLUDED
|
||||
|
||||
#include <stdexcept>
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/range/algorithm/for_each.hpp>
|
||||
|
||||
#include <boost/numeric/odeint/util/unwrap_reference.hpp>
|
||||
#include <boost/numeric/odeint/stepper/controlled_step_result.hpp>
|
||||
#include <boost/numeric/odeint/util/detail/less_with_sign.hpp>
|
||||
#include <boost/numeric/odeint/iterator/times_time_iterator.hpp>
|
||||
#include <boost/numeric/odeint/iterator/integrate/detail/functors.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace numeric {
|
||||
namespace odeint {
|
||||
namespace detail {
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* integrate_times for all steppers
|
||||
*/
|
||||
template< class Stepper , class System , class State , class TimeIterator , class Time , class Observer , class StepperTag >
|
||||
size_t integrate_times(
|
||||
Stepper stepper , System system , State &start_state ,
|
||||
TimeIterator start_time , TimeIterator end_time , Time dt ,
|
||||
Observer observer , StepperTag
|
||||
)
|
||||
{
|
||||
size_t obs_calls = 0;
|
||||
|
||||
boost::for_each( make_times_time_range( stepper , system , start_state ,
|
||||
start_time , end_time , dt ) ,
|
||||
// should we use traits<Stepper>::state_type here instead of State? NO!
|
||||
obs_caller< Observer >( obs_calls , observer ) );
|
||||
|
||||
// step integration steps gives step+1 observer calls
|
||||
return obs_calls-1;
|
||||
}
|
||||
|
||||
|
||||
} // namespace detail
|
||||
} // namespace odeint
|
||||
} // namespace numeric
|
||||
} // namespace boost
|
||||
|
||||
|
||||
#endif // BOOST_NUMERIC_ODEINT_INTEGRATE_DETAIL_INTEGRATE_ADAPTIVE_HPP_INCLUDED
|
||||
@@ -0,0 +1,535 @@
|
||||
// boost/math/distributions/arcsine.hpp
|
||||
|
||||
// Copyright John Maddock 2014.
|
||||
// Copyright Paul A. Bristow 2014.
|
||||
|
||||
// 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)
|
||||
|
||||
// http://en.wikipedia.org/wiki/arcsine_distribution
|
||||
|
||||
// The arcsine Distribution is a continuous probability distribution.
|
||||
// http://en.wikipedia.org/wiki/Arcsine_distribution
|
||||
// http://www.wolframalpha.com/input/?i=ArcSinDistribution
|
||||
|
||||
// Standard arcsine distribution is a special case of beta distribution with both a & b = one half,
|
||||
// and 0 <= x <= 1.
|
||||
|
||||
// It is generalized to include any bounded support a <= x <= b from 0 <= x <= 1
|
||||
// by Wolfram and Wikipedia,
|
||||
// but using location and scale parameters by
|
||||
// Virtual Laboratories in Probability and Statistics http://www.math.uah.edu/stat/index.html
|
||||
// http://www.math.uah.edu/stat/special/Arcsine.html
|
||||
// The end-point version is simpler and more obvious, so we implement that.
|
||||
// TODO Perhaps provide location and scale functions?
|
||||
|
||||
|
||||
#ifndef BOOST_MATH_DIST_ARCSINE_HPP
|
||||
#define BOOST_MATH_DIST_ARCSINE_HPP
|
||||
|
||||
#include <boost/math/distributions/fwd.hpp>
|
||||
#include <boost/math/distributions/complement.hpp> // complements.
|
||||
#include <boost/math/distributions/detail/common_error_handling.hpp> // error checks.
|
||||
#include <boost/math/constants/constants.hpp>
|
||||
|
||||
#include <boost/math/special_functions/fpclassify.hpp> // isnan.
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable: 4702) // Unreachable code,
|
||||
// in domain_error_imp in error_handling.
|
||||
#endif
|
||||
|
||||
#include <utility>
|
||||
#include <exception> // For std::domain_error.
|
||||
|
||||
namespace boost
|
||||
{
|
||||
namespace math
|
||||
{
|
||||
namespace arcsine_detail
|
||||
{
|
||||
// Common error checking routines for arcsine distribution functions:
|
||||
// Duplicating for x_min and x_max provides specific error messages.
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_x_min(const char* function, const RealType& x, RealType* result, const Policy& pol)
|
||||
{
|
||||
if (!(boost::math::isfinite)(x))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"x_min argument is %1%, but must be finite !", x, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // bool check_x_min
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_x_max(const char* function, const RealType& x, RealType* result, const Policy& pol)
|
||||
{
|
||||
if (!(boost::math::isfinite)(x))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"x_max argument is %1%, but must be finite !", x, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // bool check_x_max
|
||||
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_x_minmax(const char* function, const RealType& x_min, const RealType& x_max, RealType* result, const Policy& pol)
|
||||
{ // Check x_min < x_max
|
||||
if (x_min >= x_max)
|
||||
{
|
||||
std::string msg = "x_max argument is %1%, but must be > x_min = " + lexical_cast<std::string>(x_min) + "!";
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
msg.c_str(), x_max, pol);
|
||||
// "x_max argument is %1%, but must be > x_min !", x_max, pol);
|
||||
// "x_max argument is %1%, but must be > x_min %2!", x_max, x_min, pol); would be better.
|
||||
// But would require replication of all helpers functions in /policies/error_handling.hpp for two values,
|
||||
// as well as two value versions of raise_error, raise_domain_error and do_format ...
|
||||
// so use slightly hacky lexical_cast to string instead.
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // bool check_x_minmax
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_prob(const char* function, const RealType& p, RealType* result, const Policy& pol)
|
||||
{
|
||||
if ((p < 0) || (p > 1) || !(boost::math::isfinite)(p))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"Probability argument is %1%, but must be >= 0 and <= 1 !", p, pol);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // bool check_prob
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_x(const char* function, const RealType& x_min, const RealType& x_max, const RealType& x, RealType* result, const Policy& pol)
|
||||
{ // Check x finite and x_min < x < x_max.
|
||||
if (!(boost::math::isfinite)(x))
|
||||
{
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"x argument is %1%, but must be finite !", x, pol);
|
||||
return false;
|
||||
}
|
||||
if ((x < x_min) || (x > x_max))
|
||||
{
|
||||
// std::cout << x_min << ' ' << x << x_max << std::endl;
|
||||
*result = policies::raise_domain_error<RealType>(
|
||||
function,
|
||||
"x argument is %1%, but must be x_min < x < x_max !", x, pol);
|
||||
// For example:
|
||||
// Error in function boost::math::pdf(arcsine_distribution<double> const&, double) : x argument is -1.01, but must be x_min < x < x_max !
|
||||
// TODO Perhaps show values of x_min and x_max?
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
} // bool check_x
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist(const char* function, const RealType& x_min, const RealType& x_max, RealType* result, const Policy& pol)
|
||||
{ // Check both x_min and x_max finite, and x_min < x_max.
|
||||
return check_x_min(function, x_min, result, pol)
|
||||
&& check_x_max(function, x_max, result, pol)
|
||||
&& check_x_minmax(function, x_min, x_max, result, pol);
|
||||
} // bool check_dist
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist_and_x(const char* function, const RealType& x_min, const RealType& x_max, RealType x, RealType* result, const Policy& pol)
|
||||
{
|
||||
return check_dist(function, x_min, x_max, result, pol)
|
||||
&& arcsine_detail::check_x(function, x_min, x_max, x, result, pol);
|
||||
} // bool check_dist_and_x
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline bool check_dist_and_prob(const char* function, const RealType& x_min, const RealType& x_max, RealType p, RealType* result, const Policy& pol)
|
||||
{
|
||||
return check_dist(function, x_min, x_max, result, pol)
|
||||
&& check_prob(function, p, result, pol);
|
||||
} // bool check_dist_and_prob
|
||||
|
||||
} // namespace arcsine_detail
|
||||
|
||||
template <class RealType = double, class Policy = policies::policy<> >
|
||||
class arcsine_distribution
|
||||
{
|
||||
public:
|
||||
typedef RealType value_type;
|
||||
typedef Policy policy_type;
|
||||
|
||||
arcsine_distribution(RealType x_min = 0, RealType x_max = 1) : m_x_min(x_min), m_x_max(x_max)
|
||||
{ // Default beta (alpha = beta = 0.5) is standard arcsine with x_min = 0, x_max = 1.
|
||||
// Generalized to allow x_min and x_max to be specified.
|
||||
RealType result;
|
||||
arcsine_detail::check_dist(
|
||||
"boost::math::arcsine_distribution<%1%>::arcsine_distribution",
|
||||
m_x_min,
|
||||
m_x_max,
|
||||
&result, Policy());
|
||||
} // arcsine_distribution constructor.
|
||||
// Accessor functions:
|
||||
RealType x_min() const
|
||||
{
|
||||
return m_x_min;
|
||||
}
|
||||
RealType x_max() const
|
||||
{
|
||||
return m_x_max;
|
||||
}
|
||||
|
||||
private:
|
||||
RealType m_x_min; // Two x min and x max parameters of the arcsine distribution.
|
||||
RealType m_x_max;
|
||||
}; // template <class RealType, class Policy> class arcsine_distribution
|
||||
|
||||
// Convenient typedef to construct double version.
|
||||
typedef arcsine_distribution<double> arcsine;
|
||||
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> range(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{ // Range of permissible values for random variable x.
|
||||
using boost::math::tools::max_value;
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(dist.x_min()), static_cast<RealType>(dist.x_max()));
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline const std::pair<RealType, RealType> support(const arcsine_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.
|
||||
return std::pair<RealType, RealType>(static_cast<RealType>(dist.x_min()), static_cast<RealType>(dist.x_max()));
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mean(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{ // Mean of arcsine distribution .
|
||||
RealType result;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::mean(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return (x_min + x_max) / 2;
|
||||
} // mean
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType variance(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{ // Variance of standard arcsine distribution = (1-0)/8 = 0.125.
|
||||
RealType result;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::variance(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return (x_max - x_min) * (x_max - x_min) / 8;
|
||||
} // variance
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType mode(const arcsine_distribution<RealType, Policy>& /* dist */)
|
||||
{ //There are always [*two] values for the mode, at ['x_min] and at ['x_max], default 0 and 1,
|
||||
// so instead we raise the exception domain_error.
|
||||
return policies::raise_domain_error<RealType>(
|
||||
"boost::math::mode(arcsine_distribution<%1%>&)",
|
||||
"The arcsine distribution has two modes at x_min and x_max: "
|
||||
"so the return value is %1%.",
|
||||
std::numeric_limits<RealType>::quiet_NaN(), Policy());
|
||||
} // mode
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType median(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{ // Median of arcsine distribution (a + b) / 2 == mean.
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
RealType result;
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::median(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return (x_min + x_max) / 2;
|
||||
}
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType skewness(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
RealType result;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::skewness(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
return 0;
|
||||
} // skewness
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis_excess(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
RealType result;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::kurtosis_excess(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
result = -3;
|
||||
return result / 2;
|
||||
} // kurtosis_excess
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType kurtosis(const arcsine_distribution<RealType, Policy>& dist)
|
||||
{
|
||||
RealType result;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
if (false == arcsine_detail::check_dist(
|
||||
"boost::math::kurtosis(arcsine_distribution<%1%> const&, %1% )",
|
||||
x_min,
|
||||
x_max,
|
||||
&result, Policy())
|
||||
)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
return 3 + kurtosis_excess(dist);
|
||||
} // kurtosis
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType pdf(const arcsine_distribution<RealType, Policy>& dist, const RealType& xx)
|
||||
{ // Probability Density/Mass Function arcsine.
|
||||
BOOST_FPU_EXCEPTION_GUARD
|
||||
BOOST_MATH_STD_USING // For ADL of std functions.
|
||||
|
||||
static const char* function = "boost::math::pdf(arcsine_distribution<%1%> const&, %1%)";
|
||||
|
||||
RealType lo = dist.x_min();
|
||||
RealType hi = dist.x_max();
|
||||
RealType x = xx;
|
||||
|
||||
// Argument checks:
|
||||
RealType result = 0;
|
||||
if (false == arcsine_detail::check_dist_and_x(
|
||||
function,
|
||||
lo, hi, x,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
using boost::math::constants::pi;
|
||||
result = static_cast<RealType>(1) / (pi<RealType>() * sqrt((x - lo) * (hi - x)));
|
||||
return result;
|
||||
} // pdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const arcsine_distribution<RealType, Policy>& dist, const RealType& x)
|
||||
{ // Cumulative Distribution Function arcsine.
|
||||
BOOST_MATH_STD_USING // For ADL of std functions.
|
||||
|
||||
static const char* function = "boost::math::cdf(arcsine_distribution<%1%> const&, %1%)";
|
||||
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
// Argument checks:
|
||||
RealType result = 0;
|
||||
if (false == arcsine_detail::check_dist_and_x(
|
||||
function,
|
||||
x_min, x_max, x,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// Special cases:
|
||||
if (x == x_min)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (x == x_max)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
using boost::math::constants::pi;
|
||||
result = static_cast<RealType>(2) * asin(sqrt((x - x_min) / (x_max - x_min))) / pi<RealType>();
|
||||
return result;
|
||||
} // arcsine cdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType cdf(const complemented2_type<arcsine_distribution<RealType, Policy>, RealType>& c)
|
||||
{ // Complemented Cumulative Distribution Function arcsine.
|
||||
BOOST_MATH_STD_USING // For ADL of std functions.
|
||||
static const char* function = "boost::math::cdf(arcsine_distribution<%1%> const&, %1%)";
|
||||
|
||||
RealType x = c.param;
|
||||
arcsine_distribution<RealType, Policy> const& dist = c.dist;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
|
||||
// Argument checks:
|
||||
RealType result = 0;
|
||||
if (false == arcsine_detail::check_dist_and_x(
|
||||
function,
|
||||
x_min, x_max, x,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
if (x == x_min)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
else if (x == x_max)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
using boost::math::constants::pi;
|
||||
// Naive version x = 1 - x;
|
||||
// result = static_cast<RealType>(2) * asin(sqrt((x - x_min) / (x_max - x_min))) / pi<RealType>();
|
||||
// is less accurate, so use acos instead of asin for complement.
|
||||
result = static_cast<RealType>(2) * acos(sqrt((x - x_min) / (x_max - x_min))) / pi<RealType>();
|
||||
return result;
|
||||
} // arcine ccdf
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const arcsine_distribution<RealType, Policy>& dist, const RealType& p)
|
||||
{
|
||||
// Quantile or Percent Point arcsine function or
|
||||
// Inverse Cumulative probability distribution function CDF.
|
||||
// Return x (0 <= x <= 1),
|
||||
// for a given probability p (0 <= p <= 1).
|
||||
// These functions take a probability as an argument
|
||||
// and return a value such that the probability that a random variable x
|
||||
// will be less than or equal to that value
|
||||
// is whatever probability you supplied as an argument.
|
||||
BOOST_MATH_STD_USING // For ADL of std functions.
|
||||
|
||||
using boost::math::constants::half_pi;
|
||||
|
||||
static const char* function = "boost::math::quantile(arcsine_distribution<%1%> const&, %1%)";
|
||||
|
||||
RealType result = 0; // of argument checks:
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
if (false == arcsine_detail::check_dist_and_prob(
|
||||
function,
|
||||
x_min, x_max, p,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// Special cases:
|
||||
if (p == 0)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (p == 1)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
RealType sin2hpip = sin(half_pi<RealType>() * p);
|
||||
RealType sin2hpip2 = sin2hpip * sin2hpip;
|
||||
result = -x_min * sin2hpip2 + x_min + x_max * sin2hpip2;
|
||||
|
||||
return result;
|
||||
} // quantile
|
||||
|
||||
template <class RealType, class Policy>
|
||||
inline RealType quantile(const complemented2_type<arcsine_distribution<RealType, Policy>, RealType>& c)
|
||||
{
|
||||
// Complement Quantile or Percent Point arcsine function.
|
||||
// Return the number of expected x for a given
|
||||
// complement of the probability q.
|
||||
BOOST_MATH_STD_USING // For ADL of std functions.
|
||||
|
||||
using boost::math::constants::half_pi;
|
||||
static const char* function = "boost::math::quantile(arcsine_distribution<%1%> const&, %1%)";
|
||||
|
||||
// Error checks:
|
||||
RealType q = c.param;
|
||||
const arcsine_distribution<RealType, Policy>& dist = c.dist;
|
||||
RealType result = 0;
|
||||
RealType x_min = dist.x_min();
|
||||
RealType x_max = dist.x_max();
|
||||
if (false == arcsine_detail::check_dist_and_prob(
|
||||
function,
|
||||
x_min,
|
||||
x_max,
|
||||
q,
|
||||
&result, Policy()))
|
||||
{
|
||||
return result;
|
||||
}
|
||||
// Special cases:
|
||||
if (q == 1)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
if (q == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
// Naive RealType p = 1 - q; result = sin(half_pi<RealType>() * p); loses accuracy, so use a cos alternative instead.
|
||||
//result = cos(half_pi<RealType>() * q); // for arcsine(0,1)
|
||||
//result = result * result;
|
||||
// For generalized arcsine:
|
||||
RealType cos2hpip = cos(half_pi<RealType>() * q);
|
||||
RealType cos2hpip2 = cos2hpip * cos2hpip;
|
||||
result = -x_min * cos2hpip2 + x_min + x_max * cos2hpip2;
|
||||
|
||||
return result;
|
||||
} // Quantile Complement
|
||||
|
||||
} // namespace math
|
||||
} // namespace boost
|
||||
|
||||
// This include must be at the end, *after* the accessors
|
||||
// for this distribution have been defined, in order to
|
||||
// keep compilers that support two-phase lookup happy.
|
||||
#include <boost/math/distributions/detail/derived_accessors.hpp>
|
||||
|
||||
#if defined (BOOST_MSVC)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
||||
#endif // BOOST_MATH_DIST_ARCSINE_HPP
|
||||
@@ -0,0 +1,36 @@
|
||||
// (C) Copyright John Maddock 2005.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#ifndef BOOST_MATH_COMPLEX_ATAN_INCLUDED
|
||||
#define BOOST_MATH_COMPLEX_ATAN_INCLUDED
|
||||
|
||||
#ifndef BOOST_MATH_COMPLEX_DETAILS_INCLUDED
|
||||
# include <boost/math/complex/details.hpp>
|
||||
#endif
|
||||
#ifndef BOOST_MATH_COMPLEX_ATANH_INCLUDED
|
||||
# include <boost/math/complex/atanh.hpp>
|
||||
#endif
|
||||
|
||||
namespace boost{ namespace math{
|
||||
|
||||
template<class T>
|
||||
std::complex<T> atan(const std::complex<T>& x)
|
||||
{
|
||||
//
|
||||
// We're using the C99 definition here; atan(z) = -i atanh(iz):
|
||||
//
|
||||
if(x.real() == 0)
|
||||
{
|
||||
if(x.imag() == 1)
|
||||
return std::complex<T>(0, std::numeric_limits<T>::has_infinity ? std::numeric_limits<T>::infinity() : static_cast<T>(HUGE_VAL));
|
||||
if(x.imag() == -1)
|
||||
return std::complex<T>(0, std::numeric_limits<T>::has_infinity ? -std::numeric_limits<T>::infinity() : -static_cast<T>(HUGE_VAL));
|
||||
}
|
||||
return ::boost::math::detail::mult_minus_i(::boost::math::atanh(::boost::math::detail::mult_i(x)));
|
||||
}
|
||||
|
||||
} } // namespaces
|
||||
|
||||
#endif // BOOST_MATH_COMPLEX_ATAN_INCLUDED
|
||||
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#if !defined(BOOST_PREDEF_COMPILER_H) || defined(BOOST_PREDEF_INTERNAL_GENERATE_TESTS)
|
||||
#ifndef BOOST_PREDEF_COMPILER_H
|
||||
#define BOOST_PREDEF_COMPILER_H
|
||||
#endif
|
||||
|
||||
#include <boost/predef/compiler/borland.h>
|
||||
#include <boost/predef/compiler/clang.h>
|
||||
#include <boost/predef/compiler/comeau.h>
|
||||
#include <boost/predef/compiler/compaq.h>
|
||||
#include <boost/predef/compiler/diab.h>
|
||||
#include <boost/predef/compiler/digitalmars.h>
|
||||
#include <boost/predef/compiler/dignus.h>
|
||||
#include <boost/predef/compiler/edg.h>
|
||||
#include <boost/predef/compiler/ekopath.h>
|
||||
#include <boost/predef/compiler/gcc_xml.h>
|
||||
#include <boost/predef/compiler/gcc.h>
|
||||
#include <boost/predef/compiler/greenhills.h>
|
||||
#include <boost/predef/compiler/hp_acc.h>
|
||||
#include <boost/predef/compiler/iar.h>
|
||||
#include <boost/predef/compiler/ibm.h>
|
||||
#include <boost/predef/compiler/intel.h>
|
||||
#include <boost/predef/compiler/kai.h>
|
||||
#include <boost/predef/compiler/llvm.h>
|
||||
#include <boost/predef/compiler/metaware.h>
|
||||
#include <boost/predef/compiler/metrowerks.h>
|
||||
#include <boost/predef/compiler/microtec.h>
|
||||
#include <boost/predef/compiler/mpw.h>
|
||||
#include <boost/predef/compiler/palm.h>
|
||||
#include <boost/predef/compiler/pgi.h>
|
||||
#include <boost/predef/compiler/sgi_mipspro.h>
|
||||
#include <boost/predef/compiler/sunpro.h>
|
||||
#include <boost/predef/compiler/tendra.h>
|
||||
#include <boost/predef/compiler/visualc.h>
|
||||
#include <boost/predef/compiler/watcom.h>
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,71 @@
|
||||
// (C) Copyright John Maddock 2001 - 2002.
|
||||
// Use, modification and distribution are subject to the
|
||||
// Boost Software License, Version 1.0. (See accompanying file
|
||||
// LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
// See http://www.boost.org for most recent version.
|
||||
|
||||
#if __IBMCPP__ <= 501
|
||||
# define BOOST_NO_STD_ALLOCATOR
|
||||
#endif
|
||||
|
||||
#define BOOST_HAS_MACRO_USE_FACET
|
||||
#define BOOST_NO_STD_MESSAGES
|
||||
|
||||
// Apple doesn't seem to reliably defined a *unix* macro
|
||||
#if !defined(CYGWIN) && ( defined(__unix__) \
|
||||
|| defined(__unix) \
|
||||
|| defined(unix) \
|
||||
|| defined(__APPLE__) \
|
||||
|| defined(__APPLE) \
|
||||
|| defined(APPLE))
|
||||
# include <unistd.h>
|
||||
#endif
|
||||
|
||||
// C++0x headers not yet implemented
|
||||
//
|
||||
# define BOOST_NO_CXX11_HDR_ARRAY
|
||||
# define BOOST_NO_CXX11_HDR_CHRONO
|
||||
# define BOOST_NO_CXX11_HDR_CODECVT
|
||||
# define BOOST_NO_CXX11_HDR_CONDITION_VARIABLE
|
||||
# define BOOST_NO_CXX11_HDR_FORWARD_LIST
|
||||
# define BOOST_NO_CXX11_HDR_FUTURE
|
||||
# define BOOST_NO_CXX11_HDR_INITIALIZER_LIST
|
||||
# define BOOST_NO_CXX11_HDR_MUTEX
|
||||
# define BOOST_NO_CXX11_HDR_RANDOM
|
||||
# define BOOST_NO_CXX11_HDR_RATIO
|
||||
# define BOOST_NO_CXX11_HDR_REGEX
|
||||
# define BOOST_NO_CXX11_HDR_SYSTEM_ERROR
|
||||
# define BOOST_NO_CXX11_HDR_THREAD
|
||||
# define BOOST_NO_CXX11_HDR_TUPLE
|
||||
# define BOOST_NO_CXX11_HDR_TYPE_TRAITS
|
||||
# define BOOST_NO_CXX11_HDR_TYPEINDEX
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_MAP
|
||||
# define BOOST_NO_CXX11_HDR_UNORDERED_SET
|
||||
# define BOOST_NO_CXX11_NUMERIC_LIMITS
|
||||
# define BOOST_NO_CXX11_ALLOCATOR
|
||||
# define BOOST_NO_CXX11_ATOMIC_SMART_PTR
|
||||
# define BOOST_NO_CXX11_SMART_PTR
|
||||
# define BOOST_NO_CXX11_HDR_FUNCTIONAL
|
||||
# define BOOST_NO_CXX11_HDR_ATOMIC
|
||||
# define BOOST_NO_CXX11_STD_ALIGN
|
||||
# define BOOST_NO_CXX11_ADDRESSOF
|
||||
|
||||
#if defined(__has_include)
|
||||
#if !__has_include(<shared_mutex>)
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
#elif __cplusplus < 201402
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
#endif
|
||||
#else
|
||||
# define BOOST_NO_CXX14_HDR_SHARED_MUTEX
|
||||
#endif
|
||||
|
||||
// C++14 features
|
||||
# define BOOST_NO_CXX14_STD_EXCHANGE
|
||||
|
||||
// C++17 features
|
||||
# define BOOST_NO_CXX17_STD_APPLY
|
||||
# define BOOST_NO_CXX17_STD_INVOKE
|
||||
|
||||
#define BOOST_STDLIB "Visual Age default standard library"
|
||||
Reference in New Issue
Block a user