Blender V4.3
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator > Class Template Reference

#include <BLI_vector_set.hh>

Public Types

using value_type = Key
 
using pointer = Key *
 
using const_pointer = const Key *
 
using reference = Key &
 
using const_reference = const Key &
 
using iterator = Key *
 
using const_iterator = const Key *
 
using size_type = int64_t
 

Public Member Functions

 VectorSet (Allocator allocator={}) noexcept
 
 VectorSet (NoExceptConstructor, Allocator allocator={})
 
 VectorSet (Span< Key > keys, Allocator allocator={})
 
 VectorSet (const std::initializer_list< Key > &keys, Allocator allocator={})
 
 ~VectorSet ()
 
 VectorSet (const VectorSet &other)
 
 VectorSet (VectorSet &&other) noexcept
 
VectorSetoperator= (const VectorSet &other)
 
VectorSetoperator= (VectorSet &&other)
 
const Keyoperator[] (const int64_t index) const
 
 operator Span< Key > () const
 
Span< Keyas_span () const
 
void add_new (const Key &key)
 
void add_new (Key &&key)
 
bool add (const Key &key)
 
bool add (Key &&key)
 
template<typename ForwardKey >
bool add_as (ForwardKey &&key)
 
void add_multiple (Span< Key > keys)
 
bool contains (const Key &key) const
 
template<typename ForwardKey >
bool contains_as (const ForwardKey &key) const
 
bool remove (const Key &key)
 
template<typename ForwardKey >
bool remove_as (const ForwardKey &key)
 
void remove_contained (const Key &key)
 
template<typename ForwardKey >
void remove_contained_as (const ForwardKey &key)
 
template<typename Predicate >
int64_t remove_if (Predicate &&predicate)
 
Key pop ()
 
int64_t index_of (const Key &key) const
 
template<typename ForwardKey >
int64_t index_of_as (const ForwardKey &key) const
 
int64_t index_of_try (const Key &key) const
 
template<typename ForwardKey >
int64_t index_of_try_as (const ForwardKey &key) const
 
int64_t index_of_or_add (const Key &key)
 
int64_t index_of_or_add (Key &&key)
 
template<typename ForwardKey >
int64_t index_of_or_add_as (ForwardKey &&key)
 
const Keylookup_key (const Key &key) const
 
template<typename ForwardKey >
const Keylookup_key_as (const ForwardKey &key) const
 
const Keylookup_key_ptr (const Key &key) const
 
template<typename ForwardKey >
const Keylookup_key_ptr_as (const ForwardKey &key) const
 
const Keydata () const
 
const Keybegin () const
 
const Keyend () const
 
IndexRange index_range () const
 
void print_stats (const char *name) const
 
int64_t size () const
 
bool is_empty () const
 
int64_t capacity () const
 
int64_t removed_amount () const
 
int64_t size_per_element () const
 
int64_t size_in_bytes () const
 
void reserve (const int64_t n)
 
void clear ()
 
void clear_and_shrink ()
 
int64_t count_collisions (const Key &key) const
 

Detailed Description

template<typename Key, typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
class blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >

Definition at line 90 of file BLI_vector_set.hh.

Member Typedef Documentation

◆ const_iterator

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_iterator = const Key *

Definition at line 98 of file BLI_vector_set.hh.

◆ const_pointer

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_pointer = const Key *

Definition at line 94 of file BLI_vector_set.hh.

◆ const_reference

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_reference = const Key &

Definition at line 96 of file BLI_vector_set.hh.

◆ iterator

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::iterator = Key *

Definition at line 97 of file BLI_vector_set.hh.

◆ pointer

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pointer = Key *

Definition at line 93 of file BLI_vector_set.hh.

◆ reference

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reference = Key &

Definition at line 95 of file BLI_vector_set.hh.

◆ size_type

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t

Definition at line 99 of file BLI_vector_set.hh.

◆ value_type

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::value_type = Key

Definition at line 92 of file BLI_vector_set.hh.

Constructor & Destructor Documentation

◆ VectorSet() [1/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( Allocator allocator = {})
inlinenoexcept

Initialize an empty vector set. This is a cheap operation and won't do an allocation. This is necessary to avoid a high cost when no elements are added at all. An optimized grow operation is performed on the first insertion.

Definition at line 158 of file BLI_vector_set.hh.

Referenced by blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_shrink().

◆ VectorSet() [2/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( NoExceptConstructor ,
Allocator allocator = {} )
inline

Definition at line 168 of file BLI_vector_set.hh.

◆ VectorSet() [3/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( Span< Key > keys,
Allocator allocator = {} )
inline

Definition at line 170 of file BLI_vector_set.hh.

◆ VectorSet() [4/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( const std::initializer_list< Key > & keys,
Allocator allocator = {} )
inline

Construct a vector set that contains the given keys. Duplicates will be removed automatically.

Definition at line 178 of file BLI_vector_set.hh.

◆ ~VectorSet()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~VectorSet ( )
inline

◆ VectorSet() [5/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( const VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 191 of file BLI_vector_set.hh.

References blender::uninitialized_copy_n().

◆ VectorSet() [6/6]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet ( VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inlinenoexcept

Definition at line 210 of file BLI_vector_set.hh.

Member Function Documentation

◆ add() [1/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( const Key & key)
inline

Add a key to the vector set. If the key exists in the set already, nothing is done. The return value is true if the key was newly added.

This is similar to std::unordered_set::insert.

Definition at line 282 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as().

Referenced by blender::bke::calc_edges::add_existing_edges_to_hash_maps(), blender::bke::calc_edges::add_face_edges_to_hash_maps(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple(), blender::bke::anonymous_attribute_inferencing::analyze_anonymous_attribute_usages(), BKE_mesh_calc_edges_tessface(), BKE_pbvh_bmesh_node_save_orig(), blender::bke::ComponentAttributeProviders::ComponentAttributeProviders(), blender::realtime_compositor::compute_schedule(), blender::ed::sculpt_paint::ensure_editable_drawings(), extract_standalone_strips(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), follow_face_loop(), freeSeqData(), blender::index_mask::IndexMask::from_group_ids(), blender::geometry::gather_curve_attributes_to_interpolate(), blender::geometry::gather_curves_to_realize(), blender::geometry::gather_grease_pencils_to_realize(), blender::geometry::gather_meshes_to_realize(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::gather_pointclouds_to_realize(), get_node_names(), blender::ed::space_node::get_selected_nodes(), blender::ed::curves::get_unique_editable_curves(), GPU_backend_type_selection_detect(), blender::geometry::preprocess_meshes(), query_all_strips_recursive(), query_lower_channel_strips(), query_right_side_strips(), query_scene_strips(), query_selected_strips_no_handles(), query_snap_targets_timeline(), query_strip_effects_fn(), query_strips_at_frame(), query_time_dependent_strips_strips(), recalcData_sequencer_retiming(), retiming_key_overlap(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::geometry::ReverseUVSampler::ReverseUVSampler(), SEQ_connect(), SEQ_edit_move_strip_to_meta(), SEQ_edit_strip_split(), SEQ_get_connected_strips(), seq_load_apply_generic_options(), SEQ_query_all_strips(), SEQ_query_selected_strips(), SEQ_query_strip_effect_chain(), SEQ_query_unselected_strips(), seq_transform_collection_from_transdata(), seq_transform_handle_overwrite(), sequencer_add_movie_multiple_strips(), sequencer_add_movie_single_strip(), sequencer_meta_make_exec(), sequencer_select_connected_strips(), and blender::nodes::node_geo_extrude_mesh_cc::vert_indices_from_edges().

◆ add() [2/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( Key && key)
inline

◆ add_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as ( ForwardKey && key)
inline

◆ add_multiple()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple ( Span< Key > keys)
inline

Convenience function to add many keys to the vector set at once. Duplicates are removed automatically.

We might be able to make this faster than sequentially adding all keys, but that is not implemented yet.

Definition at line 302 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add().

Referenced by freeSeqData(), query_time_dependent_strips_strips(), retiming_key_overlap(), SEQ_edit_strip_split(), SEQ_iterator_set_expand(), sequencer_meta_make_exec(), and blender::bke::pbvh::update_normals_mesh().

◆ add_new() [1/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( const Key & key)
inline

◆ add_new() [2/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( Key && key)
inline

Definition at line 271 of file BLI_vector_set.hh.

◆ as_span()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Span< Key > blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span ( ) const
inline

◆ begin()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin ( ) const
inline

Definition at line 464 of file BLI_vector_set.hh.

Referenced by blender::geometry::preprocess_meshes().

◆ capacity()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::capacity ( ) const
inline

Returns the number of available slots. This is mostly for debugging purposes.

Definition at line 510 of file BLI_vector_set.hh.

◆ clear()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear ( )
inline

◆ clear_and_shrink()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_shrink ( )
inline

Removes all keys from the set and frees any allocated memory.

Definition at line 568 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::VectorSet().

Referenced by blender::bke::calc_edges::clear_hash_tables().

◆ contains()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains ( const Key & key) const
inline

Returns true if the key is in the vector set.

This is similar to std::unordered_set::find() != std::unordered_set::end().

Definition at line 314 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as().

Referenced by blender::ed::object::apply_eval_grease_pencil_data(), check_unique_node_cb(), blender::realtime_compositor::CompileState::compute_pixel_node_operation_outputs_count(), blender::realtime_compositor::NodeOperation::compute_results_reference_counts(), blender::realtime_compositor::PixelOperation::compute_results_reference_counts(), blender::realtime_compositor::compute_schedule(), follow_face_loop(), blender::bke::get_direct_zone_relations(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_group_make_test_selected(), blender::ed::space_node::node_group_separate_selected(), blender::ed::space_node::node_join_attach_recursive(), blender::ed::space_node::node_shader_script_update_exec(), blender::ed::space_node::node_shader_script_update_text_recursive(), query_snap_targets_timeline(), query_strip_effects_fn(), query_time_dependent_strips_strips(), blender::nodes::refresh_node_sockets_and_panels(), blender::ed::greasepencil::retrieve_editable_points(), blender::ed::greasepencil::retrieve_editable_strokes(), blender::ed::greasepencil::retrieve_editable_strokes_by_material(), blender::ed::greasepencil::retrieve_visible_points(), blender::ed::greasepencil::retrieve_visible_strokes(), SEQ_are_strips_connected_together(), SEQ_query_strip_effect_chain(), sequencer_select_grouped_exec(), and blender::bke::node_tree_runtime::update_link_vector().

◆ contains_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as ( const ForwardKey & key) const
inline

◆ count_collisions()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::count_collisions ( const Key & key) const
inline

Get the number of collisions that the probing strategy has to go through to find the key or determine that it is not in the set.

Definition at line 578 of file BLI_vector_set.hh.

◆ data()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::data ( ) const
inline

Get a pointer to the beginning of the array containing all keys.

Definition at line 459 of file BLI_vector_set.hh.

Referenced by blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), and blender::geometry::execute_realize_grease_pencil_tasks().

◆ end()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::end ( ) const
inline

◆ index_of()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of ( const Key & key) const
inline

◆ index_of_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_as ( const ForwardKey & key) const
inline

◆ index_of_or_add() [1/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add ( const Key & key)
inline

◆ index_of_or_add() [2/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add ( Key && key)
inline

◆ index_of_or_add_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_or_add_as ( ForwardKey && key)
inline

◆ index_of_try()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_try ( const Key & key) const
inline

◆ index_of_try_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_of_try_as ( const ForwardKey & key) const
inline

◆ index_range()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
IndexRange blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range ( ) const
inline

◆ is_empty()

◆ lookup_key()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key ( const Key & key) const
inline

Returns the key that is stored in the vector set that compares equal to the given key. This invokes undefined behavior when the key is not in the set.

Definition at line 428 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_as().

◆ lookup_key_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Key & blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_as ( const ForwardKey & key) const
inline

◆ lookup_key_ptr()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr ( const Key & key) const
inline

Returns a pointer to the key that is stored in the vector set that compares equal to the given key. If the key is not in the set, null is returned.

Definition at line 443 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr_as().

◆ lookup_key_ptr_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
const Key * blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr_as ( const ForwardKey & key) const
inline

◆ operator Span< Key >()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator Span< Key > ( ) const
inline

Definition at line 246 of file BLI_vector_set.hh.

◆ operator=() [1/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
VectorSet & blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( const VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 226 of file BLI_vector_set.hh.

References blender::copy_assign_container().

◆ operator=() [2/2]

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
VectorSet & blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inline

Definition at line 231 of file BLI_vector_set.hh.

References blender::move_assign_container().

◆ operator[]()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator[] ( const int64_t index) const
inline

Get the key stored at the given position in the vector.

Definition at line 239 of file BLI_vector_set.hh.

References BLI_assert, and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size().

◆ pop()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Key blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pop ( )
inline

Delete and return a key from the set. This will remove the last element in the vector. The order of the remaining elements in the set is not changed.

Definition at line 376 of file BLI_vector_set.hh.

Referenced by blender::ed::object::make_override_library_invoke().

◆ print_stats()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::print_stats ( const char * name) const
inline

Print common statistics like size and collision count. This is useful for debugging purposes.

Definition at line 485 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::as_span(), and blender::HashTableStats::print().

◆ remove()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const Key & key)
inline

Deletes the key from the set. Returns true when the key existed in the set and is now removed. This might change the order of elements in the vector.

This is similar to std::unordered_set::erase.

Definition at line 329 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_as().

Referenced by blender::ed::space_node::get_nodes_to_group(), blender::ed::object::make_override_library_invoke(), and retiming_key_overlap().

◆ remove_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
bool blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_as ( const ForwardKey & key)
inline

◆ remove_contained()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained ( const Key & key)
inline

Deletes the key from the set. This invokes undefined behavior when the key is not in the set. It might change the order of elements in the vector.

Definition at line 342 of file BLI_vector_set.hh.

References blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as().

Referenced by blender::geometry::gather_point_attributes_to_interpolate().

◆ remove_contained_as()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey >
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as ( const ForwardKey & key)
inline

◆ remove_if()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename Predicate >
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if ( Predicate && predicate)
inline

◆ removed_amount()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::removed_amount ( ) const
inline

Returns the amount of removed slots in the set. This is mostly for debugging purposes.

Definition at line 518 of file BLI_vector_set.hh.

◆ reserve()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve ( const int64_t n)
inline

◆ size()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size ( ) const
inline

Returns the number of keys stored in the vector set.

Definition at line 494 of file BLI_vector_set.hh.

Referenced by BKE_mesh_calc_edges_tessface(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear(), createTransSeqImageData(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::end(), blender::bke::node_tree_runtime::ensure_topology_cache(), blender::geometry::execute_realize_grease_pencil_tasks(), blender::geometry::execute_realize_mesh_tasks(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::index_mask::IndexMask::from_group_ids(), blender::nodes::node_geo_index_of_nearest_cc::IndexOfNearestFieldInput::get_varray_for_context(), gizmo2d_calc_bounds(), gizmo2d_calc_rotation(), gizmo2d_calc_transform_orientation(), blender::nodes::node_geo_sort_elements_cc::identifiers_to_indices(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::index_range(), blender::ed::object::make_override_library_invoke(), blender::ed::space_node::node_group_make_insert_selected(), blender::VectorSet< AttrDomain >::operator Span< AttrDomain >(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator[](), blender::geometry::preprocess_curves(), blender::geometry::preprocess_grease_pencils(), blender::geometry::preprocess_meshes(), blender::geometry::preprocess_pointclouds(), blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), select_grouped_effect_link(), SEQ_are_strips_connected_together(), seq_get_shown_sequences(), seq_get_strip_pivot_median(), strip_speed_get(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), transform_seq_slide_cursor_get(), blender::bke::node_tree_runtime::update_toposort(), and blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~VectorSet().

◆ size_in_bytes()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_in_bytes ( ) const
inline

Returns the approximate memory requirements of the set in bytes. This is more correct for larger sets.

Definition at line 535 of file BLI_vector_set.hh.

◆ size_per_element()

template<typename Key , typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultVectorSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::VectorSet< Key, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_per_element ( ) const
inline

Returns the bytes required per element. This is mostly for debugging purposes.

Definition at line 526 of file BLI_vector_set.hh.


The documentation for this class was generated from the following file: