UFO 1.0.0
An Efficient Probabilistic 3D Mapping Framework That Embraces the Unknown
Loading...
Searching...
No Matches
ufo::detail::MapHelper< Map > Class Template Reference
Inheritance diagram for ufo::detail::MapHelper< Map >:
ufo::Map< Dim, Maps > ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... > ufo::detail::MapHelper< Maps::template Map< Map< Dim, Maps... >, Tree< Map< Dim, Maps... >, Dim, Maps::Block... > > > ufo::TreeData< Derived, Dim, Ts >

Additional Inherited Members

- Public Types inherited from ufo::Map< Dim, Maps >
using Bounds = typename Base::Bounds
 
using Code = typename Base::Code
 
using Coord = typename Base::Coord
 
using coord_type = typename Base::coord_type
 
using depth_type = typename Base::depth_type
 
using Index = typename Base::Index
 
using Key = typename Base::Key
 
using Length = typename Base::Length
 
using length_type = typename Base::length_type
 
using Node = typename Base::Node
 
using offset_type = typename Base::offset_type
 
using Point = typename Base::Point
 
using pos_type = typename Base::pos_type
 
- Public Types inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
using Bounds = AABB< Dim, coord_type >
 
using Code = TreeCode< Dim >
 
using code_type = typename Code::code_type
 
using const_iterator = TreeIterator< Map< Dim, Maps... > >
 
using const_nearest_iterator = TreeNearestIterator< Map< Dim, Maps... > >
 
using const_nearest_iterator_geom = TreeNearestIterator< Map< Dim, Maps... >, Geometry >
 
using const_query_iterator = TreeQueryIterator< Map< Dim, Maps... > >
 
using const_query_iterator_pred = TreeQueryIterator< Map< Dim, Maps... >, Predicate >
 
using const_query_nearest_iterator = TreeQueryNearestIterator< Map< Dim, Maps... > >
 
using const_query_nearest_iterator_pred_geom = TreeQueryNearestIterator< Map< Dim, Maps... >, Predicate, Geometry >
 
using ConstNearest = IteratorWrapper< const_nearest_iterator_geom< Geometry >, const_nearest_iterator >
 
using ConstQuery = IteratorWrapper< const_query_iterator_pred< Predicate >, const_query_iterator >
 
using ConstQueryNearest = IteratorWrapper< const_query_nearest_iterator_pred_geom< Predicate, Geometry >, const_query_nearest_iterator >
 
using Coord = TreeCoord< Dim, coord_type >
 
using coord_type = float
 
using depth_type = std::uint32_t
 
using Index = TreeIndex
 
using Key = TreeKey< Dim >
 
using key_type = typename Key::key_type
 
using Length = Vec< Dim, length_type >
 
using length_type = double
 
using Node = TreeNode< Dim >
 
using offset_type = typename Index::offset_type
 
using Point = Vec< Dim, coord_type >
 
using pos_type = typename Index::pos_type
 
using Ray = ufo::Ray< Dim, coord_type >
 
using TraceResult = ufo::TraceResult< Dim >
 
- Public Types inherited from ufo::TreeData< Derived, Dim, Ts >
using Index = TreeIndex
 
using InnerData = TreeContainer< typename Ts::template InnerBlock< Dim, BF >... >
 
using LeafData = TreeContainer< typename Ts::template LeafBlock< Dim, BF >... >
 
using pos_type = Index::pos_type
 
- Public Member Functions inherited from ufo::Map< Dim, Maps >
 Map (Length leaf_node_length=Length(0.1), depth_type num_depth_levels=std::min(depth_type(17), Base::maxNumDepthLevels()))
 
 Map (length_type leaf_node_length, depth_type num_depth_levels=std::min(depth_type(17), Base::maxNumDepthLevels()))
 
 Map (Map &&)=default
 
 Map (Map const &)=default
 
template<class... Maps2>
 Map (Map< Dim, Maps2... > const &other)
 
 Map (ReadBuffer &in)
 
 Map (std::filesystem::path const &file)
 
 Map (std::istream &in)
 
WGPUBuffer gpuInnerBuffer (MapType map_type, std::size_t index=0) const
 
std::size_t gpuInnerBufferSize (MapType map_type, std::size_t index=0) const
 
WGPUBuffer gpuLeafBuffer (MapType map_type, std::size_t index=0) const
 
std::size_t gpuLeafBufferSize (MapType map_type, std::size_t index=0) const
 
std::size_t gpuNumBuffers (MapType map_type) const
 
std::size_t gpuNumInnerBuffers (MapType map_type) const
 
std::size_t gpuNumLeafBuffers (MapType map_type) const
 
void gpuRead (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void gpuRead (Predicate const &pred)
 
void gpuReadInner (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void gpuReadInner (Predicate const &pred)
 
void gpuReadLeaf (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void gpuReadLeaf (Predicate const &pred)
 
void gpuRelease ()
 
bool gpuWrite (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
bool gpuWrite (Predicate const &pred)
 
bool gpuWriteInner (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
bool gpuWriteInner (Predicate const &pred)
 
bool gpuWriteLeaf (MapType map_types=MapType::ALL)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
bool gpuWriteLeaf (Predicate const &pred)
 
MapHeader header (MapType map_types=MapType::ALL) const
 
Mapoperator= (Map &&)=default
 
Mapoperator= (Map const &)=default
 
template<class... Maps2>
Mapoperator= (Map< Dim, Maps2... > const &rhs)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void propagate (ExecutionPolicy &&policy, MapType map_types=MapType::ALL)
 
template<class ExecutionPolicy , class NodeType , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< is_node_type_v< NodeType >, bool > = true>
void propagate (ExecutionPolicy &&policy, NodeType node, MapType map_types=MapType::ALL)
 
void propagate (MapType map_types=MapType::ALL)
 Propagate modified information up the tree.
 
template<class NodeType , std::enable_if_t< is_node_type_v< NodeType >, bool > = true>
void propagate (NodeType const &node, MapType map_types=MapType::ALL)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void read (ExecutionPolicy &&policy, ReadBuffer &in, MapType map_types=MapType::ALL, bool propagate=true)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void read (ExecutionPolicy &&policy, std::filesystem::path const &file, MapType map_types=MapType::ALL, bool propagate=true)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void read (ExecutionPolicy &&policy, std::istream &in, MapType map_types=MapType::ALL, bool propagate=true)
 
void read (ReadBuffer &in, MapType map_types=MapType::ALL, bool propagate=true)
 
void read (std::filesystem::path const &file, MapType map_types=MapType::ALL, bool propagate=true)
 
void read (std::istream &in, MapType map_types=MapType::ALL, bool propagate=true)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void readData (ExecutionPolicy &&policy, ReadBuffer &in, MapHeader const &header, MapType map_types=MapType::ALL, bool propagate=true)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void readData (ExecutionPolicy &&policy, std::istream &in, MapHeader const &header, MapType map_types=MapType::ALL, bool propagate=true)
 
void readData (ReadBuffer &in, MapHeader const &header, MapType map_types=MapType::ALL, bool propagate=true)
 
void readData (std::istream &in, MapHeader const &header, MapType map_types=MapType::ALL, bool propagate=true)
 
MapHeader readHeader (ReadBuffer &in) const
 
MapHeader readHeader (std::filesystem::path const &file) const
 
MapHeader readHeader (std::istream &in) const
 
template<class NodeType , class Predicate = pred::True, std::enable_if_t< is_node_type_v< NodeType >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void saveDotFile (NodeType node, std::filesystem::path const &file, Predicate const &pred=pred::True{}, MapType map_types=MapType::ALL) const
 
template<class NodeType , class Predicate = pred::True, std::enable_if_t< is_node_type_v< NodeType >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void saveDotFile (NodeType node, std::ostream &out, Predicate const &pred=pred::True{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::True, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void saveDotFile (std::filesystem::path const &file, Predicate const &pred=pred::True{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::True, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void saveDotFile (std::ostream &out, Predicate const &pred=pred::True{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
Buffer write (ExecutionPolicy &&policy, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (ExecutionPolicy &&policy, std::filesystem::path const &file, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (ExecutionPolicy &&policy, std::ostream &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (ExecutionPolicy &&policy, WriteBuffer &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
Buffer write (Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (std::filesystem::path const &file, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (std::ostream &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void write (WriteBuffer &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (ExecutionPolicy &&policy, std::filesystem::path const &file, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (ExecutionPolicy &&policy, std::ostream &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class ExecutionPolicy , class Predicate = pred::Leaf, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (ExecutionPolicy &&policy, WriteBuffer &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (std::filesystem::path const &file, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (std::ostream &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
template<class Predicate = pred::Leaf, std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
MapHeader writeData (WriteBuffer &out, Predicate const &pred=pred::Leaf{}, MapType map_types=MapType::ALL) const
 
- Public Member Functions inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
auto ancestor (NodeType node, depth_type depth) const
 
auto ancestorChecked (NodeType node, depth_type depth) const
 
const_iterator begin (bool only_leaves=true, bool only_exists=true) const
 
const_iterator begin (NodeType node, bool only_leaves=true, bool only_exists=true) const
 
const_nearest_iterator_geom< Geometry > beginNearest (Geometry const &geometry, double epsilon=0.0, bool only_leaves=true, bool only_exists=true) const
 
const_nearest_iterator_geom< Geometry > beginNearest (NodeType node, Geometry const &geometry, double epsilon=0.0, bool only_leaves=true, bool only_exists=true) const
 
const_query_iterator_pred< Predicate > beginQuery (NodeType node, Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
const_query_iterator_pred< Predicate > beginQuery (Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
const_query_nearest_iterator_pred_geom< Predicate, Geometry > beginQueryNearest (NodeType node, Predicate const &pred, Geometry const &geometry, double epsilon=0.0, bool only_exists=true, bool early_stopping=false) const
 
const_query_nearest_iterator_pred_geom< Predicate, Geometry > beginQueryNearest (Predicate const &pred, Geometry const &geometry, double epsilon=0.0, bool only_exists=true, bool early_stopping=false) const
 
constexpr pos_type block () const noexcept
 Returns the block position of the root node.
 
pos_type block (NodeType node) const
 Returns the block position of node.
 
Bounds bounds () const
 Returns the bounds of the tree (/ root node).
 
Bounds bounds (NodeType node) const
 Returns the bounds of node.
 
Coord center () const
 Returns the center of the tree (/ root node).
 
constexpr Coord center (NodeType node) const
 Returns the center of node.
 
coord_type centerAxis (NodeType node, std::size_t axis) const
 Returns the center of node for the axis specified.
 
coord_type centerAxis (std::size_t axis) const
 Returns the center of the tree (/ root node) for the axis specified.
 
std::optional< coord_type > centerAxisChecked (NodeType node, std::size_t axis) const
 Returns the center of node for the axis specified, if the node is valid (i.e., valid(node)).
 
std::optional< CoordcenterChecked (NodeType node) const
 Returns the center of node if the node is valid (i.e., valid(node)).
 
constexpr auto child (NodeType node, offset_type offset) const
 Returns the i:th child of node.
 
auto childChecked (NodeType node, offset_type offset) const
 Get a child of a node with bounds checking.
 
pos_type children (Index node) const
 
std::array< pos_type, BF > const & children (pos_type block) const
 
void clear ()
 Erases all nodes from the tree.
 
void clear (Length const &leaf_node_length, depth_type num_depth_levels)
 
void clear (length_type const &leaf_node_length, depth_type num_depth_levels)
 
Code code () const
 
Code code (NodeType node) const
 
std::optional< CodecodeChecked (NodeType node) const
 
std::vector< Indexcreate (ExecutionPolicy &&policy, RandomIt first, RandomIt last)
 
RandomIt2 create (ExecutionPolicy &&policy, RandomIt1 first, RandomIt1 last, RandomIt2 d_first)
 
std::vector< Indexcreate (ExecutionPolicy &&policy, Range const &r)
 
RandomIt create (ExecutionPolicy &&policy, Range const &r, RandomIt d_first)
 
std::vector< Indexcreate (InputIt first, InputIt last)
 
OutputIt create (InputIt first, InputIt last, OutputIt d_first)
 
Index create (NodeType node)
 
std::vector< Indexcreate (Range const &r)
 
OutputIt create (Range const &r, OutputIt d_first)
 
depth_type depth () const
 Returns the depth of the root node, i.e. numDepthLevels() - 1.
 
constexpr depth_type depth (NodeType node) const
 Returns the depth of the node.
 
depth_type depth (pos_type block) const
 Returns the depth of the block.
 
const_iterator end () const
 
const_nearest_iterator endNearest () const
 
const_query_iterator endQuery () const
 
const_query_nearest_iterator endQueryNearest () const
 
void eraseChildren ()
 
void eraseChildren (NodeType node)
 
bool exists (NodeType node) const
 Checks if a node exists.
 
bool exists (pos_type block) const
 
Length halfLength () const
 Returns the half length of the tree (/ root node), i.e. length() / 2.
 
Length halfLength (depth_type depth) const
 Returns the half length of nodes at depth, i.e. length(depth) / 2.
 
constexpr Length halfLength (NodeType node) const
 Returns the half length of node, i.e. length(node) / 2.
 
Length halfLengthReciprocal () const
 Returns the reciprocal of the half length of the tree (/ root node), i.e. 1 / (length() / 2) = 2 / length().
 
Length halfLengthReciprocal (depth_type depth) const
 Returns the reciprocal of the half length of nodes at depth, i.e. 1 / (length(depth) / 2) = 2 / length(depth).
 
Length halfLengthReciprocal (NodeType node) const
 Returns the reciprocal of the half length of node, i.e. 1 / (length(node) / 2) = 2 / length(node).
 
constexpr Index index () const noexcept
 Returns the index of the root node.
 
constexpr Index index (NodeType node) const
 
bool isInside (Point coord) const
 Checks if a coordinate is inside the tree bounds, i.e. inside bounds().
 
bool isLeaf (NodeType node) const
 Checks if the node is a leaf (i.e., has no children).
 
bool isParent (NodeType node) const
 Checks if the node is a parent (i.e., has children).
 
bool isPureLeaf (NodeType node) const
 Checks if the node is a pure leaf (i.e., can never have children).
 
bool isPureLeaf (pos_type block) const
 Checks if the block is pure leaf (i.e., can never have children).
 
constexpr bool isRoot (NodeType node) const
 Checks if the node is the root of the tree.
 
constexpr bool isRoot (pos_type block) const
 
Key key () const
 
Key key (NodeType node) const
 
std::optional< KeykeyChecked (NodeType node) const
 
Length length () const
 Returns the length of the tree (/ root node), i.e. leaf_node_length * 2^depth().
 
Length length (depth_type depth) const
 Returns the length of nodes at depth, i.e. leaf_node_length * 2^depth.
 
Length length (NodeType node) const
 Returns the length of node, i.e. leaf_node_length * 2^depth(node).
 
Length lengthReciprocal () const
 Returns the reciprocal of the length of the tree (/ root node), i.e. 1 / length().
 
Length lengthReciprocal (depth_type depth) const
 Returns the reciprocal of the length of nodes at depth, i.e. 1 / length(depth).
 
Length lengthReciprocal (NodeType node) const
 Returns the reciprocal of the length of node, i.e. 1 / length(node).
 
Point max () const
 Returns the maximum point of the tree (/ root node).
 
Point max (NodeType node) const
 Returns the maximum point of node.
 
Point min () const
 Returns the minimum point of the tree (/ root node).
 
Point min (NodeType node) const
 Returns the minimum point of node.
 
bool modified () const
 Check if the root of the tree is modified.
 
bool modified (NodeType node) const
 Check if a node of the tree is in a modified state.
 
void modifiedReset ()
 
void modifiedReset (NodeType node)
 
void modifiedSet ()
 
void modifiedSet (bool value)
 
void modifiedSet (NodeType node)
 
void modifiedSet (NodeType node, bool value)
 
ConstNearest< Geometry > nearest (Geometry const &geometry, double epsilon=0.0, bool only_leaves=true, bool only_exists=true) const
 
ConstNearest< Geometry > nearest (NodeType node, Geometry const &geometry, double epsilon=0.0, bool only_leaves=true, bool only_exists=true) const
 
Node node () const
 Returns the root node.
 
Node node (NodeType node) const
 Returns the node corresponding to node.
 
constexpr depth_type numDepthLevels () const noexcept
 Returns the number of depth levels of the tree, i.e. depth() + 1.
 
constexpr offset_type offset () const noexcept
 Returns the offset of the root node.
 
offset_type offset (NodeType node) const
 Returns the offset of node.
 
ConstQuery< Predicate > operator() (NodeType node, Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
ConstQuery< Predicate > operator() (Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
Node operator[] (NodeType node) const
 Get the node corresponding to a code.
 
auto parent (NodeType node) const
 
Index parent (pos_type block) const
 
auto parentChecked (NodeType node) const
 
ConstQuery< Predicate > query (NodeType node, Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
ConstQuery< Predicate > query (Predicate const &pred, bool only_exists=true, bool early_stopping=false) const
 
ConstQueryNearest< Predicate, Geometry > queryNearest (NodeType node, Predicate const &pred, Geometry const &geometry, double epsilon=0.0, bool only_exists=true, bool early_stopping=false) const
 
ConstQueryNearest< Predicate, Geometry > queryNearest (Predicate const &pred, Geometry const &geometry, double epsilon=0.0, bool only_exists=true, bool early_stopping=false) const
 
void reserve (std::size_t num_nodes)
 Increase the capacity of the tree to at least hold num_nodes nodes.
 
auto sibling (NodeType node, offset_type offset) const
 
auto siblingChecked (NodeType node, offset_type offset) const
 
std::size_t size () const
 Returns the number of nodes in the tree.
 
std::vector< TraceResulttrace (ExecutionPolicy &&policy, NodeType node, RandomIt first, RandomIt last, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
RandomIt2 trace (ExecutionPolicy &&policy, NodeType node, RandomIt1 first, RandomIt1 last, RandomIt2 d_first, Predicate pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
std::vector< TraceResulttrace (ExecutionPolicy &&policy, RandomIt first, RandomIt last, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
RandomIt2 trace (ExecutionPolicy &&policy, RandomIt1 first, RandomIt1 last, RandomIt2 d_first, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
OutputIt trace (InputIt first, InputIt last, OutputIt d_first, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
std::vector< TraceResulttrace (InputIt first, InputIt last, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
OutputIt trace (NodeType node, InputIt first, InputIt last, OutputIt d_first, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
std::vector< TraceResulttrace (NodeType node, InputIt first, InputIt last, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
TraceResult trace (NodeType node, Ray const &ray, Predicate pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
TraceResult trace (Ray const &ray, Predicate const &pred, float min_dist=0.0f, float max_dist=std::numeric_limits< float >::max(), bool only_exists=true) const
 
void traverse (NodeType node, UnaryFun f) const
 Depth first traversal of the tree, starting at node. The function 'f' will be called for each traversed node. If 'f' returns true then the children of the node will also be traverse, otherwise they will not.
 
void traverse (NodeType node, UnaryFun f, Predicate pred, bool only_exists=true) const
 Depth first traversal of the tree, starting at node. The function 'f' will be called for each traversed node that fulfills the predicates pred.
 
void traverse (UnaryFun f) const
 Depth first traversal of the tree, starting at the root node. The function 'f' will be called for each node traverse. If 'f' returns true then the children of the node will also be traverse, otherwise they will not.
 
void traverse (UnaryFun f, Predicate const &pred, bool only_exists=true) const
 Depth first traversal of the tree, starting at the root node. The function 'f' will be called for each node traverse. If 'f' returns true then the children of the node will also be traverse, otherwise they will not.
 
bool valid (NodeType node) const
 Checks if an index is valid.
 
bool valid (pos_type block) const
 Checks if a block is valid.
 
- Public Member Functions inherited from ufo::TreeData< Derived, Dim, Ts >
bool exists (pos_type block) const
 Checks if a block exists.
 
WGPUDevice gpuDevice () const
 
bool gpuInit (WGPUAdapter adapter)
 
bool gpuInit (WGPUAdapter adapter, WGPULimits const &required_limits)
 
bool gpuInit (WGPUDevice device)
 
bool gpuInit (WGPULimits const &required_limits, WGPUSurface compatible_surface=nullptr, WGPUPowerPreference power_preference=WGPUPowerPreference_HighPerformance, WGPUBackendType backend_type=WGPUBackendType_Undefined)
 
bool gpuInit (WGPUPowerPreference power_preference=WGPUPowerPreference_HighPerformance, WGPUBackendType backend_type=WGPUBackendType_Undefined)
 
template<class T >
WGPUBuffer gpuInnerBuffer (std::size_t index) const
 
template<class T >
std::size_t gpuInnerBufferSize (std::size_t index) const
 
template<class T >
WGPUBuffer gpuLeafBuffer (std::size_t index) const
 
template<class T >
std::size_t gpuLeafBufferSize (std::size_t index) const
 
template<class T >
std::size_t gpuNumBuffers () const
 
template<class T >
std::size_t gpuNumInnerBuffers () const
 
template<class T >
std::size_t gpuNumLeafBuffers () const
 
WGPUQueue gpuQueue () const
 
void gpuRead ()
 
template<class T >
void gpuRead ()
 
void gpuReadInner ()
 
template<class T >
void gpuReadInner ()
 
void gpuReadLeaf ()
 
template<class T >
void gpuReadLeaf ()
 
void gpuRelease ()
 
bool gpuWrite ()
 
template<class T >
bool gpuWrite ()
 
bool gpuWriteInner ()
 
template<class T >
bool gpuWriteInner ()
 
bool gpuWriteLeaf ()
 
template<class T >
bool gpuWriteLeaf ()
 
InnerDatainnerData ()
 
InnerData const & innerData () const
 
bool innerExists (pos_type block) const
 
LeafDataleafData ()
 
LeafData const & leafData () const
 
bool leafExists (pos_type block) const
 
- Static Public Member Functions inherited from ufo::Map< Dim, Maps >
static constexpr bool hasMapTypes (MapType map_types) noexcept
 
static bool isMap (ReadBuffer &in)
 
static bool isMap (std::filesystem::path const &file)
 
static bool isMap (std::istream &in)
 
static constexpr MapType mapTypes () noexcept
 
static constexpr std::size_t numMapTypes () noexcept
 
- Static Public Member Functions inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
static constexpr offset_type branchingFactor () noexcept
 Returns the branching factor of the tree (i.e., 2 = binary tree, 4 = quadtree, 8 = octree, 16 = hextree).
 
static constexpr std::size_t dimensions () noexcept
 Returns the number of dimensions of the tree (i.e., 1 = binary tree, 2 = quadtree, 3 = octree, 4 = hextree).
 
static constexpr depth_type maxNumDepthLevels () noexcept
 Returns the maximum number of depth levels a tree can have.
 
static constexpr depth_type minNumDepthLevels () noexcept
 Returns the minimum number of depth levels a tree must have.
 
- Static Public Attributes inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
static constexpr bool const is_node_type_v
 
- Static Public Attributes inherited from ufo::TreeData< Derived, Dim, Ts >
static constexpr TreeIndex::offset_type const BF = ipow(std::size_t(2), Dim)
 
static constexpr std::size_t const NumBuffers = sizeof...(Ts)
 
- Protected Types inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
using Data = TreeData< Map< Dim, Maps... >, Dim, TreeBlock, Blocks... >
 
using InnerBlock = typename TreeBlock::InnerBlock< Dim, BF >
 
using LeafBlock = typename TreeBlock::LeafBlock< Dim, BF >
 
using modified_type = typename LeafBlock::modified_type
 
- Protected Member Functions inherited from ufo::Map< Dim, Maps >
template<class Map >
WGPUBuffer gpuInnerBuffer (MapType map_type, std::size_t index) const
 
template<std::size_t... Is>
WGPUBuffer gpuInnerBuffer (MapType map_type, std::size_t index, std::index_sequence< Is... >) const
 
template<class Map >
std::size_t gpuInnerBufferSize (MapType map_type, std::size_t index) const
 
template<std::size_t... Is>
std::size_t gpuInnerBufferSize (MapType map_type, std::size_t index, std::index_sequence< Is... >) const
 
template<class Map >
WGPUBuffer gpuLeafBuffer (MapType map_type, std::size_t index) const
 
template<std::size_t... Is>
WGPUBuffer gpuLeafBuffer (MapType map_type, std::size_t index, std::index_sequence< Is... >) const
 
template<class Map >
std::size_t gpuLeafBufferSize (MapType map_type, std::size_t index) const
 
template<std::size_t... Is>
std::size_t gpuLeafBufferSize (MapType map_type, std::size_t index, std::index_sequence< Is... >) const
 
template<class Map >
std::size_t gpuNumBuffers (MapType map_type) const
 
template<std::size_t... Is>
std::size_t gpuNumBuffers (MapType map_type, std::index_sequence< Is... >) const
 
template<class Map >
std::size_t gpuNumInnerBuffers (MapType map_type) const
 
template<std::size_t... Is>
std::size_t gpuNumInnerBuffers (MapType map_type, std::index_sequence< Is... >) const
 
template<class Map >
std::size_t gpuNumLeafBuffers (MapType map_type) const
 
template<std::size_t... Is>
std::size_t gpuNumLeafBuffers (MapType map_type, std::index_sequence< Is... >) const
 
template<class Map >
void gpuRead (MapType map_types)
 
template<std::size_t... Is>
void gpuRead (MapType map_types, std::index_sequence< Is... >)
 
template<class Map >
void gpuReadInner (MapType map_types)
 
template<std::size_t... Is>
void gpuReadInner (MapType map_types, std::index_sequence< Is... >)
 
template<class Map >
void gpuReadLeaf (MapType map_types)
 
template<std::size_t... Is>
void gpuReadLeaf (MapType map_types, std::index_sequence< Is... >)
 
template<class Map >
void gpuRelease ()
 
template<std::size_t... Is>
void gpuRelease (std::index_sequence< Is... >)
 
template<class Map >
bool gpuWrite (MapType map_types)
 
template<std::size_t... Is>
bool gpuWrite (MapType map_types, std::index_sequence< Is... >)
 
template<class Map >
bool gpuWriteInner (MapType map_types)
 
template<std::size_t... Is>
bool gpuWriteInner (MapType map_types, std::index_sequence< Is... >)
 
template<class Map >
bool gpuWriteLeaf (MapType map_types)
 
template<std::size_t... Is>
bool gpuWriteLeaf (MapType map_types, std::index_sequence< Is... >)
 
void onDotFile (std::ostream &out, Index node, MapType map_types) const
 
template<std::size_t... Is>
void onDotFile (std::ostream &out, Index node, MapType map_types) const
 
template<class Map >
void onDotFile (std::ostream &out, Index node, MapType map_types) const
 
void onInitInnerChildren (Index node, pos_type children)
 
template<class Map >
void onInitInnerChildren (Index node, pos_type children)
 
template<std::size_t... Is>
void onInitInnerChildren (Index node, pos_type children, std::index_sequence< Is... >)
 
void onInitLeafChildren (Index node, pos_type children)
 
template<class Map >
void onInitLeafChildren (Index node, pos_type children)
 
template<std::size_t... Is>
void onInitLeafChildren (Index node, pos_type children, std::index_sequence< Is... >)
 
void onInitRoot ()
 
template<class Map >
void onInitRoot (pos_type block)
 
template<std::size_t... Is>
void onInitRoot (pos_type block, std::index_sequence< Is... >)
 
bool onIsPrunable (pos_type block) const
 
template<class Map >
bool onIsPrunable (pos_type block) const
 
template<std::size_t... Is>
bool onIsPrunable (pos_type block, std::index_sequence< Is... >) const
 
void onPropagateChildren (Index node, pos_type children, MapType map_types)
 
template<class Map >
void onPropagateChildren (Index node, pos_type children, MapType map_types)
 
template<std::size_t... Is>
void onPropagateChildren (Index node, pos_type children, MapType map_types, std::index_sequence< Is... >)
 
void onPruneInnerChildren (Index node, pos_type children)
 
template<class Map >
void onPruneInnerChildren (Index node, pos_type children)
 
template<std::size_t... Is>
void onPruneInnerChildren (Index node, pos_type children, std::index_sequence< Is... >)
 
void onPruneLeafChildren (Index node, pos_type children)
 
template<class Map >
void onPruneLeafChildren (Index node, pos_type children)
 
template<std::size_t... Is>
void onPruneLeafChildren (Index node, pos_type children, std::index_sequence< Is... >)
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void onRead (ExecutionPolicy &&policy, ReadBuffer &in, SerializedBlocks< BF > const &blocks, MapType map_type, std::uint64_t data_size)
 
template<class Map , class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
bool onRead (ExecutionPolicy &&policy, ReadBuffer &in, SerializedBlocks< BF > const &blocks, MapType map_type, std::uint64_t data_size)
 
template<class ExecutionPolicy , std::size_t... Is, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void onRead (ExecutionPolicy &&policy, ReadBuffer &in, SerializedBlocks< BF > const &blocks, MapType map_type, std::uint64_t data_size, std::index_sequence< Is... >)
 
std::size_t onSerializedSize (SerializedBlocks< BF > const &blocks, std::size_t num_nodes, MapType map_types) const
 
template<class Map >
std::size_t onSerializedSize (SerializedBlocks< BF > const &blocks, std::size_t num_nodes, MapType map_types) const
 
template<std::size_t... Is>
std::size_t onSerializedSize (SerializedBlocks< BF > const &blocks, std::size_t num_nodes, MapType map_types, std::index_sequence< Is... >) const
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void onWrite (ExecutionPolicy &&policy, WriteBuffer &out, SerializedBlocks< BF > const &blocks, MapType map_type) const
 
template<class Map , class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void onWrite (ExecutionPolicy &&policy, WriteBuffer &out, SerializedBlocks< BF > const &blocks, MapType map_type) const
 
template<class ExecutionPolicy , std::size_t... Is, std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void onWrite (ExecutionPolicy &&policy, WriteBuffer &out, SerializedBlocks< BF > const &blocks, MapType map_type, std::index_sequence< Is... >) const
 
template<class ExecutionPolicy , std::enable_if_t< execution::is_execution_policy_v< ExecutionPolicy >, bool > = true>
void propagate (ExecutionPolicy &&policy, pos_type block, MapType map_types, bool is_parallel)
 
void propagate (pos_type block, MapType map_types)
 
template<class Input >
SerializedBlocks< BF > readBlocks (Input &in, MapHeader const &header)
 
std::vector< BitSet< BF > >::const_iterator readBlocksRecurs (pos_type block, typename std::vector< BitSet< BF > >::const_iterator tree, SerializedBlocks< BF > &blocks)
 
template<class ExecutionPolicy , class Input >
void readDataImpl (ExecutionPolicy &&policy, Input &in, MapHeader const &header, MapType map_types, bool propagate)
 
template<class ExecutionPolicy >
void readMaps (ExecutionPolicy &&policy, ReadBuffer &in, SerializedBlocks< BF > const &blocks, MapHeader const &header, MapType map_types)
 
template<class ExecutionPolicy >
void readMaps (ExecutionPolicy &&policy, std::istream &in, SerializedBlocks< BF > const &blocks, MapHeader const &header, MapType map_types)
 
template<class Predicate , std::enable_if_t< pred::is_pred_v< Predicate >, bool > = true>
void saveDotFileRecurs (std::ostream &out, Node node, std::string const &id, Predicate const &pred, MapType map_types, std::string const &parent_shape) const
 
template<class Predicate >
std::pair< std::vector< BitSet< BF > >, SerializedBlocks< BF > > writeBlocks (Predicate pred) const
 
bool writeBlocksModifiedRecurs (pos_type block, std::vector< BitSet< BF > > &tree, SerializedBlocks< BF > &blocks) const
 
template<class Predicate >
bool writeBlocksRecurs (Node parent, Predicate const &pred, std::vector< BitSet< BF > > &tree, SerializedBlocks< BF > &blocks) const
 
template<class ExecutionPolicy , class Output , class Predicate >
MapHeader writeImpl (ExecutionPolicy &&policy, Output &out, Predicate const &pred, MapType map_types, bool write_header) const
 
template<class ExecutionPolicy >
void writeMaps (ExecutionPolicy &&policy, std::ostream &out, SerializedBlocks< BF > const &blocks, MapHeader const &header) const
 
template<class ExecutionPolicy >
void writeMaps (ExecutionPolicy &&policy, WriteBuffer &out, SerializedBlocks< BF > const &blocks, MapHeader const &header) const
 
- Protected Member Functions inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
 Tree (Length leaf_node_length, depth_type num_depth_levels)
 
 Tree (length_type leaf_node_length, depth_type num_depth_levels)
 
 Tree (Tree &&)=default
 
 Tree (Tree const &)=default
 
bool allLeaf (InnerBlock const &block) const
 
bool allLeaf (LeafBlock const &block) const
 
bool allLeaf (pos_type block) const
 Checks if all nodes of a block are leaves.
 
bool allParent (pos_type block) const
 Checks if all nodes of a block are parents.
 
bool anyLeaf (InnerBlock const &block) const
 
bool anyLeaf (LeafBlock const &block) const
 
bool anyLeaf (pos_type block) const
 Checks if any node of a block is a leaf.
 
bool anyParent (pos_type block) const
 Checks if any node of a block is a parent.
 
Index createChild (Index node, offset_type child_offset)
 
pos_type createChildren (Index node)
 
pos_type createChildrenThreadSafe (Index node)
 
Index createChildThreadSafe (Index node, offset_type child_offset)
 
void createRoot ()
 
Index createThreadSafe (NodeType node)
 
constexpr Map< Dim, Maps... > & derived ()
 Returns a reference of the derived class.
 
constexpr Map< Dim, Maps... > const & derived () const
 Returns a reference of the derived class.
 
void init (Length leaf_node_length, depth_type num_depth_levels)
 
void initInnerChildren (Index node, InnerBlock const &block, pos_type children)
 
void initLeafChildren (Index node, InnerBlock const &block, pos_type children)
 
std::conditional_t< OnlyDistance, float, std::pair< float, Index > > nearest (Index node, NearestSearchAlgorithm search_alg, ValueFun value_f, InnerFun inner_f, float max_dist, float epsilon) const
 
std::pair< float, Indexnearest (Index node, Predicate pred, NearestSearchAlgorithm search_alg, ValueFun value_f, InnerFun inner_f, float max_dist, float epsilon) const
 
std::conditional_t< OnlyDistance, float, std::pair< float, Index > > nearestDepthFirst (pos_type block, depth_type depth, float c_dist, float epsilon, ValueFun value_f, InnerFun inner_f) const
 
std::pair< float, IndexnearestDepthFirst (pos_type block, depth_type depth, float c_dist, ValueFun value_f, InnerFun inner_f) const
 
bool noneLeaf (pos_type block) const
 Checks if no nodes of a block are leaves.
 
bool noneParent (pos_type block) const
 Checks if no nodes of a block are parents.
 
Treeoperator= (Tree &&)=default
 
Treeoperator= (Tree const &)=default
 
void pruneChildren (Index node)
 
void pruneChildren (Index node, pos_type children)
 
void recursDown (Index node, UpdateFun update_f)
 
void recursDown (pos_type block, UpdateFun update_f)
 
void recursLeaves (NodeType node, NodeFun node_f, BlockFun block_f, UpdateFun update_f, bool propagate)
 
void recursLeaves (pos_type block, NodeFun node_f, BlockFun block_f, UpdateFun update_f)
 
void recursParentFirst (NodeType node, NodeFun node_f, BlockFun block_f, UpdateFun update_f, bool propagate)
 
void recursParentFirst (pos_type block, BlockFun block_f)
 
void recursUp (Index node, UpdateFun update_f)
 
constexpr TraceResult trace (Node node, TraceParams const &params, Predicate const &pred, float const near_clip, float const far_clip, bool only_exists) const
 
TraceParams traceInit (NodeType node, Ray const &ray) const
 
InnerBlock & treeInnerBlock (pos_type block)
 
InnerBlock const & treeInnerBlock (pos_type block) const
 
InnerBlock const & treeInnerBlockConst (pos_type block) const
 
LeafBlock & treeLeafBlock (pos_type block)
 
LeafBlock const & treeLeafBlock (pos_type block) const
 
LeafBlock const & treeLeafBlockConst (pos_type block) const
 
- Protected Member Functions inherited from ufo::TreeData< Derived, Dim, Ts >
void clear ()
 
pos_type create (bool leaf)
 
pos_type createThreadSafe (bool leaf)
 
void erase (pos_type block)
 
template<class T >
T & innerBlock (pos_type block)
 
template<class T >
T const & innerBlock (pos_type block) const
 
void innerClear ()
 
pos_type innerCreate ()
 
pos_type innerCreateThreadSafe ()
 
void innerErase (pos_type block)
 
void innerReserve (std::size_t cap)
 
std::size_t innerSize () const
 
template<class T >
T & leafBlock (pos_type block)
 
template<class T >
T const & leafBlock (pos_type block) const
 
void leafClear ()
 
pos_type leafCreate ()
 
pos_type leafCreateThreadSafe ()
 
void leafErase (pos_type block)
 
void leafReserve (std::size_t cap)
 
std::size_t leafSize () const
 
void reserve (std::size_t cap)
 
std::size_t size () const
 
- Static Protected Member Functions inherited from ufo::Map< Dim, Maps >
template<class Map >
static constexpr bool isMapType (MapType map_type) noexcept
 
template<class Map >
static constexpr MapType mapType () noexcept
 
template<std::size_t... Is>
static constexpr MapType mapTypes (std::index_sequence< Is... >) noexcept
 
- Static Protected Member Functions inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
static constexpr Point childCenter (Point center, Length half_length, offset_type child)
 Returns the center of the child_indexth child.
 
static constexpr unsigned firstNode (Point const &tm, float const t) noexcept
 
static constexpr unsigned newNode (unsigned cur, unsigned dim) noexcept
 
static constexpr Point parentCenter (Point center, Length half_length, offset_type index)
 Returns the center of the parent of the node.
 
static constexpr TraceParams traceInit (Ray const &ray, Point const &center, Length half_length) noexcept
 
- Static Protected Member Functions inherited from ufo::TreeData< Derived, Dim, Ts >
static constexpr pos_type addInnerType (pos_type block) noexcept
 
static constexpr pos_type addLeafType (pos_type block) noexcept
 
static constexpr bool inner (pos_type block) noexcept
 
static constexpr bool leaf (pos_type block) noexcept
 
static constexpr pos_type removeInnerType (pos_type block) noexcept
 
static constexpr pos_type removeLeafType (pos_type block) noexcept
 
- Protected Attributes inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
friend Derived
 
- Protected Attributes inherited from ufo::TreeData< Derived, Dim, Ts >
WGPUAdapter adapter_ = nullptr
 
WGPUDevice device_ = nullptr
 
std::array< std::vector< WGPUBuffer >, NumBuffers > inner_buffers_ {}
 
InnerData inner_data_
 
WGPUInstance instance_ = nullptr
 
std::array< std::vector< WGPUBuffer >, NumBuffers > leaf_buffers_ {}
 
LeafData leaf_data_
 
std::size_t max_buffer_size_ = 1'073'741'824 / 2
 
WGPUQueue queue_ = nullptr
 
- Static Protected Attributes inherited from ufo::Tree< Map< Dim, Maps... >, Dim, Maps::Block... >
static constexpr TreeIndex::offset_type const BF
 
static constexpr modified_type const MODIFIED_ALL_SET
 
static constexpr modified_type const MODIFIED_NONE_SET
 

Detailed Description

template<class Map>
class ufo::detail::MapHelper< Map >

Definition at line 77 of file map.hpp.


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