Template Class t8_partition_search_with_queries

Inheritance Relationships

Base Type

Class Documentation

template<typename Query_T, typename Udata = void>
class t8_partition_search_with_queries : public t8_partition_search<void>

A class that performs a search in the partition of a forest with queries.

Uses a filter-view to filter out the active queries. It is recommended to use this version of the search if the number of queries is small or if the queries do not need any further computations to be evaluated.

Template Parameters:
  • Query_T – The type of queries

  • Udata – The type of the user data, defaults to void.

Public Functions

inline t8_partition_search_with_queries(t8_partition_search_element_callback<Udata> element_callback, t8_partition_search_query_callback<Query_T, Udata> queries_callback, std::vector<Query_T> &queries, const t8_forest_t forest = nullptr, Udata *user_data = nullptr)

Constructor for the t8_partition_search_with_queries class.

This constructor initializes a t8_partition_search_with_queries object with the given element callback, queries callback, forest, and user data. If the forest is not null, it increments the reference count of the forest and asserts that the forest is committed.

Parameters:
  • element_callback[in] A callback function of type t8_partition_search_element_callback<Udata>.

  • queries_callback[in] A callback function of type t8_partition_search_query_callback<Query_T, Udata>.

  • queries[in] A reference to a vector of Query_T objects.

  • forest[in] A pointer to a t8_forest_t object. Defaults to nullptr.

  • user_data[in] A pointer to a Udata object. Defaults to nullptr.

inline void update_queries(std::vector<Query_T> &queries)

Updates the queries associated with the object.

Parameters:

queries[in] A reference to a vector of Query_T objects.

inline ~t8_partition_search_with_queries()

Destructor for the t8_partition_search_with_queries class.