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