chromium/third_party/libc++/src/include/__random/piecewise_constant_distribution.h

//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#ifndef _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H
#define _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H

#include <__algorithm/upper_bound.h>
#include <__config>
#include <__random/is_valid.h>
#include <__random/uniform_real_distribution.h>
#include <iosfwd>
#include <numeric>
#include <vector>

#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#  pragma GCC system_header
#endif

_LIBCPP_PUSH_MACROS
#include <__undef_macros>

_LIBCPP_BEGIN_NAMESPACE_STD

template <class _RealType = double>
class _LIBCPP_TEMPLATE_VIS piecewise_constant_distribution {};

template <class _RealType>
typename piecewise_constant_distribution<_RealType>::param_type&
piecewise_constant_distribution<_RealType>::param_type::operator=(const param_type& __rhs) {}

template <class _RealType>
void piecewise_constant_distribution<_RealType>::param_type::__init() {}

template <class _RealType>
piecewise_constant_distribution<_RealType>::param_type::param_type() :{}

template <class _RealType>
template <class _InputIteratorB, class _InputIteratorW>
piecewise_constant_distribution<_RealType>::param_type::param_type(
    _InputIteratorB __f_b, _InputIteratorB __l_b, _InputIteratorW __f_w)
    : __b_(__f_b, __l_b) {}

#ifndef _LIBCPP_CXX03_LANG

template <class _RealType>
template <class _UnaryOperation>
piecewise_constant_distribution<_RealType>::param_type::param_type(
    initializer_list<result_type> __bl, _UnaryOperation __fw)
    : __b_(__bl.begin(), __bl.end()) {}

#endif // _LIBCPP_CXX03_LANG

template <class _RealType>
template <class _UnaryOperation>
piecewise_constant_distribution<_RealType>::param_type::param_type(
    size_t __nw, result_type __xmin, result_type __xmax, _UnaryOperation __fw)
    : __b_(__nw == 0 ? 2 : __nw + 1) {}

template <class _RealType>
template <class _URNG>
_RealType piecewise_constant_distribution<_RealType>::operator()(_URNG& __g, const param_type& __p) {}

template <class _CharT, class _Traits, class _RT>
_LIBCPP_HIDE_FROM_ABI basic_ostream<_CharT, _Traits>&
operator<<(basic_ostream<_CharT, _Traits>& __os, const piecewise_constant_distribution<_RT>& __x) {}

template <class _CharT, class _Traits, class _RT>
_LIBCPP_HIDE_FROM_ABI basic_istream<_CharT, _Traits>&
operator>>(basic_istream<_CharT, _Traits>& __is, piecewise_constant_distribution<_RT>& __x) {}

_LIBCPP_END_NAMESPACE_STD

_LIBCPP_POP_MACROS

#endif // _LIBCPP___RANDOM_PIECEWISE_CONSTANT_DISTRIBUTION_H