add sprout/random/default_random_engine.hpp

fix sprout/functional/bit_not.hpp
This commit is contained in:
bolero-MURAKAMI 2012-06-14 00:41:15 +09:00
parent 37775f9280
commit 2b8a8662af
9 changed files with 39 additions and 18 deletions

View file

@ -46,11 +46,13 @@
#ifndef SPROUT_CONFIG_USE_SSCRISK_CEL
# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT <sprout/functional/functor.hpp>
# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT <sprout/algorithm/non_modifying.hpp>
# define HDR_NUMERIC_SSCRISK_CEL_OR_SPROUT <sprout/numeric/non_modifying.hpp>
# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT <sprout/iterator/operation.hpp>
# define NS_SSCRISK_CEL_OR_SPROUT sprout
#else // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL
# define HDR_FUNCTIONAL_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/functional.hpp>
# define HDR_ALGORITHM_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/algorithm.hpp>
# define HDR_NUMERIC_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/numeric.hpp>
# define HDR_ITERATOR_SSCRISK_CEL_OR_SPROUT <sscrisk/cel/iterator.hpp>
# define NS_SSCRISK_CEL_OR_SPROUT sscrisk::cel
#endif // #ifndef SPROUT_CONFIG_USE_SSCRISK_CEL

View file

@ -12,7 +12,7 @@ namespace sprout {
typedef T result_type;
public:
SPROUT_CONSTEXPR T operator()(T const& x) const {
return !x;
return ~x;
}
};
} // namespace sprout

View file

@ -18,6 +18,7 @@
#include <sprout/random/binomial_distribution.hpp>
#include <sprout/random/geometric_distribution.hpp>
#include <sprout/random/normal_distribution.hpp>
#include <sprout/random/default_random_engine.hpp>
#include <sprout/random/variate_generator.hpp>
#include <sprout/random/random_result.hpp>
#include <sprout/random/random_iterator.hpp>

View file

@ -0,0 +1,18 @@
#ifndef SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP
#define SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP
#include <sprout/config.hpp>
#include <sprout/random/linear_congruential.hpp>
namespace sprout {
namespace random {
//
// default_random_engine
//
typedef sprout::random::minstd_rand0 default_random_engine;
} // namespace random
using sprout::random::default_random_engine;
} // namespace sprout
#endif // #ifndef SPROUT_RANDOM_DEFAULT_RANDOM_ENGINE_HPP

View file

@ -6,7 +6,7 @@
#include <type_traits>
#include <sprout/config.hpp>
#include <sprout/uuid/uuid.hpp>
#include <sprout/random/inversive_congruential.hpp>
#include <sprout/random/default_random_engine.hpp>
#include <sprout/random/uniform_int_distribution.hpp>
#include <sprout/random/variate_generator.hpp>
@ -83,7 +83,7 @@ namespace sprout {
//
// random_generator
//
typedef sprout::uuids::basic_random_generator<sprout::random::hellekalek1995> random_generator;
typedef sprout::uuids::basic_random_generator<sprout::random::default_random_engine> random_generator;
} // namespace uuids
} // namespace sprout