Blender V5.0
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > Class Template Reference

#include <BLI_set.hh>

Classes

class  Iterator

Public Types

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

Public Member Functions

 Set (Allocator allocator={}) noexcept
 Set (NoExceptConstructor, Allocator allocator={}) noexcept
 Set (Span< Key > values, Allocator allocator={})
 Set (const std::initializer_list< Key > &values)
 ~Set ()=default
 Set (const Set &other)=default
 Set (Set &&other) noexcept(std::is_nothrow_move_constructible_v< SlotArray >)
Setoperator= (const Set &other)
Setoperator= (Set &&other)
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)
bool add_overwrite (const Key &key)
bool add_overwrite (Key &&key)
template<typename ForwardKey>
bool add_overwrite_as (ForwardKey &&key)
void add_multiple (Span< Key > keys)
void add_multiple_new (Span< Key > keys)
bool contains (const Key &key) const
template<typename ForwardKey>
bool contains_as (const ForwardKey &key) const
const Keylookup_key (const Key &key) const
template<typename ForwardKey>
const Keylookup_key_as (const ForwardKey &key) const
const Keylookup_key_default (const Key &key, const Key &default_value) const
template<typename ForwardKey>
const Keylookup_key_default_as (const ForwardKey &key, const Key &default_key) const
const Keylookup_key_ptr (const Key &key) const
template<typename ForwardKey>
const Keylookup_key_ptr_as (const ForwardKey &key) const
const Keylookup_key_or_add (const Key &key)
const Keylookup_key_or_add (Key &&key)
template<typename ForwardKey>
const Keylookup_key_or_add_as (ForwardKey &&key)
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)
Iterator begin () const
Iterator end () const
void remove (const Iterator &it)
template<typename Predicate>
int64_t remove_if (Predicate &&predicate)
void print_stats (const char *name) const
int64_t count_collisions (const Key &key) const
void clear ()
void clear_and_keep_capacity ()
void rehash ()
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)

Static Public Member Functions

static bool Intersects (const Set &a, const Set &b)
static bool Disjoint (const Set &a, const Set &b)

Friends

bool operator== (const Set &a, const Set &b)
bool operator!= (const Set &a, const Set &b)

Detailed Description

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
class blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >
Template Parameters
KeyType of the elements that are stored in this set. It has to be movable. Furthermore, the hash and is-equal functions have to support it.
InlineBufferCapacityThe minimum number of elements that can be stored in this Set without doing a heap allocation. This is useful when you expect to have many small sets. However, keep in mind that (unlike vector) initializing a set has a O(n) cost in the number of slots.
ProbingStrategyThe strategy used to deal with collisions. They are defined in BLI_probing_strategies.hh.
HashThe hash function used to hash the keys. There is a default for many types. See BLI_hash.hh for examples on how to define a custom hash function.
IsEqualThe equality operator used to compare keys. By default it will simply compare keys using the == operator.
SlotThis is what will actually be stored in the hash table array. At a minimum a slot has to be able to hold a key and information about whether the slot is empty, occupied or removed. Using a non-standard slot type can improve performance or reduce the memory footprint. For example, a hash can be stored in the slot, to make inequality checks more efficient. Some types have special values that can represent an empty or removed state, eliminating the need for an additional variable. Also see BLI_set_slots.hh.
AllocatorThe allocator used by this set. Should rarely be changed, except when you don't want that MEM_* is used internally.

Definition at line 106 of file BLI_set.hh.

Member Typedef Documentation

◆ const_pointer

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_pointer = const Key *

Definition at line 111 of file BLI_set.hh.

◆ const_reference

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::const_reference = const Key &

Definition at line 113 of file BLI_set.hh.

◆ iterator

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::iterator = Iterator

Definition at line 114 of file BLI_set.hh.

◆ pointer

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::pointer = Key *

Definition at line 110 of file BLI_set.hh.

◆ reference

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reference = Key &

Definition at line 112 of file BLI_set.hh.

◆ size_type

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size_type = int64_t

Definition at line 115 of file BLI_set.hh.

◆ value_type

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
using blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::value_type = Key

Definition at line 109 of file BLI_set.hh.

Constructor & Destructor Documentation

◆ Set() [1/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( Allocator allocator = {})
inlinenoexcept

Initialize an empty set. This is a cheap operation no matter how large the inline buffer is. 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 168 of file BLI_set.hh.

Referenced by blender::Set< std::string >::clear(), and blender::io::usd::remap_blend_shape_anim().

◆ Set() [2/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( NoExceptConstructor ,
Allocator allocator = {} )
inlinenoexcept

Definition at line 177 of file BLI_set.hh.

◆ Set() [3/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( Span< Key > values,
Allocator allocator = {} )
inline

Definition at line 179 of file BLI_set.hh.

◆ Set() [4/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( const std::initializer_list< Key > & values)
inline

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

Definition at line 187 of file BLI_set.hh.

◆ ~Set()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::~Set ( )
default

◆ Set() [5/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
default

◆ Set() [6/6]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Set ( Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inlinenoexcept

Definition at line 193 of file BLI_set.hh.

Member Function Documentation

◆ add() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( const Key & key)
inline

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

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

Definition at line 248 of file BLI_set.hh.

Referenced by blender::ed::sculpt_paint::cloth::add_constraints_for_verts(), blender::io::fbx::add_image_texture(), blender::ed::sculpt_paint::boundary::add_index(), blender::meshintersect::add_list_to_input_ids(), blender::Set< std::string >::add_multiple(), blender::bke::compositor::add_passes_used_by_cryptomatte_node(), blender::bke::compositor::add_passes_used_by_group_input_node(), blender::bke::compositor::add_passes_used_by_render_layer_node(), blender::ed::curves::pen_tool::add_single_point_and_curve(), blender::add_this_collection(), blender::meshintersect::add_to_input_ids(), blender::bke::compositor::add_used_passes_recursive(), blender::bke::AttributeAccessor::all_ids(), animchannels_rearrange_exec(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), armature_find_selected_pose_bones(), blender::nodes::attribute_search_update_fn(), blender::io::hydra::CurvesData::available_materials(), blender::io::hydra::MeshData::available_materials(), blender::io::hydra::VolumeData::available_materials(), bevel_rebuild_existing_polygons(), BKE_action_flip_with_pose(), blender::bke::BKE_armature_find_selected_bone_names(), BKE_blendfile_link_pack(), BKE_id_multi_tagged_delete(), BKE_lib_override_library_main_hierarchy_root_ensure(), BKE_library_main_rebuild_hierarchy(), BKE_modifiers_persistent_uids_are_valid(), blender::bke::BKE_pose_channel_find_selected_names(), blendfile_append_define_actions(), blendfile_relocate_postprocess_cleanup(), BM_mesh_is_valid(), blender::ed::greasepencil::boundary_to_curves(), bpy_batch_remove(), blender::ed::asset::build_filtered_catalog_tree(), blender::fn::build_multi_function_procedure_for_fields(), buttons_texture_modifier_geonodes_users_add(), blender::bke::collect_used_previews(), blender::bke::id_hash::compute_deep_hash_recursive(), blender::geometry::copy_vertex_group_names(), blender::geometry::copy_vertex_group_names(), blender::asset_system::AssetCatalogService::create_catalog_filter(), blender::io::fbx::create_transform_curve_data(), blender::ed::transform::createTransGraphEditData(), blender::ed::transform::createTransObject(), blender::ed::space_node::cut_links_exec(), blender::animrig::deselect_keys_actions(), blender::draw::discard_buffers(), blender::bke::discover_tree_zones(), do_object_box_select(), ED_armature_join_objects_exec(), ED_image_save_all_modified_info(), ED_undo_editmode_bases_from_view_layer(), ED_undo_editmode_objects_from_view_layer(), blender::nodes::partial_eval::eval_downstream(), blender::nodes::partial_eval::eval_upstream(), blender::ed::asset::external_file_check_callback(), blender::ed::animrig::extract_pose(), blender::animrig::Channelbag::fcurve_create_many(), fcurve_path_rename(), blender::geometry::filter_builtin_attributes(), blender::gpu::shader::ShaderCreateInfo::finalize(), blender::io::fbx::find_all_bones(), blender::io::fbx::find_bones(), blender::bke::node_structure_type_inferencing::find_dynamic_output_linked_inputs(), blender::io::fbx::find_fake_bones(), blender::bke::node_field_inferencing::find_group_output_dependencies(), blender::nodes::find_origin_sockets_through_contexts(), blender::find_side_effect_nodes_for_active_gizmos(), blender::ed::geometry::find_socket_log_contexts(), blender::find_socket_log_contexts(), blender::nodes::geo_eval_log::GeoTreeLog::find_socket_value_log(), blender::ed::space_node::find_sockets_on_active_gizmo_paths(), blender::nodes::find_target_sockets_through_contexts(), blender::fn::find_varying_fields(), blender::bke::pbvh::Tree::flush_bounds_to_parents(), blender::nodes::gizmos::foreach_active_gizmo_in_open_node_editor(), blender::bke::attribute_accessor_functions::foreach_attribute(), blender::nodes::inverse_eval::foreach_element_on_inverse_eval_path(), blender::index_mask::IndexMask::from_initializers(), blender::ed::sculpt_paint::face_set::gather_hidden_face_sets(), blender::ed::geometry::gather_node_group_ids(), blender::ed::geometry::gather_supported_objects(), blender::geometry::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::bke::generate_unique_instance_ids(), blender::io::obj::geometry_to_blender_objects(), blender::nodes::geo_eval_log::GeometryInfoLog::GeometryInfoLog(), blender::ed::space_node::get_attribute_info_from_context(), blender::ed::greasepencil::get_bone_deformed_vertex_group_names(), blender::ed::greasepencil::get_editable_frames_for_layer(), blender::ed::space_node::get_grid_names_from_context(), blender::ed::space_node::get_layer_names_from_context(), blender::ed::sculpt_paint::greasepencil::WeightPaintOperation::get_locked_and_bone_deformed_vertex_groups(), blender::ed::greasepencil::get_selected_object_keyframes(), get_selected_pose_bones(), gpu_material_library_use_function(), blender::ed::greasepencil::grease_pencil_material_lock_unselected_exec(), blender::ed::greasepencil::grease_pencil_primitive_init_curves(), blender::ed::greasepencil::grease_pencil_primitive_update_curves(), blender::ed::vse::have_free_channels(), id_delete(), IDP_EnumItemsValidate(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::io::usd::import_blendshapes(), init_structDNA(), insert_key(), blender::ed::greasepencil::insert_selected_values(), blender::deg::is_reachable(), blender::bke::blendfile::PartialWriteContext::is_valid(), join_tracks_exec(), knife_find_line_hits(), blender::nodes::layer_name_search_update_fn(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_override_library_main_hierarchy_id_root_ensure(), lib_override_library_main_resync_on_library_indirect_level(), main_namemap_validate_and_fix(), make_selected_objects_local(), menu_items_from_ui_create(), menu_types_add_from_keymap_items(), blender::gpu::missing_capabilities_get(), blender::seq::modifier_persistent_uids_are_valid(), MOV_proxy_builder_start(), blender::ed::space_node::mute_links_exec(), nla_eval_domain_action(), blender::nodes::node_geo_attribute_capture_cc::node_geo_exec(), blender::ed::space_node::node_group_make_insert_selected(), blender::ed::space_node::node_remove_existing_links_if_needed(), blender::bke::ntree_contains_tree_exec(), ntree_shader_copy_branch(), blender::ed::outliner::outliner_select_sync_to_edit_bone(), blender::ed::outliner::outliner_select_sync_to_object(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), blender::bke::library::pack_linked_id_hierarchy(), blender::asset_system::AssetCatalogService::parse_catalog_file(), blender::bke::pbvh::pbvh_bmesh_node_split(), pose_select_same_collection(), pose_select_same_color(), pose_select_siblings(), poselib_keytag_pose(), blender::fn::preprocess_field_tree(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::io::usd::process_scene_graph_instances(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_start_sample(), blender::asset_system::AssetCatalogService::prune_catalogs_by_path(), blender::asset_system::AssetCatalogService::purge_catalogs_not_listed(), rebuild_hierarchy_best_parent_find(), blender::animrig::internal::rebuild_slot_user_cache(), blender::asset_system::AssetCatalogService::reload_catalogs(), blender::asset_system::AssetLibrary::remap_ids_and_remove_invalid(), blender::ed::asset::index::AssetLibraryIndex::remove_broken_index_files(), blender::remove_outdated_bake_caches(), blender::ed::asset::index::AssetLibraryIndex::remove_unused_index_files(), blender::ed::geometry::run_node_group_exec(), screen_ctx_sel_actions_impl(), blender::ed::space_node::search_link_ops_for_asset_metadata(), blender::nodes::search_link_ops_for_declarations(), blender::ed::vse::select_grouped_effect(), select_similar_bone_collection(), blender::ed::greasepencil::select_similar_by_layer(), blender::ed::vse::sequencer_report_duplicates(), blender::ed::vse::sequencer_retiming_box_select_exec(), blender::ed::object::shade_smooth_exec(), similar_vert_select_exec(), blender::asset_system::tests::TEST(), blender::index_mask::tests::TEST(), blender::index_mask::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), timeline_cache_draw_geometry_nodes(), blender::geometry::trim_curves(), ui_but_update_from_old_block(), blender::ed::space_node::update_nested_node_refs_after_moving_nodes_into_group(), blender::ed::spreadsheet::update_visible_columns(), blender::gpu::VKDescriptorSetPoolUpdator::upload_descriptor_sets(), blender::gpu::shader::ShaderCreateInfo::validate_merge(), and blender::ed::greasepencil::vertex_group_normalize_all_exec().

◆ add() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add ( Key && key)
inline

Definition at line 252 of file BLI_set.hh.

◆ add_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as ( ForwardKey && key)
inline

◆ add_multiple()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple ( Span< Key > keys)
inline

◆ add_multiple_new()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_multiple_new ( Span< Key > keys)
inline

Convenience function to add many new keys to the set at once. The keys must not exist in the set before and there must not be duplicates in the array.

Definition at line 298 of file BLI_set.hh.

Referenced by blender::tests::TEST().

◆ add_new() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( const Key & key)
inline

◆ add_new() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new ( Key && key)
inline

Definition at line 237 of file BLI_set.hh.

◆ add_overwrite() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( const Key & key)
inline

Similar to add but reinserts the key if it already exists. Using this only makes sense if the key contains additional data besides what affects the hash.

Returns
True if the key was newly added, false if it was already present and was overwritten.

Definition at line 267 of file BLI_set.hh.

Referenced by blender::tests::TEST().

◆ add_overwrite() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite ( Key && key)
inline

Definition at line 271 of file BLI_set.hh.

◆ add_overwrite_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_overwrite_as ( ForwardKey && key)
inline

◆ begin()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Iterator blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::begin ( ) const
inline

◆ capacity()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::capacity ( ) const
inline

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

Definition at line 603 of file BLI_set.hh.

◆ clear()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear ( )
inline

◆ clear_and_keep_capacity()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::clear_and_keep_capacity ( )
inline

Remove all elements, but don't free the underlying memory.

This can be more efficient than using clear if approximately the same or more elements are added again afterwards. If way fewer elements are added instead, the cost of maintaining a large hash table can lead to very bad worst-case performance.

Definition at line 564 of file BLI_set.hh.

◆ contains()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains ( const Key & key) const
inline

Returns true if the key is in the set.

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

Definition at line 310 of file BLI_set.hh.

Referenced by blender::io::fbx::add_image_texture(), blender::io::fbx::add_image_textures(), blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::io::usd::utils::assign_materials(), blender::nodes::node_geo_extrude_mesh_cc::attribute_ids_by_domain(), blender::draw::gpencil::Instance::begin_sync(), bevel_rebuild_existing_polygons(), BKE_blendfile_link_pack(), BKE_library_main_rebuild_hierarchy(), blendfile_append_define_actions(), blender::ed::asset::build_filtered_catalog_tree(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_bmesh(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_grids(), blender::ed::sculpt_paint::auto_mask::calc_blurred_cavity_mesh(), blender::bke::can_read_node_type(), blender::nodes::node_geo_attribute_capture_cc::clean_unused_attributes(), blender::bke::id_hash::compute_deep_hash_recursive(), blender::compositor::compute_number_of_needed_buffers(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_vertex_group_names(), blender::geometry::copy_vertex_group_names(), blender::io::fbx::ArmatureImportContext::create_armature_bones(), blender::fn::multi_function::ProcedureDotExport::create_nodes(), blender::ed::transform::createTransObject(), curve_rename_fcurves(), blender::draw::discard_buffers(), blender::ed::sculpt_paint::geodesic::distances_create(), do_object_box_select(), do_render_compositor_scenes(), do_version_glare_node_bloom_strength_recursive(), do_version_glare_node_options_to_inputs_recursive(), do_versions_after_linking_440(), blender::fn::evaluate_fields(), blender::ed::animrig::extract_pose(), fcurve_path_rename(), blender::io::fbx::ArmatureImportContext::find_armatures(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::ed::greasepencil::get_bone_deformed_vertex_group_names(), blender::modifier::greasepencil::get_drawing_infos_by_frame(), blender::modifier::greasepencil::get_drawing_infos_by_layer(), blender::ed::greasepencil::get_editable_frames_for_layer(), blender::eevee::get_viewport_compositor_enabled_passes(), blender::ed::greasepencil::grease_pencil_material_lock_unselected_exec(), blender::ed::vse::have_free_channels(), id_delete(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_bmesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_fk_mesh(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_grids(), blender::ed::sculpt_paint::pose::ik_chain_init_face_sets_mesh(), blender::io::usd::import_blendshapes(), blender::geometry::interpolate_attribute_to_poly_curve(), blender::nodes::node_geo_extrude_mesh_cc::is_empty_domain(), blender::io::usd::is_excluded_attr(), blender::bke::blendfile::PartialWriteContext::is_valid(), blender::ed::mesh::join_generic_attributes(), blender::ed::greasepencil::keymap_grease_pencil_brush_stroke_poll(), knife_find_line_hits(), blender::bke::greasepencil::convert::legacy_gpencil_sanitize_annotations(), lib_override_root_hierarchy_set(), long_id_names_ensure_unique_id_names(), main_namemap_validate_and_fix(), blender::draw::mesh_buffer_cache_create_requested_subdiv(), blender::gpu::missing_capabilities_get(), blender::bke::node_preview_remove_unused(), ntree_shader_copy_branch(), blender::ed::object::object_parent_in_set(), blender::ed::outliner::outliner_select_sync_to_edit_bone(), blender::ed::outliner::outliner_select_sync_to_object(), blender::ed::outliner::outliner_select_sync_to_pose_bone(), pose_backup_create(), pose_bone_is_below_one_of(), pose_select_children(), pose_select_same_collection(), pose_select_same_color(), pose_select_siblings(), poselib_keytag_pose(), blender::asset_system::AssetCatalogService::purge_catalogs_not_listed(), rebuild_hierarchy_best_parent_find(), blender::remove_outdated_bake_caches(), blender::ed::greasepencil::retrieve_editable_drawings_grouped_per_frame(), blender::bke::CurvesGeometry::reverse_curves(), blender::ed::object::root_catalogs_draw(), blender::ed::sculpt_paint::geodesic::sculpt_geodesic_mesh_test_dist_add(), blender::ed::vse::select_grouped_effect(), select_similar_bone_collection(), blender::ed::greasepencil::select_similar_by_layer(), blender::geometry::subdivide_curves(), blender::index_mask::tests::TEST(), blender::index_mask::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::linear_allocator::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::bke::tests::TEST_F(), ui_but_find_old(), ui_but_update_from_old_block(), blender::ed::spreadsheet::update_visible_columns(), blender::bke::greasepencil::validate_drawing_vertex_groups(), and blender::ed::object::xform_skip_child_container_item_ensure_from_array().

◆ contains_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains_as ( const ForwardKey & key) const
inline

◆ count_collisions()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, 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 543 of file BLI_set.hh.

◆ Disjoint()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Disjoint ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
inlinestatic

Returns true if no key from a is also in b and vice versa.

Definition at line 665 of file BLI_set.hh.

Referenced by blender::tests::TEST(), and blender::tests::TEST().

◆ end()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Iterator blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::end ( ) const
inline

◆ Intersects()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::Intersects ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
inlinestatic

◆ is_empty()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::is_empty ( ) const
inline

◆ lookup_key()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key ( const Key & key) const
inline

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

Definition at line 323 of file BLI_set.hh.

Referenced by blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().

◆ lookup_key_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_as ( const ForwardKey & key) const
inline

Definition at line 327 of file BLI_set.hh.

Referenced by blender::Set< std::string >::lookup_key().

◆ lookup_key_default()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_default ( const Key & key,
const Key & default_value ) const
inline

Returns the key that is stored in the set that compares equal to the given key. If the key is not in the set, the given default value is returned instead.

Definition at line 336 of file BLI_set.hh.

Referenced by blender::tests::TEST().

◆ lookup_key_default_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_default_as ( const ForwardKey & key,
const Key & default_key ) const
inline

Definition at line 341 of file BLI_set.hh.

Referenced by blender::Set< std::string >::lookup_key_default().

◆ lookup_key_or_add() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_or_add ( const Key & key)
inline

Returns the key in the set that compares equal to the given key. If it does not exist, the key is newly added.

Definition at line 367 of file BLI_set.hh.

Referenced by blender::tests::TEST().

◆ lookup_key_or_add() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_or_add ( Key && key)
inline

Definition at line 371 of file BLI_set.hh.

◆ lookup_key_or_add_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_or_add_as ( ForwardKey && key)
inline

◆ lookup_key_ptr()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
const Key * blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr ( const Key & key) const
inline

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

Definition at line 354 of file BLI_set.hh.

Referenced by blender::tests::TEST().

◆ lookup_key_ptr_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
const Key * blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_key_ptr_as ( const ForwardKey & key) const
inline

Definition at line 358 of file BLI_set.hh.

Referenced by blender::Set< std::string >::lookup_key_ptr().

◆ operator=() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Set & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & other)
inline

Definition at line 218 of file BLI_set.hh.

◆ operator=() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
Set & blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::operator= ( Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > && other)
inline

Definition at line 223 of file BLI_set.hh.

◆ print_stats()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, 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 533 of file BLI_set.hh.

◆ rehash()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::rehash ( )
inline

Creates a new slot array and reinserts all keys inside of that. This method can be used to get rid of removed slots. Also this is useful for benchmarking the grow function.

Definition at line 579 of file BLI_set.hh.

◆ remove() [1/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const Iterator & it)
inline

Remove the key that the iterator is currently pointing at. It is valid to call this method while iterating over the set. However, after this method has been called, the removed element must not be accessed anymore.

Definition at line 500 of file BLI_set.hh.

◆ remove() [2/2]

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove ( const Key & key)
inline

◆ remove_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
bool blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_as ( const ForwardKey & key)
inline

◆ remove_contained()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, 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 map.

Definition at line 397 of file BLI_set.hh.

Referenced by blender::geometry::point_merge_by_distance(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().

◆ remove_contained_as()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename ForwardKey>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_contained_as ( const ForwardKey & key)
inline

◆ remove_if()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
template<typename Predicate>
int64_t blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove_if ( Predicate && predicate)
inline

Remove all values for which the given predicate is true and return the number of removed values.

This is similar to std::erase_if.

Definition at line 515 of file BLI_set.hh.

Referenced by blender::bke::compare_geometry::sort_domain_using_attributes(), blender::tests::TEST(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), and blender::bke::compare_geometry::verify_attributes_compatible().

◆ removed_amount()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, 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 611 of file BLI_set.hh.

◆ reserve()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
void blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::reserve ( const int64_t n)
inline

◆ size()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::size ( ) const
inline

◆ size_in_bytes()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, 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 628 of file BLI_set.hh.

◆ size_per_element()

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
int64_t blender::Set< Key, InlineBufferCapacity, 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 619 of file BLI_set.hh.

◆ operator!=

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool operator!= ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
friend

Definition at line 683 of file BLI_set.hh.

◆ operator==

template<typename Key, int64_t InlineBufferCapacity = default_inline_buffer_capacity(sizeof(Key)), typename ProbingStrategy = DefaultProbingStrategy, typename Hash = DefaultHash<Key>, typename IsEqual = DefaultEquality<Key>, typename Slot = typename DefaultSetSlot<Key>::type, typename Allocator = GuardedAllocator>
bool operator== ( const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & a,
const Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator > & b )
friend

Definition at line 670 of file BLI_set.hh.


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