File indexing completed on 2025-04-19 09:09:56
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083 #ifndef __FJCORE_HH__
0084 #define __FJCORE_HH__
0085 #define __FJCORE__
0086 #define __FJCORE_DROP_CGAL
0087 #ifndef _INCLUDE_FJCORE_CONFIG_AUTO_H
0088 #define _INCLUDE_FJCORE_CONFIG_AUTO_H 1
0089 #ifndef FJCORE_HAVE_CXX14_DEPRECATED
0090 #endif
0091 #ifndef FJCORE_HAVE_DLFCN_H
0092 # define FJCORE_HAVE_DLFCN_H 1
0093 #endif
0094 #ifndef FJCORE_HAVE_EXECINFO_H
0095 #endif
0096 #ifndef FJCORE_HAVE_EXPLICIT_FOR_OPERATORS
0097 #endif
0098 #ifndef FJCORE_HAVE_GNUCXX_DEPRECATED
0099 #endif
0100 #ifndef FJCORE_HAVE_INTTYPES_H
0101 # define FJCORE_HAVE_INTTYPES_H 1
0102 #endif
0103 #ifndef FJCORE_HAVE_LIBM
0104 # define FJCORE_HAVE_LIBM 1
0105 #endif
0106 #ifndef FJCORE_HAVE_MEMORY_H
0107 # define FJCORE_HAVE_MEMORY_H 1
0108 #endif
0109 #ifndef FJCORE_HAVE_OVERRIDE
0110 #endif
0111 #ifndef FJCORE_HAVE_STDINT_H
0112 # define FJCORE_HAVE_STDINT_H 1
0113 #endif
0114 #ifndef FJCORE_HAVE_STDLIB_H
0115 # define FJCORE_HAVE_STDLIB_H 1
0116 #endif
0117 #ifndef FJCORE_HAVE_STRINGS_H
0118 # define FJCORE_HAVE_STRINGS_H 1
0119 #endif
0120 #ifndef FJCORE_HAVE_STRING_H
0121 # define FJCORE_HAVE_STRING_H 1
0122 #endif
0123 #ifndef FJCORE_HAVE_SYS_STAT_H
0124 # define FJCORE_HAVE_SYS_STAT_H 1
0125 #endif
0126 #ifndef FJCORE_HAVE_SYS_TYPES_H
0127 # define FJCORE_HAVE_SYS_TYPES_H 1
0128 #endif
0129 #ifndef FJCORE_HAVE_UNISTD_H
0130 # define FJCORE_HAVE_UNISTD_H 1
0131 #endif
0132 #ifndef FJCORE_LT_OBJDIR
0133 # define FJCORE_LT_OBJDIR ".libs/"
0134 #endif
0135 #ifndef FJCORE_PACKAGE
0136 # define FJCORE_PACKAGE "fastjet"
0137 #endif
0138 #ifndef FJCORE_PACKAGE_BUGREPORT
0139 # define FJCORE_PACKAGE_BUGREPORT ""
0140 #endif
0141 #ifndef FJCORE_PACKAGE_NAME
0142 # define FJCORE_PACKAGE_NAME "FastJet"
0143 #endif
0144 #ifndef FJCORE_PACKAGE_STRING
0145 # define FJCORE_PACKAGE_STRING "FastJet 3.3.2"
0146 #endif
0147 #ifndef FJCORE_PACKAGE_TARNAME
0148 # define FJCORE_PACKAGE_TARNAME "fastjet"
0149 #endif
0150 #ifndef FJCORE_PACKAGE_URL
0151 # define FJCORE_PACKAGE_URL ""
0152 #endif
0153 #ifndef FJCORE_PACKAGE_VERSION
0154 # define FJCORE_PACKAGE_VERSION "3.3.2"
0155 #endif
0156 #ifndef FJCORE_STDC_HEADERS
0157 # define FJCORE_STDC_HEADERS 1
0158 #endif
0159 #ifndef FJCORE_VERSION
0160 # define FJCORE_VERSION "3.3.2"
0161 #endif
0162 #ifndef FJCORE_VERSION_MAJOR
0163 # define FJCORE_VERSION_MAJOR 3
0164 #endif
0165 #ifndef FJCORE_VERSION_MINOR
0166 # define FJCORE_VERSION_MINOR 3
0167 #endif
0168 #ifndef FJCORE_VERSION_NUMBER
0169 # define FJCORE_VERSION_NUMBER 30302
0170 #endif
0171 #ifndef FJCORE_VERSION_PATCHLEVEL
0172 # define FJCORE_VERSION_PATCHLEVEL 2
0173 #endif
0174 #endif
0175 #ifndef __FJCORE_CONFIG_H__
0176 #define __FJCORE_CONFIG_H__
0177 #endif
0178 #ifndef __FJCORE_FASTJET_BASE_HH__
0179 #define __FJCORE_FASTJET_BASE_HH__
0180 #define FJCORE_BEGIN_NAMESPACE namespace fjcore {
0181 #define FJCORE_END_NAMESPACE }
0182 #ifdef FJCORE_HAVE_OVERRIDE
0183 # define FJCORE_OVERRIDE override
0184 #else
0185 # define FJCORE_OVERRIDE
0186 #endif
0187 #endif
0188 #ifndef __FJCORE_NUMCONSTS__
0189 #define __FJCORE_NUMCONSTS__
0190 FJCORE_BEGIN_NAMESPACE
0191 const double pi = 3.141592653589793238462643383279502884197;
0192 const double twopi = 6.283185307179586476925286766559005768394;
0193 const double pisq = 9.869604401089358618834490999876151135314;
0194 const double zeta2 = 1.644934066848226436472415166646025189219;
0195 const double zeta3 = 1.202056903159594285399738161511449990765;
0196 const double eulergamma = 0.577215664901532860606512090082402431042;
0197 const double ln2 = 0.693147180559945309417232121458176568076;
0198 FJCORE_END_NAMESPACE
0199 #endif
0200 #ifndef __FJCORE_INTERNAL_IS_BASE_HH__
0201 #define __FJCORE_INTERNAL_IS_BASE_HH__
0202 FJCORE_BEGIN_NAMESPACE
0203 template<typename T, T _t>
0204 struct integral_type{
0205 static const T value = _t;
0206 typedef T value_type;
0207 typedef integral_type<T,_t> type;
0208 };
0209 template<typename T, T _t>
0210 const T integral_type<T, _t>::value;
0211 typedef integral_type<bool, true> true_type;
0212 typedef integral_type<bool, false> false_type;
0213 typedef char (&__yes_type)[1];
0214 typedef char (&__no_type) [2];
0215 template<typename B, typename D>
0216 struct __inheritance_helper{
0217 #if !((_MSC_VER !=0 ) && (_MSC_VER == 1310))
0218 template <typename T>
0219 static __yes_type check_sig(D const volatile *, T);
0220 #else
0221 static __yes_type check_sig(D const volatile *, long);
0222 #endif
0223 static __no_type check_sig(B const volatile *, int);
0224 };
0225 template<typename B, typename D>
0226 struct IsBaseAndDerived{
0227 #if ((_MSC_FULL_VER != 0) && (_MSC_FULL_VER >= 140050000))
0228 #pragma warning(push)
0229 #pragma warning(disable:6334)
0230 #endif
0231 struct Host{
0232 #if !((_MSC_VER !=0 ) && (_MSC_VER == 1310))
0233 operator B const volatile *() const;
0234 #else
0235 operator B const volatile * const&() const;
0236 #endif
0237 operator D const volatile *();
0238 };
0239 static const bool value = ((sizeof(B)!=0) &&
0240 (sizeof(D)!=0) &&
0241 (sizeof(__inheritance_helper<B,D>::check_sig(Host(), 0)) == sizeof(__yes_type)));
0242 #if ((_MSC_FULL_VER != 0) && (_MSC_FULL_VER >= 140050000))
0243 #pragma warning(pop)
0244 #endif
0245 };
0246 template<class B, class D>
0247 B* cast_if_derived(D* d){
0248 return IsBaseAndDerived<B,D>::value ? (B*)(d) : 0;
0249 }
0250 FJCORE_END_NAMESPACE
0251 #endif
0252 #ifndef __FJCORE_FJCORE_DEPRECATED_HH__
0253 #define __FJCORE_FJCORE_DEPRECATED_HH__
0254 #ifndef SWIG
0255 #if defined(FJCORE_HAVE_CXX14_DEPRECATED) and (!defined(__FJCORE__))
0256 # define FJCORE_DEPRECATED [[deprecated]]
0257 # define FJCORE_DEPRECATED_MSG(message) [[deprecated(message)]]
0258 #elif defined(FJCORE_HAVE_GNUCXX_DEPRECATED)
0259 # define FJCORE_DEPRECATED __attribute__((__deprecated__))
0260 # define FJCORE_DEPRECATED_MSG(message) __attribute__((__deprecated__))
0261 #else
0262 # define FJCORE_DEPRECATED
0263 # define FJCORE_DEPRECATED_MSG(message)
0264 #endif
0265 #else
0266 # define FJCORE_DEPRECATED
0267 # define FJCORE_DEPRECATED_MSG(message)
0268 #endif
0269 #endif
0270 #ifndef __FJCORE_SHARED_PTR_HH__
0271 #define __FJCORE_SHARED_PTR_HH__
0272 #include <cstdlib> // for NULL!!!
0273 #ifdef __FJCORE_USETR1SHAREDPTR
0274 #include <tr1/memory>
0275 #endif
0276 FJCORE_BEGIN_NAMESPACE
0277 #ifdef __FJCORE_USETR1SHAREDPTR
0278 template<class T>
0279 class SharedPtr : public std::tr1::shared_ptr<T> {
0280 public:
0281 SharedPtr() : std::tr1::shared_ptr<T>() {}
0282 SharedPtr(T * t) : std::tr1::shared_ptr<T>(t) {}
0283 SharedPtr(const SharedPtr<T> & t) : std::tr1::shared_ptr<T>(t) {}
0284 #ifdef FJCORE_HAVE_EXPLICIT_FOR_OPERATORS
0285 explicit
0286 #endif
0287 inline operator bool() const {return (this->get()!=NULL);}
0288 T* operator ()() const{
0289 return this->get();
0290 }
0291 };
0292 #else
0293 template<class T>
0294 class SharedPtr{
0295 public:
0296 class __SharedCountingPtr;
0297 SharedPtr() : _ptr(NULL){}
0298 template<class Y> explicit SharedPtr(Y* ptr){
0299 _ptr = new __SharedCountingPtr(ptr);
0300 }
0301 SharedPtr(SharedPtr const & share) : _ptr(share._get_container()){
0302 if (_ptr!=NULL) ++(*_ptr);
0303 }
0304 ~SharedPtr(){
0305 if (_ptr==NULL) return;
0306 _decrease_count();
0307 }
0308 void reset(){
0309 SharedPtr().swap(*this);
0310 }
0311 template<class Y> void reset(Y * ptr){
0312 SharedPtr(ptr).swap(*this);
0313 }
0314 template<class Y> void reset(SharedPtr<Y> const & share){
0315 if (_ptr!=NULL){
0316 if (_ptr == share._get_container()) return;
0317 _decrease_count();
0318 }
0319 _ptr = share._get_container();
0320 if (_ptr!=NULL) ++(*_ptr);
0321 }
0322 SharedPtr& operator=(SharedPtr const & share){
0323 reset(share);
0324 return *this;
0325 }
0326 template<class Y> SharedPtr& operator=(SharedPtr<Y> const & share){
0327 reset(share);
0328 return *this;
0329 }
0330 FJCORE_DEPRECATED_MSG("Use SharedPtr<T>::get() instead")
0331 T* operator ()() const{
0332 if (_ptr==NULL) return NULL;
0333 return _ptr->get();
0334 }
0335 inline T& operator*() const{
0336 return *(_ptr->get());
0337 }
0338 inline T* operator->() const{
0339 if (_ptr==NULL) return NULL;
0340 return _ptr->get();
0341 }
0342 inline T* get() const{
0343 if (_ptr==NULL) return NULL;
0344 return _ptr->get();
0345 }
0346 inline bool unique() const{
0347 return (use_count()==1);
0348 }
0349 inline long use_count() const{
0350 if (_ptr==NULL) return 0;
0351 return _ptr->use_count();
0352 }
0353 #ifdef FJCORE_HAVE_EXPLICIT_FOR_OPERATORS
0354 explicit
0355 #endif
0356 inline operator bool() const{
0357 return (get()!=NULL);
0358 }
0359 inline void swap(SharedPtr & share){
0360 __SharedCountingPtr* share_container = share._ptr;
0361 share._ptr = _ptr;
0362 _ptr = share_container;
0363 }
0364 void set_count(const long & count){
0365 if (_ptr==NULL) return;
0366 _ptr->set_count(count);
0367 }
0368 class __SharedCountingPtr{
0369 public:
0370 __SharedCountingPtr() : _ptr(NULL), _count(0){}
0371 template<class Y> explicit __SharedCountingPtr(Y* ptr) : _ptr(ptr), _count(1){}
0372 ~__SharedCountingPtr(){
0373 if (_ptr!=NULL){ delete _ptr;}
0374 }
0375 inline T* get() const {return _ptr;}
0376 inline long use_count() const {return _count;}
0377 inline long operator++(){return ++_count;}
0378 inline long operator--(){return --_count;}
0379 inline long operator++(int){return _count++;}
0380 inline long operator--(int){return _count--;}
0381 void set_count(const long & count){
0382 _count = count;
0383 }
0384 private:
0385 T *_ptr;
0386 long _count;
0387 };
0388 private:
0389 inline __SharedCountingPtr* _get_container() const{
0390 return _ptr;
0391 }
0392 void _decrease_count(){
0393 (*_ptr)--;
0394 if (_ptr->use_count()==0)
0395 delete _ptr;
0396 }
0397 __SharedCountingPtr *_ptr;
0398 };
0399 template<class T,class U>
0400 inline bool operator==(SharedPtr<T> const & t, SharedPtr<U> const & u){
0401 return t.get() == u.get();
0402 }
0403 template<class T,class U>
0404 inline bool operator!=(SharedPtr<T> const & t, SharedPtr<U> const & u){
0405 return t.get() != u.get();
0406 }
0407 template<class T,class U>
0408 inline bool operator<(SharedPtr<T> const & t, SharedPtr<U> const & u){
0409 return t.get() < u.get();
0410 }
0411 template<class T>
0412 inline void swap(SharedPtr<T> & a, SharedPtr<T> & b){
0413 return a.swap(b);
0414 }
0415 template<class T>
0416 inline T* get_pointer(SharedPtr<T> const & t){
0417 return t.get();
0418 }
0419 #endif
0420 FJCORE_END_NAMESPACE
0421 #endif
0422 #ifndef __FJCORE_LIMITEDWARNING_HH__
0423 #define __FJCORE_LIMITEDWARNING_HH__
0424 #include <iostream>
0425 #include <string>
0426 #include <list>
0427 FJCORE_BEGIN_NAMESPACE
0428 class LimitedWarning {
0429 public:
0430 LimitedWarning() : _max_warn(_max_warn_default), _n_warn_so_far(0), _this_warning_summary(0) {}
0431 LimitedWarning(int max_warn_in) : _max_warn(max_warn_in), _n_warn_so_far(0), _this_warning_summary(0) {}
0432 void warn(const char * warning) {warn(warning, _default_ostr);}
0433 void warn(const std::string & warning) {warn(warning.c_str(), _default_ostr);}
0434 void warn(const char * warning, std::ostream * ostr);
0435 void warn(const std::string & warning, std::ostream * ostr) {warn(warning.c_str(), ostr);}
0436 static void set_default_stream(std::ostream * ostr) {
0437 _default_ostr = ostr;
0438 }
0439 static void set_default_max_warn(int max_warn) {
0440 _max_warn_default = max_warn;
0441 }
0442 int max_warn() const {return _max_warn;}
0443 int n_warn_so_far() const {return _n_warn_so_far;}
0444 static std::string summary();
0445 private:
0446 int _max_warn, _n_warn_so_far;
0447 static int _max_warn_default;
0448 static std::ostream * _default_ostr;
0449 typedef std::pair<std::string, unsigned int> Summary;
0450 static std::list< Summary > _global_warnings_summary;
0451 Summary * _this_warning_summary;
0452 };
0453 FJCORE_END_NAMESPACE
0454 #endif
0455 #ifndef __FJCORE_ERROR_HH__
0456 #define __FJCORE_ERROR_HH__
0457 #include