Jpp  17.3.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Typedefs | Functions | Variables
JTOOLS Namespace Reference

Auxiliary classes and methods for multi-dimensional interpolations and histograms. More...

Classes

struct  JAbstractCollection
 Abstract interface for abscissa values of a collection of elements. More...
 
struct  JAbstractHistogram
 Simple data structure for histogram binning. More...
 
struct  JAbstractMultiMap
 Abstract interface for abscissa values of a multidimensional map. More...
 
struct  JAbstractMultiMap< 0, JAbscissa_t >
 Terminator class of recursive class JAbstractMultiMap. More...
 
class  JArray
 One dimensional array of template objects with fixed length. More...
 
class  JArray< 1, T >
 One dimensional array of template objects with fixed length. More...
 
class  JArray< N, const T >
 One dimensional read-only array of template objects with fixed length. More...
 
class  JArray< 1, const T >
 One dimensional read-only array of template objects with fixed length. More...
 
struct  JArrayIterator
 ND array iterator. More...
 
struct  JArrayIterator< 1, T >
 1D array iterator. More...
 
struct  JAssembler
 Auxiliary class to check whether given template is a collection, i.e. has a defined type collection_type. More...
 
struct  JAssembler< T, typename JVoid< typename T::collection_type >::type >
 Template specialisation of class JAssembler for classes with a defined type collection_type. More...
 
class  JAutoMap
 Wrapper class around std::map for automatic insertion of elements based on data types. More...
 
struct  JAutomate
 Auxiliary class for automatic element creation. More...
 
struct  JAutomate< JAutoMap< JKey_t, JValue_t > >
 Specialisation of class JAutomate for class JAutoMap. More...
 
class  JCollection
 General purpose class for collection of elements, see: Collection of elements. . More...
 
class  JCombinatorics
 Auxiliary class to convert pair of indices to unique index and back. More...
 
class  JConstantFunction1D
 Template implementation of function object in one dimension returning a constant value. More...
 
struct  JDistance
 Template class for distance evaluation. More...
 
class  JDriver
 Auxiliary class to load and store objects. More...
 
struct  JElement2D
 2D Element. More...
 
struct  JSplineElement2D
 2D Element for spline interpolations. More...
 
struct  JSplineElement2S
 2D Element for spline interpolations. More...
 
struct  JPolintElement2S
 2D Element for polynomial interpolations. More...
 
struct  JBin2D
 2D Binned element. More...
 
struct  JElement3D
 3D Element. More...
 
struct  JGridSplineFunction1D
 Type definition of a spline interpolation based on a JGridCollection. More...
 
struct  JSplineFunction1D_t
 Type definition of a spline interpolation method based on a JCollection with double result type. More...
 
struct  JSplineFunction1H_t
 Type definition of a spline interpolation method based on a JCollection with JResultDerivative result type. More...
 
struct  JSplineFunction1S_t
 Type definition of a spline interpolation method based on a JCollection with JResultPDF result type. More...
 
struct  JGridSplineFunction1D_t
 Type definition of a spline interpolation based on a JGridCollection with result type double. More...
 
struct  JGridSplineFunction1H_t
 Type definition of a spline interpolation based on a JGridCollection with JResultDerivative result type. More...
 
struct  JGridSplineFunction1S_t
 Type definition of a spline interpolation based on a JGridCollection with JResultPDF result type. More...
 
struct  JGridHermiteSplineFunction1D
 Type definition of a spline interpolation based on a JGridCollection. More...
 
struct  JHermiteSplineFunction1D_t
 Type definition of a spline interpolation method based on a JCollection with double result type. More...
 
struct  JHermiteSplineFunction1H_t
 Type definition of a spline interpolation method based on a JCollection with JResultDerivative result type. More...
 
struct  JHermiteSplineFunction1S_t
 Type definition of a spline interpolation method based on a JCollection with JResultPDF result type. More...
 
struct  JGridHermiteSplineFunction1D_t
 Type definition of a spline interpolation based on a JGridCollection with result type double. More...
 
struct  JGridHermiteSplineFunction1H_t
 Type definition of a spline interpolation based on a JGridCollection with JResultDerivative result type. More...
 
struct  JPolint0Function1D
 Type definition of a zero degree polynomial interpolation. More...
 
struct  JPolint1Function1D
 Type definition of a 1st degree polynomial interpolation. More...
 
struct  JPolint2Function1D
 Type definition of a 2nd degree polynomial interpolation. More...
 
struct  JPolint3Function1D
 Type definition of a 3rd degree polynomial interpolation. More...
 
struct  JPolintFunction1D_t
 Polynomial interpolation method with result type double. More...
 
struct  JPolint0Function1D_t
 Type definition of a zero degree polynomial interpolation with result type double. More...
 
struct  JPolint1Function1D_t
 Type definition of a 1st degree polynomial interpolation with result type double. More...
 
struct  JPolint2Function1D_t
 Type definition of a 2nd degree polynomial interpolation with result type double. More...
 
struct  JPolint3Function1D_t
 Type definition of a 3rd degree polynomial interpolation with result type double. More...
 
struct  JPolintFunction1H_t
 Polynomial interpolation method with result type JResultDerivative. More...
 
struct  JPolint1Function1H_t
 Type definition of a 1st degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolint2Function1H_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolint3Function1H_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JPolintFunction1S_t
 Polynomial interpolation method with result type JResultPDF. More...
 
struct  JPolint1Function1S_t
 Type definition of a 1st degree polynomial interpolation with result type JResultPDF. More...
 
struct  JPolint2Function1S_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultPDF. More...
 
struct  JPolint3Function1S_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultPDF. More...
 
struct  JGridPolintFunction1D_t
 Polynomial interpolation method based on a JGridCollection with result type double. More...
 
struct  JGridPolint0Function1D_t
 Type definition of a zero degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint1Function1D_t
 Type definition of a 1st degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint2Function1D_t
 Type definition of a 2nd degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolint3Function1D_t
 Type definition of a 3rd degree polynomial interpolation based on a JGridCollection with result type double. More...
 
struct  JGridPolintFunction1H_t
 Polynomial interpolation method based on a JGridCollection with result type JResultDerivative. More...
 
struct  JGridPolint1Function1H_t
 Type definition of a 1st degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolint2Function1H_t
 Type definition of a 2nd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolint3Function1H_t
 Type definition of a 3rd degree polynomial interpolation with result type JResultDerivative. More...
 
struct  JGridPolintFunction1S_t
 Polynomial interpolation method with result type JResultPDF. More...
 
struct  JGridPolint1Function1S_t
 Type definition of a 1st degree polynomial interpolation with result type JResulPDF. More...
 
struct  JGridPolint2Function1S_t
 Type definition of a 2nd degree polynomial interpolation with result type JResulPDF. More...
 
struct  JGridPolint3Function1S_t
 Type definition of a 3rd degree polynomial interpolation with result type JResulPDF. More...
 
class  JFunctional
 Template definition of function object interface. More...
 
class  JFunctional< JNullType, JNullType >
 Template specialisation of compilable function object. More...
 
struct  JFunction
 Template definition of function object interface in multidimensions. More...
 
struct  JFunction1D
 Template definition of function object interface in one dimension. More...
 
struct  JCompiler
 Functional object compiler. More...
 
struct  JResultType
 Auxiliary class to evaluate result type. More...
 
struct  JResultType< JClass_t, typename JVoid< typename JClass_t::result_type >::type >
 Auxiliary class to evaluate result type. More...
 
struct  JFunctionalMap
 Auxiliary class to define corresponding one-dimensional function interpolator function_type. More...
 
struct  JFunctionalMap< JSplineFunctionalMap >
 Specialisation of JFunctionalMap for JSplineFunctionalMap. More...
 
struct  JFunctionalMap< JSplineFunctionalGridMap >
 Specialisation of JFunctionalMap for JSplineFunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint0FunctionalMap >
 Specialisation of JFunctionalMap for JPolint0FunctionalMap. More...
 
struct  JFunctionalMap< JPolint1FunctionalMap >
 Specialisation of JFunctionalMap for JPolint1FunctionalMap. More...
 
struct  JFunctionalMap< JPolint2FunctionalMap >
 Specialisation of JFunctionalMap for JPolint2FunctionalMap. More...
 
struct  JFunctionalMap< JPolint3FunctionalMap >
 Specialisation of JFunctionalMap for JPolint3FunctionalMap. More...
 
struct  JFunctionalMap< JPolint0FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint0FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint1FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint1FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint2FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint2FunctionalGridMap. More...
 
struct  JFunctionalMap< JPolint3FunctionalGridMap >
 Specialisation of JFunctionalMap for JPolint3FunctionalGridMap. More...
 
struct  JSplineFunctionalMap
 Type definition of a spline interpolation based on a JMap implementation. More...
 
struct  JSplineFunctionalGridMap
 Type definition of a spline interpolation based on a JGridMap implementation. More...
 
struct  JPolint0FunctionalMap
 Type definition of a zero degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint1FunctionalMap
 Type definition of a 1st degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint2FunctionalMap
 Type definition of a 2nd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint3FunctionalMap
 Type definition of a 3rd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint0FunctionalGridMap
 Type definition of a zero degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint1FunctionalGridMap
 Type definition of a 1st degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint2FunctionalGridMap
 Type definition of a 2nd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint3FunctionalGridMap
 Type definition of a 3rd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JSplineFunctionalMapH
 Type definition of a spline interpolation based on a JMap implementation. More...
 
struct  JSplineFunctionalGridMapH
 Type definition of a spline interpolation based on a JGridMap implementation. More...
 
struct  JPolint0FunctionalMapH
 Type definition of a zero degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint1FunctionalMapH
 Type definition of a 1st degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint2FunctionalMapH
 Type definition of a 2nd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint3FunctionalMapH
 Type definition of a 3rd degree polynomial interpolation based on a JMap implementation. More...
 
struct  JPolint0FunctionalGridMapH
 Type definition of a zero degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint1FunctionalGridMapH
 Type definition of a 1st degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint2FunctionalGridMapH
 Type definition of a 2nd degree polynomial interpolation based on a JGridMap implementation. More...
 
struct  JPolint3FunctionalGridMapH
 Type definition of a 3rd degree polynomial interpolation based on a JGridMap implementation. More...
 
class  JExternalFunction1D
 Template implementation of function object in one dimension using an external function. More...
 
class  JFunctionObject1D
 Template implementation of function object in one dimension. More...
 
class  JGarbageCollection
 Garbage collection. More...
 
struct  JGrid
 Simple data structure for an abstract collection of equidistant abscissa values. More...
 
class  JGridCollection
 General purpose class for collection of equidistant elements. More...
 
class  JGridMap
 Map of equidistant pair-wise elements. More...
 
struct  JMapCollection< JGridMap >
 Specialisation of JMapCollection for JGridMap. More...
 
class  JHashCollection
 General purpose class for hash collection of unique elements. More...
 
struct  JHashEvaluator
 Auxiliary class for default hash key evaluation. More...
 
struct  JHashMapEvaluator
 Auxiliary class for hash evaluation of map keys and elements. More...
 
struct  JHashMap
 General purpose class for hash map of unique keys. More...
 
class  JHashSet
 General purpose class for hash set of elements. More...
 
class  JHermiteSplineCollection
 Template base class spline interpolations. More...
 
class  JHermiteSplineFunction
 Template definition for functional collection with spline interpolation. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with spline interpolation. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultDerivative data structure. More...
 
class  JHermiteSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultPDF data structure. More...
 
class  JHermiteSplineFunction1D
 Template class for spline interpolation in 1D. More...
 
class  JHermiteSplineMap
 Functional map with spline interpolation. More...
 
struct  JHesseMatrix
 Hessian matrix. More...
 
class  JHistogram
 Template definition of histogram object interface. More...
 
struct  JCumulator
 Functional histogram cumulator. More...
 
struct  JRebin
 Auxiliary class for merging of fixed number of consecutive bins. More...
 
struct  JContent
 Auxiliary class for merging of consecutive bins until minimal content is reached. More...
 
class  JHistogram1D
 Histogram in 1D. More...
 
class  JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t >
 Template specialisation if JHistogram1D class with bin centering. More...
 
class  JHistogramMap
 Histogram map. More...
 
struct  JHistogramMap_t
 Type definition of a JHistogramMap based on JMap implementation. More...
 
struct  JHistogramGridMap_t
 Type definition of a JHistogramMap based on JGridMap implementation. More...
 
class  JList
 Recursive template class. More...
 
class  JList< 1, T, JClass_t >
 Terminator class of recursive template class. More...
 
class  JList< 0, T, JClass_t >
 Template specialisation of obsolete JList<unsigned int, ...> class. More...
 
class  JMap
 Map of pair-wise elements. More...
 
struct  JMapCollection< JMap >
 Specialisation of JMapCollection for JMap. More...
 
struct  JMapCollection
 Template class to define the corresponding JCollection for a given template JMap. More...
 
struct  JMapList
 Map list. More...
 
struct  JMapList< JHead_t, JNullType >
 Terminator class of map list. More...
 
struct  JMapLength
 Length of map list. More...
 
struct  JMapLength< JMapList< JHead_t, JTail_t > >
 Recursive length of map list. More...
 
struct  JMapLength< JMapList< JHead_t, JNullType > >
 Terminator class of length of map list. More...
 
struct  JNullMap
 Auxiliary class for no map definition. More...
 
struct  JMAPLIST
 Auxiliary class for recursive map list generation. More...
 
struct  JMAPLIST< A, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap, JNullMap >
 Template specialisation to terminate recursive map list generation. More...
 
struct  JMappableCollection
 Template interface definition for associative collection of elements. More...
 
struct  JMappable
 Auxiliary class to define JMappableCollection for given template. More...
 
class  JMergeSort
 This class implements a merge and sort algorithm based on the divide-and-conquer concept. More...
 
class  JMultiFunction
 Multidimensional interpolation method. More...
 
class  JMultiFunction< JConstantFunction1D< JArgument_t, JResult_t >, JMapList< JMap_t >, JDistance_t >
 Template specialisation of JMultiFunction for a JConstantFunction. More...
 
class  JMultiFunction< JConstantFunction1D< JArgument_t, JResult_t >, JMaplist_t, JDistance_t >
 Template specialisation of JMultiFunction for a JConstantFunction. More...
 
struct  JMultiGrid
 Simple data structure for an abstract multidimensional map of equidistant elements. More...
 
struct  JMultiGrid< 0, JAbscissa_t >
 Terminator class of recursive class JMultiGrid. More...
 
struct  JHashMap< JTypeList< JHead_t, JTail_t >, JValue_t, JEvaluator_t >
 Multi-dimensional hash map. More...
 
struct  JHashMap< JTypeList< JHead_t, JNullType >, JValue_t, JEvaluator_t >
 Terminator class of recursive class JHashMap. More...
 
class  JMultiHistogram
 Multidimensional histogram. More...
 
class  JMultiKey
 Multidimensional key. More...
 
class  JMultiKey< 2, JKey_t >
 Two-dimensional key. More...
 
class  JMultiKey< 1, JKey_t >
 One-dimensional key. More...
 
class  JMultiKey< 0, JKey_t >
 Empty key. More...
 
class  JMultiMap
 Multidimensional map. More...
 
class  JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JTail_t >, JDistance_t >
 Template specialisation of JMultiMap for map list with at least one map. More...
 
class  JMultiMap< JAbscissa_t, JOrdinate_t, JMapList< JHead_t, JLANG::JNullType >, JDistance_t >
 Terminator class of recursive JMultiMap class. More...
 
class  JMultiMapTransformer
 Interface for weight application and coordinate transformation of function. More...
 
class  JMultiMapPutTransformer
 Auxiliary class to convert JMultiMapTransformer to JCollectionElementTransformer. More...
 
class  JMultiMapGetTransformer
 Auxiliary class to convert JMultiMapTransformer to JCollectionElementTransformer. More...
 
struct  JTransformable
 Abstract interface for transformable multidimensional map. More...
 
class  JMultiPair
 Multidimensional pair. More...
 
class  JMultiPair< 2, JKey_t, JValue_t >
 Two-dimensional pair. More...
 
class  JMultiPair< 1, JKey_t, JValue_t >
 One-dimensional pair. More...
 
class  JMultiPair< 0, JKey_t, JValue_t >
 Empty pair. More...
 
class  JMultiPDF
 General purpose class for multi-dimensional probability density function (PDF). More...
 
struct  JMultipleMap
 List of identical maps. More...
 
struct  JMultipleMap< 1, JMap_t >
 Terminator class of list of identical maps. More...
 
struct  JMultiSet
 Simple data structure for an abstract multidimensional map of equidistant elements. More...
 
struct  JMultiSet< 0, JAbscissa_t >
 Terminator class of recursive class JMultiSet. More...
 
class  JPair
 Template specialisation for a pair of values. More...
 
class  JPair< JKey_t &, JValue_t & >
 Template specialisation for a pair of references. More...
 
class  JPair< const JKey_t &, JValue_t & >
 Template specialisation for a mixed pair of const and non-const references. More...
 
class  JPair< const JKey_t &, const JValue_t & >
 Template specialisation for a pair of const references. More...
 
class  JPolfitFunction
 Functional collection with Legendre polynomial interpolation. More...
 
class  JPolfitFunction1D
 Template class for polynomial interpolation in 1D. More...
 
class  JPolintFunction
 Template definition for functional collection with polynomial interpolation. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with polynomial interpolation. More...
 
class  JPolintFunction< 0, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for zero-degree polynomial interpolation method. More...
 
class  JPolintFunction< 1, JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for first-degree polynomial interpolation method. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultPDF data structure. More...
 
class  JPolintCollection
 Template definition of base class for polynomial interpolations with polynomial result. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultPolynome< M, typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultPolynome data structure. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultDerivative data structure. More...
 
class  JPolintFunction< N, JElement_t, JCollection_t, JResultHesse< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for polynomial interpolation method with returning JResultHesse data structure. More...
 
class  JPolintFunction1D
 Template class for polynomial interpolation in 1D. More...
 
class  JPolintMap
 Functional map with polynomial interpolation. More...
 
class  JQuadrature
 Type definition for numerical integration. More...
 
class  JGaussLegendre
 Numerical integrator for $ W(x) = 1 $. More...
 
class  JGaussLaguerre
 Numerical integrator for $ W(x) = x^{a} \, e^{-x} $. More...
 
class  JGaussHermite
 Numerical integrator for $ W(x) = e^{-x^{2}} $. More...
 
class  JHenyeyGreenstein
 Numerical integrator for $ W(x) = (1 + g^{2} - 2gx)^{a} $, where $ g > 0 $. More...
 
class  JRayleigh
 Numerical integrator for $ W(x) = 1 + g \, x^{2} $, where $ g > 0 $. More...
 
class  JCotangent
 Numerical integrator for $ W(x) = \left|x\right| / \sqrt{1 - x^{2}} $. More...
 
class  JBitangent
 Numerical integrator for $ W(x) = \left|x\right| / \sqrt{1 - x^{2}} $ for $ x > 0 $ and $ W(x) = 1 $ for $ x \le 0 $. More...
 
struct  JQuantile
 Auxiliary data structure for running average, standard deviation and quantiles. More...
 
class  JQuantiles
 Quantile calculator for a given function. More...
 
class  JRange
 Range of values. More...
 
struct  JResultDerivative
 Data structure for result including value and first derivative of function. More...
 
struct  JResultHesse
 Data structure for result including value and first derivative of function. More...
 
struct  JResultPDF
 Data structure for result including value, first derivative and integrals of function. More...
 
struct  JResultPolynome
 Data structure for result including value and N derivatives of function. More...
 
struct  JResultEvaluator
 Auxiliary class to recursively evaluate to a result. More...
 
struct  JResultEvaluator< JResultDerivative< T > >
 Template specialisation of JResultEvaluator for JResultDerivative. More...
 
struct  JResultEvaluator< JResultHesse< T > >
 Template specialisation of JResultEvaluator for JResultHesse. More...
 
struct  JResultEvaluator< JResultPDF< T > >
 Template specialisation of JResultEvaluator for JResultPDF. More...
 
struct  JResultEvaluator< JResultPolynome< N, T > >
 Template specialisation of JResultEvaluator for JResultPolynome. More...
 
struct  JResultEvaluator< JResultPolynome< 0, T > >
 Template specialisation of JResultEvaluator for JResultPolynome. More...
 
struct  JResultTransformer
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
struct  JResultTransformer< JResultHesse< JResult_t > >
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
struct  JResultTransformer< JResultPDF< JResult_t > >
 Auxiliary class to handle multidimensional map transformations for given result type. More...
 
class  JRouter
 Direct addressing of elements with unique identifiers. More...
 
class  JRouter< JAddress_t, false >
 Template specialisation of JRouter without default address comparison. More...
 
class  JRouter< JAddress_t, true >
 Template specialisation of JRouter with default address comparison. More...
 
class  JAbstractAutoPointer
 Abstract class of an automatic pointer. More...
 
class  JAutoPointer
 Template class for loading and storing of objects. More...
 
class  JAutoElement
 Handler class for automatic pointer. More...
 
class  JSelector
 Template selector class. More...
 
struct  JSet
 Simple data structure for an abstract collection of non-equidistant abscissa values. More...
 
class  JSplineBounds
 Auxiliary class to define first derivates of the spline function at the two extrema. More...
 
class  JSplineCollection
 Template base class for spline interpolations. More...
 
class  JSplineFunction
 Template definition for functional collection with spline interpolation. More...
 
class  JSplineFunction< JElement_t, JCollection_t, typename JResultType< typename JElement_t::ordinate_type >::result_type, JDistance_t >
 Template specialisation for functional collection with spline interpolation. More...
 
class  JSplineFunction< JElement_t, JCollection_t, JResultDerivative< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultDerivative data structure. More...
 
class  JSplineFunction< JElement_t, JCollection_t, JResultPDF< typename JResultType< typename JElement_t::ordinate_type >::result_type >, JDistance_t >
 Template specialisation for spline interpolation method with returning JResultPDF data structure. More...
 
class  JSplineFunction1D
 Template class for spline interpolation in 1D. More...
 
class  JSplineMap
 Functional map with spline interpolation. More...
 
struct  JTable2D
 2D table with arithmetic capabilities. More...
 
class  JTransformableMultiFunction
 Transformable multidimensional function. More...
 
class  JTransformableMultiHistogram
 Transformable multidimensional histogram. More...
 
struct  JCollectionElementTransformer
 Interface for transformation of collection of elements. More...
 
struct  JTuple
 Template data structure. More...
 
struct  JTuple< JTypeList< JHead_t, JTail_t > >
 Template specialisation of JTuple for multiple data types. More...
 
struct  JTuple< JTypeList< JHead_t, JTypeList< JTail_t, JNullType > > >
 Template specialisation of JTuple for two data types. More...
 
struct  JTuple< JTypeList< JHead_t, JNullType > >
 Terminator class of recursive JTuple class. More...
 
class  JWeight
 Weight calculator. More...
 
struct  JElement
 Auxiliary class to convert value to element. More...
 

Typedefs

typedef JRange< double > JAngleRange
 Type definition for angle range. More...
 
typedef JHistogram1D
< JElement2D< double, double >
, JCollection
JHistogram1D_t
 Type definition of a 1 dimensional histogram based on a JCollection. More...
 
typedef JHistogram1D
< JElement2D< double, double >
, JGridCollection
JGridHistogram1D_t
 Type definition of a 1 dimensional histogram based on a JGridCollection. More...
 
typedef JHistogram1D< JBin2D
< double, double >
, JCollection
JHistogram1B_t
 Type definition of a 1 dimensional histogram with bin centering based on a JCollection. More...
 
typedef JHistogram1D< JBin2D
< double, double >
, JGridCollection
JGridHistogram1B_t
 Type definition of a 1 dimensional histogram with bin centering based on a JGridCollection. More...
 
typedef JElement2D< double,
double > 
JElement2D_t
 Type definition of basic element for quadratures. More...
 

Functions

template<class JAbscissa_t >
JAbstractHistogram< JAbscissa_t > make_histogram (const int nx, const JAbscissa_t xmin, const JAbscissa_t xmax)
 Helper method for JAbstractHistogram. More...
 
template<class JElement_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JAbscissa_t >
JGrid< JAbscissa_t > make_grid (const int nx, const JAbscissa_t Xmin, const JAbscissa_t Xmax)
 Helper method for JGrid. More...
 
template<class JAbscissa_t >
JGrid< JAbscissa_t > make_grid (const JAbscissa_t value)
 Helper method to create a grid with a single value. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
void makePDF (const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of histogram to probability density function (PDF). More...
 
template<class JAbscissa_t , class JContents_t , template< class, class > class JContainer_t, class JDistance_t >
void makePDF (const JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t > &input, JMappableCollection< JAbscissa_t, JContents_t > &output)
 Conversion of histogram to probability density function (PDF). More...
 
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multidimensional histogram to multidimensional function. More...
 
template<unsigned int N, class JAbscissa_t >
JMultiGrid< N, JAbscissa_t > make_multigrid (const JGrid< JAbscissa_t > &bounds)
 Helper method for JMultiGrid. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JMultiPDF< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multi-dimensional histogram to multi-dimensional PDF. More...
 
template<unsigned int N, class JAbscissa_t >
JMultiSet< N, JAbscissa_t > make_multiset (const JSet< JAbscissa_t > &bounds)
 Helper method for JMultiSet. More...
 
template<class T , class JComparator_t >
bool next_permutation (T __begin, T __last, T __end, JComparator_t compare, std::bidirectional_iterator_tag)
 Implementation of method next_permutation for bidirectional iterators. More...
 
template<class T , class JComparator_t >
bool next_permutation (T __begin, T __last, T __end, JComparator_t compare)
 Permutations of sub-set of data. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JDistance_t , unsigned int M>
 if ((p==this->begin()&&this->getDistance(x,(p++) ->getX()) > distance_type::precision)||(p==this->end()&&this->getDistance((--p) ->getX(), x) > distance_type::precision))
 Template base class for polynomial interpolations with polynomial result. More...
 
 for (int i=n/2;i!=0 &&p!=this->end();--i,++p)
 
 for (int i=n;i!=0 &&p!=this->begin();--i,--p)
 
 for (unsigned int k=0;k!=M+1;++k)
 
 for (int m=1;m!=n;++m)
 
virtual void do_compile () override
 Function compilation. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< false > &option)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< 0, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< true > &option)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JPolintFunction1D< 1, JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output, const JLANG::JBool< true > &option)
 Conversion of data points to integral values. More...
 
template<class JFunction1D_t >
double search (const double xa, const double xb, const double xc, const JFunction1D_t &f, const int is, const double eps=1.0e-6)
 Locate maximum or minimun of function. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > operator+ (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Add ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > operator- (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Subtract ranges. More...
 
template<class T , class JComparator_t >
bool overlap (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Test overlap between ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > join (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Join ranges. More...
 
template<class T , class JComparator_t >
JRange< T, JComparator_t > combine (const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
 Combine ranges. More...
 
template<class T >
JRange< Tmake_range (T x, T y)
 Auxiliary method to create range of values. More...
 
template<class T >
double getN (const JRange< T > &range, const double R)
 Get expected number of occurrences due to given rate within specified interval. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_value (const JResult_t &value)
 Helper method to recursively evaluate a to function value. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_derivative (const JResult_t &value)
 Helper method to convert function value to derivative value. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_integral (const JResult_t &value)
 Helper method to convert function value to partial integral value. More...
 
template<class JResult_t >
JResultEvaluator< JResult_t >
::result_type 
get_total_integral (const JResult_t &value)
 Helper method to convert function value to total integral value. More...
 
template<class T >
JSet< typename
std::iterator_traits< T >
::value_type > 
make_set (T __begin, T __end)
 Helper method for JSet. More...
 
template<class JAbscissa_t >
JSet< JAbscissa_t > make_set (const JAbstractCollection< JAbscissa_t > &input)
 Helper method for JSet. More...
 
template<class JOrdinate_t >
JSplineBounds< JOrdinate_t > make_spline_bounds (const JOrdinate_t fpAtXmin, const JOrdinate_t fpAtXmax)
 Helper method for JSplineBounds. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type integrate (const JSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type integrate (const JSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
 Conversion of data points to integral values. More...
 
template<class JContainer_t , class JKey_t , class JValue_t >
JContainer_t::ordinate_type makeCDF (const JContainer_t &input, JMappableCollection< JKey_t, JValue_t > &output, const typename JContainer_t::ordinate_type eps=JMATH::zero)
 Conversion of data points to cumulative probability distribition (CDF). More...
 
template<class JContainer_t >
JContainer_t::ordinate_type getIntegral (const JContainer_t &input)
 Get integral of input data points. More...
 
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type getIntegral (const JMultiMap< typename JFunction_t::abscissa_type, JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &input)
 Auxiliary method to get integral of input data points. More...
 
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type getIntegral (const JMultiFunction< JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &input)
 Get integral of input data points. More...
 
template<class T >
void reset (T &value)
 Reset value. More...
 
template<class JElement_t , class JDistance_t >
void reset (JCollection< JElement_t, JDistance_t > &collection)
 Recursive reset of collection. More...
 
template<class T >
void copy (const T &input, T &output)
 Copy of input to output. More...
 
template<class JElement_t , class JDistance_t , class JKey_t , class JValue_t >
void copy (const JCollection< JElement_t, JDistance_t > &input, JMappableCollection< JKey_t, JValue_t > &output)
 Recursive copy of input collection to output collection. More...
 
template<class T , class JAbscissa_t >
void configure (const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
 Configuration of value. More...
 
template<class JElement_t , class JDistance_t >
void configure (JCollection< JElement_t, JDistance_t > &collection, const JAbstractCollection< typename JElement_t::abscissa_type > &bounds, JBool< true > option=JBool< true >())
 Recursive configuration of collection. More...
 
template<class T >
void accumulate (T &value, JBool< false > option)
 Accumulation of value. More...
 
template<class JElement_t , class JDistance_t >
void accumulate (JCollection< JElement_t, JDistance_t > &collection, JBool< true > option=JBool< true >())
 Recursive accumulation of collection. More...
 
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void makePDF (const JTransformableMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input, JTransformableMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &output)
 Conversion of multidimensional histogram to multidimensional function. More...
 
template<class JObject_t , class JHead_t , class JTail_t , class T >
JObject_t & for_each (JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist, const JTuple< T > &tuple)
 For each data type method. More...
 
template<class JObject_t , class JTypelist_t , class T >
JObject_t & for_each (JObject_t &object, JType< JTypelist_t > type, const JTuple< T > &tuple)
 For each data type method. More...
 
template<class... Args>
JTuple< typename JTYPELIST
< Args...>::typelist > 
make_tuple (const Args &...args)
 Helper method for tuple. More...
 
template<class JObject_t , class T >
JObject_t & for_each (JObject_t &object, JType< JNullType > type, const JTuple< T > &tuple)
 Termination method of for each data type method. More...
 
template<class T >
void inplace_merge (T __begin, const size_t N, const size_t *delimiter)
 Merge multiple sorted ranges. More...
 

Variables

static const JCompiler compiler
 Function object for functional object compilation. More...
 
static const JCumulator cumulator
 Function object for functional object compilation. More...
 
 pX
 
const int n = std::min((int) (N + 1), (int) this->size())
 
int j = 0
 
return result
 
double u [N+1]
 
data_type v [N+1][M+1]
 
data_type w [N+1][M+1]
 
data_type r [M+1]
 

Detailed Description

Auxiliary classes and methods for multi-dimensional interpolations and histograms.

Author
mdejong

Typedef Documentation

typedef JRange<double> JTOOLS::JAngleRange

Type definition for angle range.

Definition at line 19 of file JAngleRange.hh.

Type definition of a 1 dimensional histogram based on a JCollection.

Definition at line 22 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram based on a JGridCollection.

Definition at line 28 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram with bin centering based on a JCollection.

Definition at line 34 of file JHistogram1D_t.hh.

Type definition of a 1 dimensional histogram with bin centering based on a JGridCollection.

Definition at line 40 of file JHistogram1D_t.hh.

typedef JElement2D<double, double> JTOOLS::JElement2D_t

Type definition of basic element for quadratures.

Definition at line 25 of file JQuadrature.hh.

Function Documentation

template<class JAbscissa_t >
JAbstractHistogram<JAbscissa_t> JTOOLS::make_histogram ( const int  nx,
const JAbscissa_t  xmin,
const JAbscissa_t  xmax 
)
inline

Helper method for JAbstractHistogram.

Parameters
nxnumber of bins
xminlower limit
xmaxupper limit
Returns
histogram

Definition at line 169 of file JAbstractHistogram.hh.

172  {
174  }
const double xmax
Definition: JQuadrature.cc:24
Simple data structure for histogram binning.
const double xmin
Definition: JQuadrature.cc:23
template<class JElement_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JCollection< JElement_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration is based on the trapezoidal rule applied to the input data points.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 812 of file JCollection.hh.

813  {
814  typedef typename JElement_t::ordinate_type ordinate_type;
815  typedef typename JCollection<JElement_t, JDistance_t>::const_iterator const_iterator;
816 
817  ordinate_type V(JMATH::zero);
818 
819  if (input.getSize() > 1) {
820 
821  output.put(input.begin()->getX(), V);
822 
823  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
824 
825  V += 0.5 * input.getDistance(i->getX(), j->getX()) * (i->getY() + j->getY());
826 
827  output.put(j->getX(), V);
828  }
829  }
830 
831  return V;
832  }
JDistance_t getDistance
Function object for distance evaluation.
Definition: JCollection.hh:773
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
virtual abscissa_type getX(int index) const override
Get abscissa value.
Definition: JCollection.hh:209
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
int j
Definition: JPolint.hh:703
virtual int getSize() const override
Get number of elements.
Definition: JCollection.hh:197
template<class JAbscissa_t >
JGrid<JAbscissa_t> JTOOLS::make_grid ( const int  nx,
const JAbscissa_t  Xmin,
const JAbscissa_t  Xmax 
)
inline

Helper method for JGrid.

Parameters
nxnumber of elements
Xminlower limit
Xmaxupper limit
Returns
grid

Definition at line 209 of file JGrid.hh.

212  {
213  return JGrid<JAbscissa_t>(nx, Xmin, Xmax);
214  }
Simple data structure for an abstract collection of equidistant abscissa values.
Definition: JGrid.hh:38
template<class JAbscissa_t >
JGrid<JAbscissa_t> JTOOLS::make_grid ( const JAbscissa_t  value)
inline

Helper method to create a grid with a single value.

Parameters
valuevalue
Returns
single-valued grid

Definition at line 224 of file JGrid.hh.

225  {
226  return JGrid<JAbscissa_t>(1, value, value);
227  }
Simple data structure for an abstract collection of equidistant abscissa values.
Definition: JGrid.hh:38
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration includes the use of 2nd derivatives of the data points of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 642 of file JHermiteSpline.hh.

644  {
645  typedef typename JElement_t::ordinate_type ordinate_type;
647 
648  ordinate_type V(JMATH::zero);
649 
650  if (input.getSize() > 1) {
651 
652  output.put(input.begin()->getX(), V);
653 
654  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
655 
656  const double dx = input.getDistance(i->getX(), j->getX());
657  const ordinate_type y = i->getY() + j->getY();
658  const ordinate_type z = i->getU() - j->getU();
659 
660  const ordinate_type v = dx * 0.50 * y;
661  const ordinate_type w = dx * 1.00 * z*dx/12.0;
662 
663  V += v + w;
664 
665  output.put(j->getX(), V);
666  }
667  }
668 
669  return V;
670  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:703
data_type v[N+1][M+1]
Definition: JPolint.hh:777
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHermiteSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration directly uses the integral values of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 686 of file JHermiteSpline.hh.

688  {
689  typedef typename JElement_t::ordinate_type ordinate_type;
690  typedef JResultPDF<ordinate_type> result_type;
692 
693  if (input.getSize() > 1) {
694 
695  for (const_iterator i = input.begin(); i != input.end(); ++i) {
696  output.put(i->getX(), i->getIntegral());
697  }
698 
699  return input.rbegin()->getIntegral();
700  }
701 
702  return JMATH::zero;
703  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
collection_type::const_iterator const_iterator
Data structure for result including value, first derivative and integrals of function.
Definition: JResult.hh:337
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
void JTOOLS::makePDF ( const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of histogram to probability density function (PDF).

The PDF abscissa and contents are set to the bin center and contents divided the bin width, respectively.

Parameters
inputhistogram
outputmappable collection

Definition at line 559 of file JHistogram1D.hh.

561  {
562  typedef typename JElement_t::abscissa_type abscissa_type;
563  typedef typename JElement_t::ordinate_type ordinate_type;
565 
566  if (input.getSize() > 1) {
567 
568  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
569 
570  const abscissa_type x = 0.5 * (i->getX() + j->getX());
571  const ordinate_type y = i->getY();
572  const double w = input.getDistance(i->getX(), j->getX());
573 
574  output.put(x, y/w);
575  }
576  }
577  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:703
template<class JAbscissa_t , class JContents_t , template< class, class > class JContainer_t, class JDistance_t >
void JTOOLS::makePDF ( const JHistogram1D< JBin2D< JAbscissa_t, JContents_t >, JContainer_t, JDistance_t > &  input,
JMappableCollection< JAbscissa_t, JContents_t > &  output 
)
inline

Conversion of histogram to probability density function (PDF).

The PDF abscissa and contents are set to the bin center and contents divided the bin width, respectively.

Parameters
inputhistogram
outputmappable collection

Definition at line 592 of file JHistogram1D.hh.

594  {
595  typedef JAbscissa_t abscissa_type;
596  typedef JContents_t contents_type;
597  typedef typename JHistogram1D<JBin2D<JAbscissa_t, JContents_t>, JContainer_t, JDistance_t>::const_iterator const_iterator;
598 
599  if (input.getSize() > 1) {
600 
601  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
602 
603  const abscissa_type x = i->getBinCenter();
604  const contents_type y = i->getY();
605  const double w = input.getDistance(i->getX(), j->getX());
606 
607  output.put(x, y/w);
608  }
609  }
610  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
Histogram in 1D.
int j
Definition: JPolint.hh:703
template<class JElement_t , template< class, class > class JContainer_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JHistogram1D< JElement_t, JContainer_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration is based on the sum of bin contents of the input data points.

Parameters
inputhistogram
outputmappable collection
Returns
integral

Definition at line 626 of file JHistogram1D.hh.

628  {
629  typedef typename JElement_t::ordinate_type ordinate_type;
631 
632  ordinate_type V(JMATH::zero);
633 
634  if (input.getSize() > 1) {
635 
636  output.put(input.begin()->getX(), V);
637 
638  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
639 
640  V += i->getY();
641 
642  output.put(j->getX(), V);
643  }
644  }
645 
646  return V;
647  }
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
collection_type::const_iterator const_iterator
int j
Definition: JPolint.hh:703
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multidimensional histogram to multidimensional function.

Parameters
inputmultidimensional histogram
outputmultidimensional function

Definition at line 371 of file JMultiFunction.hh.

373  {
374  output.insert(input);
375  }
void insert(const JMultiFunction< __JFunction_t, __JMaplist_t, __JDistance_t > &input)
Insert multidimensional input.
template<unsigned int N, class JAbscissa_t >
JMultiGrid<N, JAbscissa_t> JTOOLS::make_multigrid ( const JGrid< JAbscissa_t > &  bounds)
inline

Helper method for JMultiGrid.

Parameters
boundsbounds
Returns
multidimensional grid

Definition at line 150 of file JMultiGrid.hh.

151  {
152  return JMultiGrid<N, JAbscissa_t>(bounds);
153  }
Simple data structure for an abstract multidimensional map of equidistant elements.
Definition: JMultiGrid.hh:24
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JMultiPDF< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multi-dimensional histogram to multi-dimensional PDF.

Parameters
inputmulti-dimensional histogram
outputmulti-dimensional PDF

Definition at line 185 of file JMultiPDF.hh.

187  {
188  output.insert(input);
189  }
void insert(const JMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &input)
Insert multi-dimensional input.
Definition: JMultiPDF.hh:97
template<unsigned int N, class JAbscissa_t >
JMultiSet<N, JAbscissa_t> JTOOLS::make_multiset ( const JSet< JAbscissa_t > &  bounds)
inline

Helper method for JMultiSet.

Parameters
boundsbounds
Returns
multidimensional set

Definition at line 150 of file JMultiSet.hh.

151  {
152  return JMultiSet<N, JAbscissa_t>(bounds);
153  }
Simple data structure for an abstract multidimensional map of equidistant elements.
Definition: JMultiSet.hh:24
template<class T , class JComparator_t >
bool JTOOLS::next_permutation ( T  __begin,
T  __last,
T  __end,
JComparator_t  compare,
std::bidirectional_iterator_tag   
)
inline

Implementation of method next_permutation for bidirectional iterators.

Definition at line 20 of file JPermutation.hh.

25  {
26  using namespace std;
27 
28  T __rend = __begin;
29  --__rend;
30 
31  for (T __i = __last; --__i != __rend; ) {
32 
33  T __j;
34 
35  for (__j = __last; __j != __end && !compare(*__i,*__j); ++__j) {}
36 
37  if (__j != __end) {
38 
39  iter_swap(__i,__j);
40 
41  if (++__i != __last && ++__j != __end) {
42 
43  reverse(__i,__last);
44  reverse(__j,__end);
45 
46  T __k = __end;
47 
48  while (__k != __j && __i != __last)
49  iter_swap(__i++,--__k);
50 
51  reverse(__i,__last);
52  reverse(__j,__k);
53  }
54 
55  return true;
56  }
57  }
58 
59  reverse(__begin, __last);
60  reverse(__last, __end);
61  reverse(__begin, __end);
62 
63  return false;
64  }
do set_variable OUTPUT_DIRECTORY $WORKDIR T
static struct JACOUSTICS::@4 compare
Auxiliary data structure to sort transmissions.
template<class T , class JComparator_t >
bool JTOOLS::next_permutation ( T  __begin,
T  __last,
T  __end,
JComparator_t  compare 
)
inline

Permutations of sub-set of data.

The first template argument refers to a bidirectional iterator and the second template argument to the comparator.

Parameters
__beginbegin of input data
__lastend of output data
__endend of input data
comparecomparison operator
Returns
true if another permutation exists; else false

Definition at line 79 of file JPermutation.hh.

83  {
84  return next_permutation(__begin, __last, __end, compare, typename std::iterator_traits<T>::iterator_category());
85  }
static struct JACOUSTICS::@4 compare
Auxiliary data structure to sort transmissions.
bool next_permutation(T __begin, T __last, T __end, JComparator_t compare, std::bidirectional_iterator_tag)
Implementation of method next_permutation for bidirectional iterators.
Definition: JPermutation.hh:20
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JDistance_t , unsigned int M>
JTOOLS::if ( (p==this->begin()&&this->getDistance(x,(p++) ->getX()) > distance_type::precision)||(p==this->end()&&this->getDistance((--p) ->getX(), x) > distance_type::precision)  )

Template base class for polynomial interpolations with polynomial result.

This class partially implements the JFunctional interface.

Definition at line 685 of file JPolint.hh.

686  {
687 
688  THROW(JValueOutOfRange, "abscissa out of range "
689  << STREAM("?") << x << " <> "
690  << STREAM("?") << this->begin() ->getX() << ' '
691  << STREAM("?") << this->rbegin()->getX());
692  }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
Auxiliary data structure for handling std::ostream.
JTOOLS::for ( int  i = n/2; i != 0 && p != this->end(); --i,
++  p 
)

Definition at line 699 of file JPolint.hh.

699 {} // move p to begin of data
JTOOLS::for ( int  i = n ; i != 0 && p != this->begin(); --i,
--  p 
)

Definition at line 700 of file JPolint.hh.

700 {}
JTOOLS::for ( unsigned int  k = 0; k != M+1; ++k)

Definition at line 721 of file JPolint.hh.

721  {
722  result.y[k] = v[j][k];
723  }
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
return result
Definition: JPolint.hh:764
int j
Definition: JPolint.hh:703
data_type v[N+1][M+1]
Definition: JPolint.hh:777
JTOOLS::for ( int  m = 1; m != n; ++m)

Definition at line 727 of file JPolint.hh.

727  {
728 
729  for (int i = 0; i != n-m; ++i) {
730 
731  const double ho = u[ i ];
732  const double hp = u[i+m];
733  const double dx = ho - hp;
734 
735  for (int k = 0; k != M+1; ++k) {
736  r[k] = (v[i+1][k] - w[i][k]) / dx;
737  }
738 
739  v[i][0] = ho * r[0];
740  w[i][0] = hp * r[0];
741 
742  for (int k = 1; k != M+1; ++k) {
743  v[i][k] = ho * r[k] - k * r[k-1];
744  w[i][k] = hp * r[k] - k * r[k-1];
745  }
746  }
747 
748  if (2*(j+1) < n - m) {
749 
750  for (int k = 0; k != M+1; ++k) {
751  result.y[k] += v[j+1][k];
752  }
753 
754  } else {
755 
756  for (int k = 0; k != M+1; ++k) {
757  result.y[k] += w[j][k];
758  }
759 
760  --j;
761  }
762  }
data_type w[N+1][M+1]
Definition: JPolint.hh:778
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
data_type r[M+1]
Definition: JPolint.hh:779
const int n
Definition: JPolint.hh:697
return result
Definition: JPolint.hh:764
int j
Definition: JPolint.hh:703
data_type v[N+1][M+1]
Definition: JPolint.hh:777
double u[N+1]
Definition: JPolint.hh:776
virtual void JTOOLS::do_compile ( )
overrideprotectedvirtual

Function compilation.

Definition at line 771 of file JPolint.hh.

772  {}
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inlineprivate

Conversion of data points to integral values.

This method transfers the integration to the corresponding specialised function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 1111 of file JPolint.hh.

1113  {
1114  return integrate(input, output, JLANG::JBool<N == 0 || N == 1>());
1115  }
Auxiliary template class for type bool.
Definition: JBool.hh:20
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<unsigned int N, class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< N, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< false > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration uses the Gauss-Legendre quadratures with the number of points set to the degree of the input polynomial interpolating function.

Parameters
inputcollection
outputmappable collection
optionfalse
Returns
integral

Definition at line 1135 of file JPolint.hh.

1138  {
1139  typedef typename JElement_t::abscissa_type abscissa_type;
1140  typedef typename JElement_t::ordinate_type ordinate_type;
1142 
1143  ordinate_type V(JMATH::zero);
1144 
1145  if (input.getSize() > 1) {
1146 
1147  output.put(input.begin()->getX(), V);
1148 
1149  const JGaussLegendre engine(N);
1150 
1151  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1152 
1153  const abscissa_type xmin = i->getX();
1154  const abscissa_type xmax = j->getX();
1155 
1156  for (JGaussLegendre::const_iterator m = engine.begin(); m != engine.end(); ++m) {
1157 
1158  const abscissa_type x = 0.5 * (xmax + xmin + m->getX() * (xmax - xmin));
1159  const ordinate_type v = 0.5 * (xmax - xmin) * m->getY() * get_value(input(x));
1160 
1161  V += v;
1162  }
1163 
1164  output.put(xmax, V);
1165  }
1166  }
1167 
1168  return V;
1169  }
const double xmax
Definition: JQuadrature.cc:24
Numerical integrator for .
Definition: JQuadrature.hh:111
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
collection_type::const_iterator const_iterator
Definition: JPolint.hh:1016
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
const double xmin
Definition: JQuadrature.cc:23
int j
Definition: JPolint.hh:703
data_type v[N+1][M+1]
Definition: JPolint.hh:777
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:998
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< 0, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< true > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration is based on the sum of ordinates of the input data points.

Parameters
inputcollection
outputmappable collection
optiontrue
Returns
integral

Definition at line 1187 of file JPolint.hh.

1190  {
1191  typedef typename JElement_t::ordinate_type ordinate_type;
1193 
1194  ordinate_type V(JMATH::zero);
1195 
1196  if (input.getSize() > 1) {
1197 
1198  output.put(input.begin()->getX(), V);
1199 
1200  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1201 
1202  V += input.getDistance(i->getX(), j->getX()) * j->getY();
1203 
1204  output.put(j->getX(), V);
1205  }
1206  }
1207 
1208  return V;
1209  }
collection_type::const_iterator const_iterator
Definition: JPolint.hh:1016
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
int j
Definition: JPolint.hh:703
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JPolintFunction1D< 1, JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output,
const JLANG::JBool< true > &  option 
)
inlineprivate

Conversion of data points to integral values.

The integration is based on the trapezoidal rule applied to the input data points.

Parameters
inputcollection
outputmappable collection
optiontrue
Returns
integral

Definition at line 1227 of file JPolint.hh.

1230  {
1231  typedef typename JElement_t::ordinate_type ordinate_type;
1233 
1234  ordinate_type V(JMATH::zero);
1235 
1236  if (input.getSize() > 1) {
1237 
1238  output.put(input.begin()->getX(), V);
1239 
1240  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
1241 
1242  V += 0.5 * input.getDistance(i->getX(), j->getX()) * (i->getY() + j->getY());
1243 
1244  output.put(j->getX(), V);
1245  }
1246  }
1247 
1248  return V;
1249  }
collection_type::const_iterator const_iterator
Definition: JPolint.hh:1016
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
int j
Definition: JPolint.hh:703
template<class JFunction1D_t >
double JTOOLS::search ( const double  xa,
const double  xb,
const double  xc,
const JFunction1D_t &  f,
const int  is,
const double  eps = 1.0e-6 
)

Locate maximum or minimun of function.

Golden section search code is taken from reference: Numerical Recipes in C++, W.H. Press, S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Cambridge University Press.

        xa < xb < xc

        is = +1  ->  There is a minimum, i.e:  f(xb) < min(f(xa),f(xc))
        is = -1  ->  There is a maximum, i.e:  f(xb) > max(f(xa),f(xc))
Parameters
xa
xb
xc
ffunction
issign (+1 -> minimim, -1 -> maximum)
epsrelative precision

Definition at line 48 of file JQuantiles.hh.

54  {
55  static const double R = 0.61803399;
56  static const double C = 1.0 - R;
57 
58  double x0 = xa;
59  double x3 = xc;
60  double x1, x2;
61 
62  if (fabs(xc-xb) > fabs(xb-xa)) {
63  x1 = xb;
64  x2 = xb + C*(xc-xb);
65  } else {
66  x2 = xb;
67  x1 = xb - C*(xb-xa);
68  }
69 
70  double f1 = is * get_value(f(x1));
71  double f2 = is * get_value(f(x2));
72 
73  while (fabs(x3-x0) > eps*(fabs(x1)+fabs(x2))) {
74 
75  if (f2 < f1) {
76 
77  x0 = x1;
78  x1 = x2;
79  x2 = R*x2 + C*x3;
80 
81  f1 = f2;
82  f2 = is * get_value(f(x2));
83 
84  } else {
85 
86  x3 = x2;
87  x2 = x1;
88  x1 = R*x1 + C*x0;
89 
90  f2 = f1;
91  f1 = is * get_value(f(x1));
92  }
93  }
94 
95  if (f1 < f2)
96  return x1;
97  else
98  return x2;
99  }
o $QUALITY_ROOT d $DEBUG!CHECK_EXIT_CODE JPlot1D f
Definition: JDataQuality.sh:76
is
Definition: JDAQCHSM.chsm:167
static const double C
Physics constants.
const JPolynome f1(1.0, 2.0, 3.0)
Function.
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:998
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::operator+ ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Add ranges.


The new lower limit is the sum of the two lower limits and
the new upper limit is the sum of the two upper limits.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 620 of file JRange.hh.

621  {
622  return JRange<T, JComparator_t>(first).add(second);
623  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:38
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::operator- ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Subtract ranges.


The new lower limit is the difference of the two lower limits and the new upper limit is the difference of the two upper limits.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 636 of file JRange.hh.

637  {
638  return JRange<T, JComparator_t>(first).sub(second);
639  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:38
template<class T , class JComparator_t >
bool JTOOLS::overlap ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Test overlap between ranges.

Parameters
firstfirst range
secondsecond range
Returns
true if there is a non-zero overlap; else false

Definition at line 650 of file JRange.hh.

651  {
652  return first.overlap(second);
653  }
bool overlap(const range_type &range) const
Test overlap with given range.
Definition: JRange.hh:382
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::join ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Join ranges.


The new lower limit is the maximim of the two lower limits and
the new upper limit is the minimum of the two upper limits.
This operation results in an equal or smaller range and may result in an unphysical range (i.e. lower limit > upper limit).

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 668 of file JRange.hh.

669  {
670  return JRange<T, JComparator_t>(first).join(second);
671  }
JRange< T, JComparator_t > join(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Join ranges.
Definition: JRange.hh:668
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:38
template<class T , class JComparator_t >
JRange<T, JComparator_t> JTOOLS::combine ( const JRange< T, JComparator_t > &  first,
const JRange< T, JComparator_t > &  second 
)
inline

Combine ranges.


The new lower limit is the minimim of the two lower limits and
the new upper limit is the maximum of the two upper limits.
This operation results in an equal or larger range.

Parameters
firstfirst range
secondsecond range
Returns
range

Definition at line 685 of file JRange.hh.

686  {
687  return JRange<T, JComparator_t>(first).combine(second);
688  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Range of values.
Definition: JRange.hh:38
JRange< T, JComparator_t > combine(const JRange< T, JComparator_t > &first, const JRange< T, JComparator_t > &second)
Combine ranges.
Definition: JRange.hh:685
template<class T >
JRange<T> JTOOLS::make_range ( T  x,
T  y 
)
inline

Auxiliary method to create range of values.

Parameters
xlower limit
yupper limit
Returns
range

Definition at line 699 of file JRange.hh.

700  {
701  return JRange<T>(x,y);
702  }
Range of values.
Definition: JRange.hh:38
template<class T >
double JTOOLS::getN ( const JRange< T > &  range,
const double  R 
)
inline

Get expected number of occurrences due to given rate within specified interval.

Parameters
rangeinterval
Rrate
Returns
expectation value

Definition at line 713 of file JRange.hh.

714  {
715  return R * (range.getUpperLimit() - range.getLowerLimit());
716  }
T getLowerLimit() const
Get lower limit.
Definition: JRange.hh:202
T getUpperLimit() const
Get upper limit.
Definition: JRange.hh:213
then JCookie sh JDataQuality D $DETECTOR_ID R
Definition: JDataQuality.sh:41
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_value ( const JResult_t &  value)
inline

Helper method to recursively evaluate a to function value.

Parameters
valueresult
Returns
function value

Definition at line 998 of file JResult.hh.

999  {
1001  }
JResultEvaluator< JResult_t >::result_type get_value(const JResult_t &value)
Helper method to recursively evaluate a to function value.
Definition: JResult.hh:998
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_derivative ( const JResult_t &  value)
inline

Helper method to convert function value to derivative value.

Parameters
valueresult
Returns
derivative value

Definition at line 1011 of file JResult.hh.

1012  {
1014  }
JResultEvaluator< JResult_t >::result_type get_derivative(const JResult_t &value)
Helper method to convert function value to derivative value.
Definition: JResult.hh:1011
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_integral ( const JResult_t &  value)
inline

Helper method to convert function value to partial integral value.

Parameters
valueresult
Returns
partial integral value

Definition at line 1024 of file JResult.hh.

1025  {
1027  }
JResultEvaluator< JResult_t >::result_type get_integral(const JResult_t &value)
Helper method to convert function value to partial integral value.
Definition: JResult.hh:1024
template<class JResult_t >
JResultEvaluator<JResult_t>::result_type JTOOLS::get_total_integral ( const JResult_t &  value)
inline

Helper method to convert function value to total integral value.

Parameters
valueresult
Returns
total integral value

Definition at line 1037 of file JResult.hh.

1038  {
1040  }
JResultEvaluator< JResult_t >::result_type get_total_integral(const JResult_t &value)
Helper method to convert function value to total integral value.
Definition: JResult.hh:1037
template<class T >
JSet<typename std::iterator_traits<T>::value_type> JTOOLS::make_set ( T  __begin,
T  __end 
)
inline

Helper method for JSet.

Parameters
__beginbegin of abscissa values
__endend of abscissa values
Returns
set

Definition at line 178 of file JSet.hh.

179  {
181  }
Simple data structure for an abstract collection of non-equidistant abscissa values.
Definition: JSet.hh:29
template<class JAbscissa_t >
JSet<JAbscissa_t> JTOOLS::make_set ( const JAbstractCollection< JAbscissa_t > &  input)
inline

Helper method for JSet.

Parameters
inputabstract collection
Returns
set

Definition at line 191 of file JSet.hh.

192  {
193  return JSet<JAbscissa_t>(input);
194  }
Simple data structure for an abstract collection of non-equidistant abscissa values.
Definition: JSet.hh:29
template<class JOrdinate_t >
JSplineBounds<JOrdinate_t> JTOOLS::make_spline_bounds ( const JOrdinate_t  fpAtXmin,
const JOrdinate_t  fpAtXmax 
)
inline

Helper method for JSplineBounds.

Parameters
fpAtXmin1st derivative at minimal abscissa value
fpAtXmax1st derivative at maximal abscissa value
Returns
spline bounds

Definition at line 151 of file JSpline.hh.

153  {
154  return JSplineBounds<JOrdinate_t>(fpAtXmin, fpAtXmax);
155  }
Auxiliary class to define first derivates of the spline function at the two extrema.
Definition: JSpline.hh:35
template<class JElement_t , template< class, class > class JCollection_t, class JResult_t , class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JSplineFunction1D< JElement_t, JCollection_t, JResult_t, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration includes the use of 2nd derivatives of the data points of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 818 of file JSpline.hh.

820  {
821  typedef typename JElement_t::ordinate_type ordinate_type;
823 
824  ordinate_type V(JMATH::zero);
825 
826  if (input.getSize() > 1) {
827 
828  output.put(input.begin()->getX(), V);
829 
830  for (const_iterator j = input.begin(), i = j++; j != input.end(); ++i, ++j) {
831 
832  const double dx = input.getDistance(i->getX(), j->getX());
833  const ordinate_type y = i->getY() + j->getY();
834  const ordinate_type z = i->getU() + j->getU();
835  const ordinate_type v = dx * 0.50 * y;
836  const ordinate_type w = dx * 0.25 * z*dx*dx/6;
837 
838  V += v - w;
839 
840  output.put(j->getX(), V);
841  }
842  }
843 
844  return V;
845  }
collection_type::const_iterator const_iterator
Definition: JSpline.hh:686
data_type w[N+1][M+1]
Definition: JPolint.hh:778
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
int j
Definition: JPolint.hh:703
data_type v[N+1][M+1]
Definition: JPolint.hh:777
template<class JElement_t , template< class, class > class JCollection_t, class JDistance_t >
JElement_t::ordinate_type JTOOLS::integrate ( const JSplineFunction1D< JElement_t, JCollection_t, JResultPDF< typename JElement_t::ordinate_type >, JDistance_t > &  input,
typename JMappable< JElement_t >::map_type &  output 
)
inline

Conversion of data points to integral values.

The integration directly uses the integral values of the input spline interpolating function.

Parameters
inputcollection
outputmappable collection
Returns
integral

Definition at line 861 of file JSpline.hh.

863  {
864  typedef typename JElement_t::ordinate_type ordinate_type;
865  typedef JResultPDF<ordinate_type> result_type;
867 
868  if (input.getSize() > 1) {
869 
870  for (const_iterator i = input.begin(); i != input.end(); ++i) {
871  output.put(i->getX(), i->getIntegral());
872  }
873 
874  return input.rbegin()->getIntegral();
875  }
876 
877  return JMATH::zero;
878  }
collection_type::const_iterator const_iterator
Definition: JSpline.hh:686
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
Data structure for result including value, first derivative and integrals of function.
Definition: JResult.hh:337
template<class JContainer_t , class JKey_t , class JValue_t >
JContainer_t::ordinate_type JTOOLS::makeCDF ( const JContainer_t &  input,
JMappableCollection< JKey_t, JValue_t > &  output,
const typename JContainer_t::ordinate_type  eps = JMATH::zero 
)
inline

Conversion of data points to cumulative probability distribition (CDF).

Note that the data type of the input container should be preserved so that the corresponding method integrate() is used.

Parameters
inputcollection
outputmappable collection
epsminimal step size
Returns
integral value

Definition at line 51 of file JToolsToolkit.hh.

54  {
55  typedef typename JContainer_t::ordinate_type ordinate_type;
56  typedef typename JContainer_t::abscissa_type abscissa_type;
57  typedef JElement2D<abscissa_type, ordinate_type> element_type;
58  typedef JCollection<element_type> buffer_type;
59 
60 
61  if (input.getSize() > 1) {
62 
63  buffer_type buffer;
64 
65  const ordinate_type V = integrate(input, buffer);
66 
67  if (V == ordinate_type(JMATH::zero)) {
68  THROW(JDivisionByZero, "Method makeCDF(): integral equals zero.");
69  }
70 
71  output.clear();
72 
73  typename buffer_type::const_iterator i = buffer.begin();
74 
75  for ( ; i != buffer.end() && i->getY() <= 0.5 * eps * V; ++i) {}
76 
77  if (i != buffer.end()) {
78 
79  // force first point at (0, ymin)
80 
81  JKey_t x = 0.0;
82  JValue_t y = i->getX();
83 
84  output.put(x, y);
85 
86  JKey_t xmax = x;
87  JValue_t ymax = y;
88 
89  for (++i; i != buffer.end(); ++i) {
90 
91  x = i->getY() / V;
92  y = i->getX();
93 
94  if (x > xmax) {
95 
96  ymax = y;
97 
98  if (x > xmax + eps) {
99 
100  output.put(x, y);
101 
102  xmax = x;
103  }
104  }
105  }
106 
107  // force last point at (1, ymax)
108 
109  x = 1.0;
110  y = ymax;
111 
112  output.put(x,y);
113 
114  } else {
115  THROW(JDivisionByZero, "Method makeCDF(): no remaining data.");
116  }
117 
118  return V;
119 
120  } else {
121  THROW(JEmptyCollection, "Method makeCDF(): not sufficient input data.");
122  }
123  }
const double xmax
Definition: JQuadrature.cc:24
General purpose class for collection of elements, see: &lt;a href=&quot;JTools.PDF&quot;;&gt;Collection of elements...
Definition: JCollection.hh:73
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Definition: JException.hh:696
static const JZero zero
Function object to assign zero value.
Definition: JZero.hh:105
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
void put(typename JClass< key_type >::argument_type key, typename JClass< mapped_type >::argument_type value)
Put pair-wise element (key,value) into collection.
virtual void clear()=0
Clear.
2D Element.
Definition: JElement.hh:46
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<class JContainer_t >
JContainer_t::ordinate_type JTOOLS::getIntegral ( const JContainer_t &  input)
inline

Get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 133 of file JToolsToolkit.hh.

134  {
136 
137  return integrate(input, garbage);
138  }
JElement_t::ordinate_type integrate(const JCollection< JElement_t, JDistance_t > &input, typename JMappable< JElement_t >::map_type &output)
Conversion of data points to integral values.
Definition: JCollection.hh:812
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type JTOOLS::getIntegral ( const JMultiMap< typename JFunction_t::abscissa_type, JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &  input)
inline

Auxiliary method to get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 151 of file JToolsToolkit.hh.

152  {
153  typedef typename JFunction_t::abscissa_type abscissa_type;
154  typedef typename JFunction_t::ordinate_type ordinate_type;
155  typedef typename JFunction_t::distance_type distance_type;
156  typedef typename JFunctionalMap<JMap_t>::template function_type<abscissa_type,
157  ordinate_type,
158  ordinate_type,
159  distance_type> buffer_type;
160  typedef JMultiMap<abscissa_type, JFunction_t, JMapList<JMap_t, JTail_t>, distance_type> multimap_type;
161 
162  static buffer_type buffer;
163 
164  buffer.configure(input);
165 
166  typename buffer_type::iterator out = buffer.begin();
167 
168  for (typename multimap_type::const_iterator in = input.begin(); in != input.end(); ++in, ++out) {
169  out->getY() = getIntegral(in->getY());
170  }
171 
172  buffer.compile();
173 
174  return getIntegral(buffer);
175  }
Auxiliary class to define corresponding one-dimensional function interpolator function_type.
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY JAcoustics sh $DETECTOR_ID source JAcousticsToolkit sh CHECK_EXIT_CODE typeset A EMITTERS get_tripods $WORKDIR tripod txt EMITTERS get_transmitters $WORKDIR transmitter txt EMITTERS for EMITTER in
Definition: JCanberra.sh:46
JContainer_t::ordinate_type getIntegral(const JContainer_t &input)
Get integral of input data points.
Multidimensional map.
Definition: JMultiMap.hh:52
template<class JFunction_t , template< class, class, class > class JMap_t, class JTail_t >
JFunction_t::ordinate_type JTOOLS::getIntegral ( const JMultiFunction< JFunction_t, JMapList< JMap_t, JTail_t >, typename JFunction_t::distance_type > &  input)
inline

Get integral of input data points.

Parameters
inputinput data
Returns
integral value

Definition at line 188 of file JToolsToolkit.hh.

189  {
190  typedef typename JFunction_t::abscissa_type abscissa_type;
191  typedef typename JFunction_t::ordinate_type ordinate_type;
192  typedef typename JFunction_t::distance_type distance_type;
193  typedef typename JFunctionalMap<JMap_t>::template function_type<abscissa_type,
194  ordinate_type,
195  ordinate_type,
196  distance_type> buffer_type;
197  typedef JMultiFunction<JFunction_t, JMapList<JMap_t, JTail_t>, distance_type> multifunction_type;
198 
199  buffer_type buffer;
200 
201  for (typename multifunction_type::const_iterator i = input.begin(); i != input.end(); ++i) {
202  buffer.put(i->getX(), getIntegral(i->getY()));
203  }
204 
205  buffer.compile();
206 
207  return getIntegral(buffer);
208  }
void compile()
Compilation.
Auxiliary class to define corresponding one-dimensional function interpolator function_type.
Multidimensional interpolation method.
JContainer_t::ordinate_type getIntegral(const JContainer_t &input)
Get integral of input data points.
template<class T >
void JTOOLS::reset ( T value)
inline

Reset value.

The value is set to (the equivalent of) zero, see method JMATH::getZero.

Parameters
valuevalue

Definition at line 219 of file JToolsToolkit.hh.

220  {
221  value = JMATH::getZero<T>();
222  }
template<class JElement_t , class JDistance_t >
void JTOOLS::reset ( JCollection< JElement_t, JDistance_t > &  collection)
inline

Recursive reset of collection.

Parameters
collectioncollection

Definition at line 231 of file JToolsToolkit.hh.

232  {
233  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
234 
235  for (iterator i = collection.begin(); i != collection.end(); ++i) {
236  reset(i->getY());
237  }
238  }
container_type::iterator iterator
Definition: JCollection.hh:93
void reset(T &value)
Reset value.
template<class T >
void JTOOLS::copy ( const T input,
T output 
)
inline

Copy of input to output.

The output value is set to the input value.

Parameters
inputinput
outputoutput

Definition at line 250 of file JToolsToolkit.hh.

251  {
252  output = input;
253  }
template<class JElement_t , class JDistance_t , class JKey_t , class JValue_t >
void JTOOLS::copy ( const JCollection< JElement_t, JDistance_t > &  input,
JMappableCollection< JKey_t, JValue_t > &  output 
)
inline

Recursive copy of input collection to output collection.

Parameters
inputinput
outputoutput

Definition at line 263 of file JToolsToolkit.hh.

264  {
265  typedef typename JCollection<JElement_t, JDistance_t>::const_iterator const_iterator;
266 
267  output.clear();
268 
269  for (const_iterator i = input.begin(); i != input.end(); ++i) {
270  copy(i->getY(), output.get(i->getX()));
271  }
272  }
virtual const mapped_type & get(typename JClass< key_type >::argument_type key) const =0
Get mapped value.
virtual void clear()=0
Clear.
void copy(const Head &from, JHead &to)
Copy header from from to to.
Definition: JHead.cc:162
container_type::const_iterator const_iterator
Definition: JCollection.hh:91
template<class T , class JAbscissa_t >
void JTOOLS::configure ( const T value,
const JAbstractCollection< JAbscissa_t > &  bounds,
JBool< false >  option 
)
inline

Configuration of value.

This is a fall-back method; it does nothing.

Parameters
valuevalue
boundsbounds
optionfalse

Definition at line 285 of file JToolsToolkit.hh.

286  {}
template<class JElement_t , class JDistance_t >
void JTOOLS::configure ( JCollection< JElement_t, JDistance_t > &  collection,
const JAbstractCollection< typename JElement_t::abscissa_type > &  bounds,
JBool< true >  option = JBool<true>() 
)
inline

Recursive configuration of collection.

Parameters
collectioncollection
boundsbounds
optiontrue

Definition at line 297 of file JToolsToolkit.hh.

300  {
301  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
302  typedef typename JCollection<JElement_t, JDistance_t>::ordinate_type ordinate_type;
303 
304  collection.configure(bounds);
305 
306  for (iterator i = collection.begin(); i != collection.end(); ++i) {
307  configure(i->getY(), bounds, JBool<JAssembler<ordinate_type>::is_collection>());
308  }
309  }
container_type::iterator iterator
Definition: JCollection.hh:93
void configure(const JAbstractCollection< abscissa_type > &bounds)
Configure collection.
Definition: JCollection.hh:332
void configure(const T &value, const JAbstractCollection< JAbscissa_t > &bounds, JBool< false > option)
Configuration of value.
JElement_t::ordinate_type ordinate_type
Definition: JCollection.hh:83
template<class T >
void JTOOLS::accumulate ( T value,
JBool< false >  option 
)
inline

Accumulation of value.

This is a fall-back method; it does nothing.

Parameters
valuevalue
optionfalse

Definition at line 321 of file JToolsToolkit.hh.

322  {}
template<class JElement_t , class JDistance_t >
void JTOOLS::accumulate ( JCollection< JElement_t, JDistance_t > &  collection,
JBool< true >  option = JBool<true>() 
)
inline

Recursive accumulation of collection.

Parameters
collectioncollection
optiontrue

Definition at line 332 of file JToolsToolkit.hh.

333  {
334  typedef typename JCollection<JElement_t, JDistance_t>::iterator iterator;
335  typedef typename JCollection<JElement_t, JDistance_t>::ordinate_type ordinate_type;
336 
337  for (iterator i = collection.begin(); i != collection.end(); ++i) {
338  accumulate(i->getY(), JBool<JAssembler<ordinate_type>::is_collection>());
339  }
340 
341  if (collection.getSize() > 1) {
342 
343  for (iterator j = collection.begin(), i = j++; j != collection.end(); ++i, ++j) {
344  j->getY() += i->getY();
345  }
346 
347  reset(collection.begin()->getY());
348  }
349  }
container_type::iterator iterator
Definition: JCollection.hh:93
const ordinate_type & getY(int index) const
Get ordinate value.
Definition: JCollection.hh:244
void reset(T &value)
Reset value.
JElement_t::ordinate_type ordinate_type
Definition: JCollection.hh:83
int j
Definition: JPolint.hh:703
void accumulate(T &value, JBool< false > option)
Accumulation of value.
virtual int getSize() const override
Get number of elements.
Definition: JCollection.hh:197
template<class JHistogram_t , class JHistogramMaplist_t , class JHistogramDistance_t , class JFunction_t , class JFunctionMaplist_t , class JFunctionDistance_t >
void JTOOLS::makePDF ( const JTransformableMultiHistogram< JHistogram_t, JHistogramMaplist_t, JHistogramDistance_t > &  input,
JTransformableMultiFunction< JFunction_t, JFunctionMaplist_t, JFunctionDistance_t > &  output 
)
inline

Conversion of multidimensional histogram to multidimensional function.

Parameters
inputmultidimensional histogram
outputmultidimensional function

Definition at line 287 of file JTransformableMultiFunction.hh.

289  {
290  output.insert(input);
291  }
void insert(const JTransformableMultiFunction< __JFunction_t, __JMaplist_t, __JDistance_t > &input)
Insert multidimensional input.
template<class JObject_t , class JHead_t , class JTail_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JTypeList< JHead_t, JTail_t > >  typelist,
const JTuple< T > &  tuple 
)

For each data type method.

The given object should provide for the function object operator

   template<class T>
   void object()(JType<T> type, tuple);
Parameters
objectobject
typelisttype list
tupletuple
Returns
object

Definition at line 666 of file JTuple.hh.

667  {
668  for_each(object, JType<JHead_t>(), tuple);
669  for_each(object, JType<JTail_t>(), tuple);
670 
671  return object;
672  }
JObject_t & for_each(JObject_t &object, JType< JTypeList< JHead_t, JTail_t > > typelist)
For each data type method.
Definition: JTypeList.hh:415
template<class JObject_t , class JTypelist_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JTypelist_t >  type,
const JTuple< T > &  tuple 
)

For each data type method.

The given object should provide for the function object operator

   template<class T>
   void object()(JType<T> type, tuple);
Parameters
objectobject
typetype
tupletuple
Returns
object

Definition at line 690 of file JTuple.hh.

691  {
692  object(type, tuple);
693 
694  return object;
695  }
template<class... Args>
JTuple<typename JTYPELIST<Args...>::typelist> JTOOLS::make_tuple ( const Args &...  args)
inline

Helper method for tuple.

Parameters
argsvalues
Returns
tuple

Definition at line 705 of file JTuple.hh.

706  {
707  return JTuple<typename JTYPELIST<Args...>::typelist>(args...);
708  }
Template data structure.
Definition: JTuple.hh:44
template<class JObject_t , class T >
JObject_t& JTOOLS::for_each ( JObject_t &  object,
JType< JNullType >  type,
const JTuple< T > &  tuple 
)

Termination method of for each data type method.

Parameters
objectobject
typenull type
tupletuple
Returns
object

Definition at line 720 of file JTuple.hh.

721  {
722  return object;
723  }
template<class T >
void JTOOLS::inplace_merge ( T  __begin,
const size_t  N,
const size_t *  delimiter 
)

Merge multiple sorted ranges.

Parameters
__beginbegin of data
Nnumber of delimiters (equals number of ranges plus one)
delimiterincremental delimiters

Definition at line 29 of file JMergeSort.cc.

30  {
31  switch (N - 1) {
32 
33  case 0:
34  case 1:
35  break;
36 
37  case 2:
38 
39  std::inplace_merge(__begin + delimiter[0],
40  __begin + delimiter[1],
41  __begin + delimiter[2]);
42 
43  break;
44 
45  default:
46 
47  const size_t n = (N - 1) >> 1;
48 
49  inplace_merge(__begin, n + 1, delimiter);
50  inplace_merge(__begin, N - n, delimiter + n);
51 
52  std::inplace_merge(__begin + delimiter[ 0 ],
53  __begin + delimiter[ n ],
54  __begin + delimiter[N-1]);
55 
56  break;
57  };
58  }
then JShowerPostfit f $INPUT_FILE o $OUTPUT_FILE N
void inplace_merge(T __begin, const size_t N, const size_t *delimiter)
Merge multiple sorted ranges.
Definition: JMergeSort.cc:29
const int n
Definition: JPolint.hh:697

Variable Documentation

const JCompiler JTOOLS::compiler
static

Function object for functional object compilation.

Definition at line 369 of file JFunctional.hh.

const JCumulator JTOOLS::cumulator
static

Function object for functional object compilation.

Definition at line 242 of file JHistogram.hh.

JTOOLS::pX

Definition at line 694 of file JPolint.hh.

const int JTOOLS::n = std::min((int) (N + 1), (int) this->size())

Definition at line 697 of file JPolint.hh.

JTOOLS::j = 0

Definition at line 703 of file JPolint.hh.

result_type JTOOLS::result
mutable

Definition at line 764 of file JPolint.hh.

double JTOOLS::u[N+1]
mutable

Definition at line 776 of file JPolint.hh.

data_type JTOOLS::v[N+1][M+1]
mutable

Definition at line 777 of file JPolint.hh.

data_type JTOOLS::w[N+1][M+1]
mutable

Definition at line 778 of file JPolint.hh.

data_type JTOOLS::r[M+1]
mutable

Definition at line 779 of file JPolint.hh.