TRIQS/triqs_modest
3.3.0
Brillouin zone summation
Loading...
Searching...
No Matches
range_supp.hpp
Go to the documentation of this file.
1
// Copyright (c) 2025--present, The Simons Foundation
2
// This file is part of TRIQS/modest and is licensed under the terms of GPLv3 or later.
3
// SPDX-License-Identifier: GPL-3.0-or-later
4
// See LICENSE in the root of this distribution for details.
5
6
#pragma once
7
#include <ranges>
8
9
namespace
triqs
{
10
22
template
<std::ranges::input_range R>
bool
all_equal
(R
const
&r) {
23
return
std::ranges::adjacent_find(r, std::not_equal_to{}) == std::ranges::end(r);
24
}
25
}
// namespace triqs
triqs
Definition
streams.hpp:11
triqs::all_equal
bool all_equal(R const &r)
Determines if all elements in the given range are equal.
Definition
range_supp.hpp:22
triqs_modest
utils
range_supp.hpp
Generated by
1.9.8