Exemple #1
0
			inline SPROUT_CONSTEXPR sprout::array<std::ptrdiff_t, N>
			make_shuffle_indexes_1(std::ptrdiff_t n, Random const& rnd, sprout::array<std::ptrdiff_t, N> const& arr, std::ptrdiff_t i) {
				return i < n - 1
					? sprout::fixed::detail::make_shuffle_indexes_1(
						n,
						rnd(),
						sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + rnd.result()),
						i + 1
						)
					: sprout::fixed::swap_element(arr, arr.begin() + i, arr.begin() + rnd.result())
					;
			}
Exemple #2
0
	inline SPROUT_CONSTEXPR std::size_t hash_value(sprout::array<T, N> const& v) {
		return sprout::hash_range(v.begin(), v.end());
	}
Exemple #3
0
	inline SPROUT_CONSTEXPR bool
	operator<(sprout::array<T, N> const& lhs, sprout::array<T, N> const& rhs) {
		return sprout::lexicographical_compare(lhs.begin(), lhs.end(), rhs.begin(), rhs.end());
	}
Exemple #4
0
	inline SPROUT_CONSTEXPR bool
	operator==(sprout::array<T, N> const& lhs, sprout::array<T, N> const& rhs) {
		return sprout::equal(lhs.begin(), lhs.end(), rhs.begin());
	}