Quadtreex (quadtreex v0.2.0) View Source

A dynamic quadtree implemented in pure Elixir

Link to this section Summary

Link to this section Types

Specs

reducer() ::
  (entity :: Quadtreex.Entity.t(), current_acc :: term() ->
     updated_acc :: term())

Specs

t() :: %Quadtreex{root: Quadtreex.Node.t()}

Specs

tree_query() :: Quadtreex.WithinRangeQuery.t()

Link to this section Functions

Specs

height(t()) :: non_neg_integer()
Link to this function

insert(tree, location, thing)

View Source

Specs

insert(t(), Quadtreex.BoundingBox.coordinate(), term()) ::
  {:ok, t()} | {:error, :out_of_bounds}
Link to this function

new(l, r, min_size, split_size)

View Source

Specs

Specs

query(t(), tree_query(), reducer()) :: term()
Link to this function

range_query(quadtreex, point, max_distance)

View Source

Specs

range_query(t(), Quadtreex.BoundingBox.coordinate(), float()) :: [] | [term()]
Link to this function

reduce(tree, acc \\ [], fun)

View Source

Specs

reduce(t(), term(), reducer()) :: term()