.../
... + -- EO
| |
| |
+-- src ----- + -- EDO
| |
| |
+-- test + -- MO
| |
| |
+-- tutorial + -- MOEO
| |
| |
+-- doc + -- SMP
| |
| |
... + -- EOMPI
|
|
+ -- EOSERIAL
Question for current maintainers: ./README: new release?
Also:
* Moving out eompi & eoserial modules (issue #2).
* Correction of the errors when executing "make doc" command.
* Adding a solution for the conflicting headers problem (see the two CMake Cache
Values: PROJECT_TAG & PROJECT_HRS_INSTALL_SUBPATH) (issue #1)
* Header inclusions:
** src: changing absolute paths into relative paths ('#include <...>' -> '#include "..."')
** test, tutorial: changing relative paths into absolute paths ('#include "..."' -> '#include <...>')
* Moving out some scripts from EDO -> to the root
* Add a new script for compilation and installation (see build_gcc_linux_install)
* Compilation with uBLAS library or EDO module: now ok
* Minor modifications on README & INSTALL files
* Comment eompi failed tests with no end
*** TODO: CPack (debian (DEB) & RedHat (RPM) packages) (issues #6 & #7) ***
248 lines
6 KiB
C++
Executable file
248 lines
6 KiB
C++
Executable file
/* Boost interval/compare/explicit.hpp template implementation file
|
|
*
|
|
* Copyright 2000 Jens Maurer
|
|
* Copyright 2002 Hervé Brönnimann, Guillaume Melquiond, Sylvain Pion
|
|
*
|
|
* 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_INTERVAL_COMPARE_EXPLICIT_HPP
|
|
#define BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|
|
|
|
#include <boost/numeric/interval/detail/interval_prototype.hpp>
|
|
|
|
namespace boost {
|
|
namespace numeric {
|
|
namespace interval_lib {
|
|
|
|
/*
|
|
* Certainly... operations
|
|
*/
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cerlt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() < y.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerlt(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() < y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerlt(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x < y.lower();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cerle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() <= y.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerle(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() <= y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerle(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x <= y.lower();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cergt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.lower() > y.upper();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cergt(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.lower() > y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cergt(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x > y.upper();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cerge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.lower() >= y.upper();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerge(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.lower() >= y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerge(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x >= y.upper();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cereq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.lower() == y.upper() && y.lower() == x.upper();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cereq(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.lower() == y && x.upper() == y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cereq(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x == y.lower() && x == y.upper();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool cerne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() < y.lower() || y.upper() < x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerne(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() < y || y < x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool cerne(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x < y.lower() || y.upper() < x;
|
|
}
|
|
|
|
/*
|
|
* Possibly... comparisons
|
|
*/
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool poslt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.lower() < y.upper();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool poslt(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.lower() < y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool poslt(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x < y.upper();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool posle(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.lower() <= y.upper();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posle(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.lower() <= y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posle(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x <= y.upper();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool posgt(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() > y.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posgt(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() > y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posgt(const T& x, const interval<T, Policies> & y)
|
|
{
|
|
return x > y.lower();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool posge(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() >= y.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posge(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() >= y;
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posge(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x >= y.lower();
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool poseq(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() >= y.lower() && y.upper() >= x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool poseq(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() >= y && y >= x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool poseq(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x >= y.lower() && y.upper() >= x;
|
|
}
|
|
|
|
template<class T, class Policies1, class Policies2> inline
|
|
bool posne(const interval<T, Policies1>& x, const interval<T, Policies2>& y)
|
|
{
|
|
return x.upper() != y.lower() || y.upper() != x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posne(const interval<T, Policies>& x, const T& y)
|
|
{
|
|
return x.upper() != y || y != x.lower();
|
|
}
|
|
|
|
template<class T, class Policies> inline
|
|
bool posne(const T& x, const interval<T, Policies>& y)
|
|
{
|
|
return x != y.lower() || y.upper() != x;
|
|
}
|
|
|
|
} // namespace interval_lib
|
|
} // namespace numeric
|
|
} //namespace boost
|
|
|
|
#endif // BOOST_NUMERIC_INTERVAL_COMPARE_EXPLICIT_HPP
|