Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-08-17 08:39:05

0001 /* Copyright 2025 Joaquin M Lopez Munoz.
0002  * Distributed under the Boost Software License, Version 1.0.
0003  * (See accompanying file LICENSE_1_0.txt or copy at
0004  * http://www.boost.org/LICENSE_1_0.txt)
0005  *
0006  * See https://www.boost.org/libs/bloom for library home page.
0007  */
0008 
0009 #ifndef BOOST_BLOOM_DETAIL_BLOCK_FPR_BASE_HPP
0010 #define BOOST_BLOOM_DETAIL_BLOCK_FPR_BASE_HPP
0011 
0012 #include <cmath>
0013 #include <cstddef>
0014 
0015 namespace boost{
0016 namespace bloom{
0017 namespace detail{
0018 
0019 template<std::size_t K>
0020 struct block_fpr_base
0021 {
0022   static double fpr(std::size_t i,std::size_t w)
0023   {
0024     return std::pow(1.0-std::pow(1.0-1.0/w,(double)K*i),(double)K);
0025   }
0026 };
0027 
0028 } /* namespace detail */
0029 } /* namespace bloom */
0030 } /* namespace boost */
0031 #endif