|
Blender V5.0
|
Namespaces | |
| namespace | tests |
Functions | |
| template<typename Iterator, typename Predicate> | |
| static int64_t | first_if (Iterator begin, Iterator end, Predicate &&predicate) |
| template<typename Iterator, typename Predicate> | |
| static int64_t | last_if (Iterator begin, Iterator end, Predicate &&predicate) |
| template<typename Range, typename Predicate> | |
| int64_t | first_if (const Range &range, Predicate &&predicate) |
| template<typename Range, typename Predicate> | |
| int64_t | last_if (const Range &range, Predicate &&predicate) |
| int64_t blender::binary_search::first_if | ( | const Range & | range, |
| Predicate && | predicate ) |
Definition at line 45 of file BLI_binary_search.hh.
References first_if().
|
static |
Find the index of the first element where the predicate is true. The predicate must also be true for all following elements. If the predicate is false for all elements, the size of the range is returned.
Definition at line 21 of file BLI_binary_search.hh.
References begin().
Referenced by blender::index_mask::IndexMask::find_larger_equal(), blender::unique_sorted_indices::find_size_of_next_range(), first_if(), blender::get_bake_frame_indices(), blender::index_mask::segments_from_indices(), blender::binary_search::tests::TEST(), blender::binary_search::tests::TEST(), and blender::binary_search::tests::TEST().
| int64_t blender::binary_search::last_if | ( | const Range & | range, |
| Predicate && | predicate ) |
Definition at line 51 of file BLI_binary_search.hh.
References last_if().
|
static |
Find the index of the last element where the predicate is true. The predicate must also be true for all previous elements. If the predicate is false for all elements, the -1 is returned.
Definition at line 35 of file BLI_binary_search.hh.
References begin().
Referenced by blender::index_mask::IndexMask::index_to_iterator(), last_if(), blender::binary_search::tests::TEST(), blender::binary_search::tests::TEST(), and blender::binary_search::tests::TEST().