Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
VanyaBelyaev committed Oct 27, 2024
1 parent cbb7c4d commit 9df6242
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
24 changes: 12 additions & 12 deletions ostap/math/make_fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
__author__ = "Vanya BELYAEV [email protected]"
__date__ = "2023-02-14"
__all__ = (
'make_fun1' , ## conbert 1D python function/callable into C++ function
'make_fun2' , ## conbert 2D python function/callable into C++ function
'make_fun3' , ## conbert 3D python function/callable into C++ function
'make_fun1' , ## convert 1D python function/callable into C++ function
'make_fun2' , ## convert 2D python function/callable into C++ function
'make_fun3' , ## convert 3D python function/callable into C++ function
)
# =============================================================================
from ostap.core.meta_info import root_info
Expand All @@ -30,7 +30,7 @@
if ( 6 , 24 ) <= root_info :
## convert python 1D-function into C++ functor
def make_fun1 ( fun , forcepc = False ) :
"""Convert python 1D-function into C++ functor"""
""" Convert python 1D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
##
if forcepc :
Expand All @@ -40,7 +40,7 @@ def make_fun1 ( fun , forcepc = False ) :
return Ostap.Math.Apply ( fun )
## convert python 2D-function into C++ functor
def make_fun2 ( fun , forcepc = False ) :
"""Convert python 2D-function into C++ functor"""
""" Convert python 2D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
##
if forcepc :
Expand All @@ -50,7 +50,7 @@ def make_fun2 ( fun , forcepc = False ) :
return Ostap.Math.Apply2 ( fun )
## convert python 3D-function into C++ functor
def make_fun3 ( fun , forcepc = False ) :
"""Convert python 3D-function into C++ functor"""
""" Convert python 3D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
##
if forcepc :
Expand All @@ -62,7 +62,7 @@ def make_fun3 ( fun , forcepc = False ) :
elif (6,18) <= root_info :
# =========================================================================
def make_fun1 ( fun , forcepc = False ) :
"""Convert python 1D-function into C++ functor"""
""" Convert python 1D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC = Ostap.Functions.PyCallable
pc = fun if isinstance ( fun , PC ) else PC ( fun , True )
Expand All @@ -73,7 +73,7 @@ def make_fun1 ( fun , forcepc = False ) :
res ._pc = pc,fun
return res
def make_fun2 ( fun , forcepc = False ) :
"""Convert python 2D-function into C++ functor"""
""" Convert python 2D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC2 = Ostap.Functions.PyCallable2
pc = fun if isinstance ( fun , PC2 ) else PC2 ( fun , True )
Expand All @@ -84,7 +84,7 @@ def make_fun2 ( fun , forcepc = False ) :
res ._pc = pc,fun
return res
def make_fun3 ( fun , forcepc = False ) :
"""Convert python 3D-function into C++ functor"""
""" Convert python 3D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC3 = Ostap.Functions.PyCallable3
pc = fun if isinstance ( fun , PC3 ) else PC3 ( fun , True )
Expand All @@ -98,17 +98,17 @@ def make_fun3 ( fun , forcepc = False ) :
else :
# =========================================================================
def make_fun1 ( fun , forcepc = False ) :
"""Convert python 1D-function into C++ functor"""
""" Convert python 1D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC = Ostap.Functions.PyCallable
return fun if isinstance ( fun , PC ) else PC ( fun , True )
def make_fun2 ( fun , forcepc = False ) :
"""Convert python 2D-function into C++ functor"""
""" Convert python 2D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC2 = Ostap.Functions.PyCallable2
return fun if isinstance ( fun , PC2 ) else PC2 ( fun , True )
def make_fun3 ( fun , forcepc = False ) :
"""Convert python 3D-function into C++ functor"""
""" Convert python 3D-function into C++ functor"""
assert callable ( fun ) , 'Function must be callable!'
PC3 = Ostap.Functions.PyCallable3
return fun if isinstance ( fun , PC3 ) else PC3 ( fun , True )
Expand Down
40 changes: 20 additions & 20 deletions source/include/Ostap/Integrator.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ namespace Ostap
// ======================================================================
/// constructor with integration workspace size
Integrator
( const std::size_t size = 0 ,
const unsigned short size_cquad = 0 ,
const unsigned short size_romberg = 0 ) ;
( const std::size_t size = 0 ,
const unsigned short size_cquad = 0 ,
const unsigned short size_romberg = 0 ) ;
// ======================================================================
/// constructor with integration workspace
Integrator
Expand All @@ -108,7 +108,7 @@ namespace Ostap
/** calculate the integral
* \f[ r = \int_{x_{min}}^{x_{max}} f_1(x) dx \f]
* @param f1 the function
* @param xmin lower integration edge
* @param xmin lower integration edge
* @param xmax upper integration edge
* @param tag uqniue label/tag
* @param rescale rescale function for better numerical precision
Expand Down Expand Up @@ -174,7 +174,7 @@ namespace Ostap
* @param f1 the function
* @param xmax upper integration edge
* @param integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @return the value of the integral
*/
template <class FUNCTION1>
Expand All @@ -196,7 +196,7 @@ namespace Ostap
* @param c the parameter
* @param xmin lower integration edge
* @param xmax upper integration edge
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical treatmenrt
* @return the value of the integral
*/
Expand All @@ -221,7 +221,7 @@ namespace Ostap
* @param f1 the function
* @param c the parameter
* @param xmin lower integration edge
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical treatmenrt
* @return the value of the integral
*/
Expand All @@ -247,7 +247,7 @@ namespace Ostap
* @param f1 the function
* @param c the parameter
* @param xmax upper integration edge
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical treatmenrt
* @return the value of the integral
*/
Expand Down Expand Up @@ -278,7 +278,7 @@ namespace Ostap
* @param f1 the function
* @param c the parameter
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision (if non-positive s_APRECISION_GAWC is used)
* @param aprecision relative precision (if non-positive s_RPRECISION_GAWC is used)
Expand Down Expand Up @@ -314,7 +314,7 @@ namespace Ostap
* @param xmin low integration edge
* @param n number of subtractions
* @see Ostap::Math::Integrtator::cauchy_pv_to_infinity
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical treatmenrt
* @return the value of the integral
*/
Expand Down Expand Up @@ -856,7 +856,7 @@ namespace Ostap
* @param xmin lower integration edge
* @param xmax upper integration edge
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
*/
template <class FUNCTION1>
Expand All @@ -882,7 +882,7 @@ namespace Ostap
* @param c the parameter
* @param xmin lower integration edge
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
*/
template <class FUNCTION1>
Expand All @@ -908,7 +908,7 @@ namespace Ostap
* @param c the parameter
* @param xmax upper integration edge
* @param integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
*/
template <class FUNCTION1>
Expand Down Expand Up @@ -951,7 +951,7 @@ namespace Ostap
* @param f1 the function
* @param c the parameter
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision (if non-positive s_APRECISION_QAWC is used)
* @param aprecision relative precision (if non-positive s_RPRECISION_QAWC is used)
Expand Down Expand Up @@ -981,7 +981,7 @@ namespace Ostap
* @param s s-parameter
* @param xmin lower integration range
* @param n number of subtracion
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @return value of the dispersion integral
* @see Ostap::Math::Integrator::cauchy_pv_to_infinity
Expand Down Expand Up @@ -1179,7 +1179,7 @@ namespace Ostap
* @param xmin lower integration edge
* @param xmax upper integration edge
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision (if non-positive s_APRECISION_QAWC is used)
* @param aprecision relative precision (if non-positive s_RPRECISION_QAWC is used)
Expand Down Expand Up @@ -1207,7 +1207,7 @@ namespace Ostap
* @param c the parameter
* @param xmin lower integration edge
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision
* @param aprecision relative precision
Expand All @@ -1231,7 +1231,7 @@ namespace Ostap
* @param c the parameter
* @param xmax upper integration edge
* @param integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision
* @param aprecision relative precision
Expand Down Expand Up @@ -1272,7 +1272,7 @@ namespace Ostap
* @param f1 the function
* @param c the parameter
* @param ws integration workspace
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision (if non-positive s_APRECISION_QAWC is used)
* @param aprecision relative precision (if non-positive s_RPRECISION_QAWC is used)
Expand All @@ -1297,7 +1297,7 @@ namespace Ostap
* @param s s-parameter
* @param xmin lower integration range
* @param n number of subtracion
* @param tag unuque label/tag
* @param tag unique label/tag
* @param rescale rescale function for better numerical precision
* @param aprecision absolute precision
* @param aprecision relative precision
Expand Down

0 comments on commit 9df6242

Please sign in to comment.