HIBF
1.0.0-rc.1
Loading...
Searching...
No Matches
add_empty_bins.hpp
1
// SPDX-FileCopyrightText: 2006-2026, Knut Reinert & Freie Universität Berlin
2
// SPDX-FileCopyrightText: 2016-2026, Knut Reinert & MPI für molekulare Genetik
3
// SPDX-License-Identifier: BSD-3-Clause
4
5
#pragma once
6
7
#include <
cmath
>
// for floor
8
#include <
cstddef
>
// for size_t
9
10
#include <
hibf/platform.hpp
>
11
12
namespace
seqan::hibf
13
{
14
20
[[nodiscard]]
constexpr
size_t
add_empty_bins
(
size_t
const
tmax,
double
const
fraction)
noexcept
21
{
22
return
std::floor
(tmax / (1.0 - fraction));
23
}
24
25
}
// namespace seqan::hibf
cmath
cstddef
std::floor
T floor(T... args)
seqan::hibf::add_empty_bins
constexpr size_t add_empty_bins(size_t const tmax, double const fraction) noexcept
Returns the total number of bins such that a fraction of bins is empty, and tmax many bins are non-em...
Definition
add_empty_bins.hpp:20
platform.hpp
Provides platform and dependency checks.
hibf
misc
add_empty_bins.hpp
Generated on Fri Oct 30 2026 02:59:02 for HIBF by
1.10.0