From d03cd6a46ec1f63532c77f8621f7329b4b217cff Mon Sep 17 00:00:00 2001 From: Vanya Belyaev Date: Mon, 5 Aug 2024 09:47:30 +0200 Subject: [PATCH] ? --- .aux/test_with_lcg | 2 +- source/include/Ostap/MatrixUtils.h | 34 +++++++++++++-------------- source/include/Ostap/Tensors.h | 20 ++++++++-------- source/include/Ostap/ValueWithError.h | 12 +++++----- source/src/ValueWithError.cpp | 12 +++++----- 5 files changed, 40 insertions(+), 40 deletions(-) diff --git a/.aux/test_with_lcg b/.aux/test_with_lcg index 2d559b64..8a1ae1fe 100755 --- a/.aux/test_with_lcg +++ b/.aux/test_with_lcg @@ -4,5 +4,5 @@ CMTCONFIG=$2 source /cvmfs/sft.cern.ch/lcg/views/${LCG}/${CMTCONFIG}/setup.sh source build/INSTALL/thisostap.sh cd build -ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -j8 --output-on-failure +ctest -N && cmake .. -DCMAKE_INSTALL_PREFIX=./INSTALL/ && ctest -R roc -j8 --output-on-failure diff --git a/source/include/Ostap/MatrixUtils.h b/source/include/Ostap/MatrixUtils.h index 6f04559d..73a2d3a8 100755 --- a/source/include/Ostap/MatrixUtils.h +++ b/source/include/Ostap/MatrixUtils.h @@ -166,7 +166,7 @@ namespace Ostap * @date 2006-05-24 */ template - inline size_t + inline std::size_t setToScalar ( ROOT::Math::SVector& m , const T& value = T() ) { @@ -195,7 +195,7 @@ namespace Ostap * @date 2006-05-24 */ template - inline size_t + inline std::size_t setToScalar ( ROOT::Math::SMatrix& m , const T& value = T() ) { @@ -222,7 +222,7 @@ namespace Ostap * @date 2006-05-24 */ template - inline size_t + inline std::size_t setToUnit ( ROOT::Math::SMatrix& m , const T& value = T(1) ) { @@ -255,7 +255,7 @@ namespace Ostap * @date 2006-05-24 */ template - inline size_t + inline std::size_t scale ( ROOT::Math::SMatrix& m , const T& value ) { @@ -282,7 +282,7 @@ namespace Ostap * @date 2006-05-24 */ template - inline size_t + inline std::size_t scale ( ROOT::Math::SVector& m , const T& value ) { @@ -876,17 +876,17 @@ namespace Ostap * const Ostap::Matrix4x4 matrix = ... ; * * // number of NULL elements: - * const size_t nulls = + * const std::size_t nulls = * Ostap::Math::count_if ( matrix , * std::bind2nd( std::equal_to() , 0.0 ) ) ; * * // number of elements in excess of 100.0 - * const size_t large = + * const std::size_t large = * Ostap::Math::count_if ( matrix , * std::bind2nd( std::greater() , 100.0 ) ) ; * * // number of elements which are less then 0.01 in absolute value - * const size_t small = + * const std::size_t small = * Ostap::Math::count_if ( matrix , * std::bind2nd( _AbsCompare() , 0.01 ) ) ; * @@ -900,7 +900,7 @@ namespace Ostap * @date 2006-04-24 */ template - inline size_t + inline std::size_t count_if ( const ROOT::Math::SMatrix& m , P pred ) { return std::count_if ( m.begin() , m.end() , pred ) ; } @@ -912,17 +912,17 @@ namespace Ostap * const Ostap::SymMatrix4x4 matrix = ... ; * * // number of NULL elements: - * const size_t nulls = + * const std::size_t nulls = * Ostap::Math::count_if ( matrix , * std::bind2nd( std::equal_to() , 0.0 ) ) ; * * // number of elements in excess of 100.0 - * const size_t large = + * const std::size_t large = * Ostap::Math::count_if ( matrix , * std::bind2nd( std::greater() , 100.0 ) ) ; * * // number of elements which are less then 0.01 in absolute value - * const size_t small = + * const std::size_t small = * Ostap::Math::count_if ( matrix , * std::bind2nd( Ostap::Math::_AbsCompare() , 0.01 ) ) ; * @@ -940,11 +940,11 @@ namespace Ostap * @date 2006-04-24 */ template - inline size_t + inline std::size_t count_if ( const ROOT::Math::SMatrix >& m , P pred ) { - size_t result = 0 ; + std::size_t result = 0 ; for ( unsigned int i = 0 ; i < D ; ++i ) { if ( pred ( m ( i , i ) ) ) { result += 1 ; } @@ -965,7 +965,7 @@ namespace Ostap * const Ostap::SymMatrix3x3& covariance = v->covMatrix() ; * * // count number of VERY small (and negative) diagonal elements: - * const size_t bad = + * const std::size_t bad = * Ostap::Math::cound_diagonal( covariance , * std::bind2nd( std::less() , 0.01 * Ostap::Units::micrometer ) ; * if ( 0 != bad ) @@ -982,11 +982,11 @@ namespace Ostap * @date 2006-04-24 */ template - inline size_t + inline std::size_t count_diagonal ( const ROOT::Math::SMatrix& m , P pred ) { - size_t result = 0 ; + std::size_t result = 0 ; for ( unsigned int i = 0 ; i < D ; ++i ) { if ( pred ( m ( i , i ) ) ) { result += 1 ; } } return result ; diff --git a/source/include/Ostap/Tensors.h b/source/include/Ostap/Tensors.h index ef50858f..c452bc66 100644 --- a/source/include/Ostap/Tensors.h +++ b/source/include/Ostap/Tensors.h @@ -76,8 +76,8 @@ namespace Ostap * * Delta delta ; * - * const size_t i = ... ; - * const size_t j = ... ; + * const std::size_t i = ... ; + * const std::size_t j = ... ; * * int ij = delta( i , j ) ; * @@ -91,12 +91,12 @@ namespace Ostap // ==================================================================== /// Kroneker delta inline int delta - ( const size_t i , - const size_t j ) const { return i == j ; } + ( const std::size_t i , + const std::size_t j ) const { return i == j ; } /// Kroneker delta (functional form) inline int operator() - ( const size_t i , - const size_t j ) const { return i == j ; } + ( const std::size_t i , + const std::size_t j ) const { return i == j ; } // ==================================================================== } ; // ====================================================================== @@ -166,12 +166,12 @@ namespace Ostap // ==================================================================== /// the only one important function: get the metric inline int operator () - ( const size_t i , - const size_t j ) const { return g( i, j ) ; } + ( const std::size_t i , + const std::size_t j ) const { return g( i, j ) ; } /// the only one important function: get the metric inline int g - ( const size_t i , - const size_t j ) const + ( const std::size_t i , + const std::size_t j ) const { return ( i != j ) ? 0 : diff --git a/source/include/Ostap/ValueWithError.h b/source/include/Ostap/ValueWithError.h index 5efca8bc..dea9dd88 100644 --- a/source/include/Ostap/ValueWithError.h +++ b/source/include/Ostap/ValueWithError.h @@ -482,8 +482,8 @@ namespace Ostap * @return the binomial efficiency */ ValueWithError binomEff - ( const size_t n_success , - const size_t N_total ) ; + ( const std::size_t n_success , + const std::size_t N_total ) ; // ======================================================================== /** evaluate the binomial efficiency interval using Wilson's prescription * @param n_success (INPUT) number of 'success' @@ -491,8 +491,8 @@ namespace Ostap * @return the binomial efficiency */ ValueWithError wilsonEff - ( const size_t n_success , - const size_t N_total ) ; + ( const std::size_t n_success , + const std::size_t N_total ) ; // ======================================================================== /** evaluate the binomial efficiency interval * using Agresti-Coull's prescription @@ -501,8 +501,8 @@ namespace Ostap * @return the binomial efficiency */ ValueWithError agrestiCoullEff - ( const size_t n_success , - const size_t N_total ) ; + ( const std::size_t n_success , + const std::size_t N_total ) ; // ======================================================================== /** simple evaluation of efficiency from statistically independend * "exclusive" samples "accepted" and "rejected" diff --git a/source/src/ValueWithError.cpp b/source/src/ValueWithError.cpp index 68e1c8f1..40b469d8 100644 --- a/source/src/ValueWithError.cpp +++ b/source/src/ValueWithError.cpp @@ -865,8 +865,8 @@ Ostap::Math::ValueWithError Ostap::Math::abs */ // ============================================================================ Ostap::Math::ValueWithError Ostap::Math::binomEff -( const size_t n , - const size_t N ) +( const std::size_t n , + const std::size_t N ) { if ( n > N ) { return binomEff ( N , n ) ; } else if ( 0 == N ) { return ValueWithError ( 1 , 1 ) ; } @@ -887,8 +887,8 @@ Ostap::Math::ValueWithError Ostap::Math::binomEff */ // ============================================================================ Ostap::Math::ValueWithError Ostap::Math::wilsonEff -( const size_t n , - const size_t N ) +( const std::size_t n , + const std::size_t N ) { // if ( n > N ) { return wilsonEff ( N , n ) ; } @@ -919,8 +919,8 @@ Ostap::Math::ValueWithError Ostap::Math::wilsonEff */ // ============================================================================ Ostap::Math::ValueWithError Ostap::Math::agrestiCoullEff -( const size_t n , - const size_t N ) +( const std::size_t n , + const std::size_t N ) { // if ( n > N ) { return wilsonEff ( N , n ) ; }