|
MobilityDB 1.3
|
In-memory RTree index for MEOS bounding boxes, i.e., for Span, TBox, and STBox. More...
#include <stdlib.h>#include <math.h>#include <meos.h>#include <meos_geo.h>#include <meos_internal.h>#include <meos_internal_geo.h>#include "temporal/temporal.h"#include "temporal/temporal_rtree.h"Functions | |
| static bool | bbox_contains_span (const void *box1, const void *box2) |
Return true if the first span contains the second one, false otherwise. More... | |
| static bool | bbox_contains_stbox (const void *box1, const void *box2) |
Return true if the first spatiotemporal box contains the second one, false otherwise. More... | |
| static bool | bbox_contains_tbox (const void *box1, const void *box2) |
Return true if the first temporal box contains the second one, false otherwise. More... | |
| static void | bbox_expand_span (const void *box1, void *box2) |
| Expand the second span with the first one. More... | |
| static void | bbox_expand_stbox (const void *box1, void *box2) |
| Expand the second spatiotemporal box with the first one. More... | |
| static void | bbox_expand_tbox (const void *box1, void *box2) |
| Expand the second temporal box with the first one. More... | |
| static bool | bbox_overlaps_span (const void *box1, const void *box2) |
Return true if the two spans overlap, false otherwise. More... | |
| static bool | bbox_overlaps_stbox (const void *box1, const void *box2) |
Return true if the two spatiotemporal boxes overlap, false otherwise. More... | |
| static bool | bbox_overlaps_tbox (const void *box1, const void *box2) |
Return true if the two temporal boxes overlap, false otherwise. More... | |
| static double | box_area (const RTree *rtree, const void *box) |
| Return the length, area, or volume of a bounding box. More... | |
| static int | box_largest_axis (const RTree *rtree, const void *box) |
| Return the axis with the largest length in a bounding box. More... | |
| static bool | ensure_rtree_temporal_compatible (const RTree *rtree, const Temporal *temp) |
| Return true if the RTree's bounding box type is compatible with the temporal type, report an error otherwise. More... | |
| static double | get_axis_length (const RTree *rtree, const void *box, int axis) |
| Return the length of a bounding box along a given axis as a double. More... | |
| static double | get_axis_span (const void *box, int axis UNUSED, bool upper) |
| Return the lower or upper bound from a span as a double. More... | |
| static double | get_axis_stbox (const void *box, int axis, bool upper) |
| Return the lower or upper bound of a given axis from a spatiotemporal box as a double. More... | |
| static double | get_axis_tbox (const void *box, int axis, bool upper) |
| Return the lower or upper bound of a given axis from a temporal box as a double. More... | |
| static bool | inner_consistent (const RTree *rtree, const void *key, const void *query, RTreeSearchOp op) |
| Return true if an inner node is consistent with the search query. More... | |
| static bool | leaf_consistent (const RTree *rtree, const void *key, const void *query, RTreeSearchOp op) |
| Return true if a leaf entry is consistent with the search query. More... | |
| static void | node_box_calculate (const RTree *rtree, const RTreeNode *node, void *box) |
| Return the bounding box that encloses all bounding boxes in an RTree node. More... | |
| static int | node_choose (const RTree *rtree, const void *box, const RTreeNode *node) |
| Returns the best child node for inserting a new bounding box in an RTree. More... | |
| static int | node_choose_least_enlargement (const RTree *rtree, const RTreeNode *node, const void *box) |
| Return the child node that requires the least enlargement to accommodate a new bounding box. More... | |
| static void | node_free (RTreeNode *node) |
| Frees the memory allocated for an RTree node. More... | |
| static void | node_insert (RTree *rtree, void *node_bounding_box, RTreeNode *node, void *new_box, int id, bool *split) |
| Inserts a new bounding box into an RTree node and handles node splitting if necessary. More... | |
| static RTreeNode * | node_make (RTreeNodeType node_type, size_t bboxsize) |
| Creates a new RTree node. More... | |
| static void | node_move_box_at_index_into (RTreeNode *from, int index, RTreeNode *into) |
| Moves a bounding box from one RTree node to another. More... | |
| static void | node_qsort (const RTree *rtree, RTreeNode *node, int index, bool upper, int s, int e) |
| Sort the bounding boxes within an RTree node using the QuickSort algorithm. More... | |
| static void | node_search (const RTree *rtree, const RTreeNode *node, RTreeSearchOp op, const void *query, MeosArray *result) |
| Searches recursively a node looking for hits with a query. More... | |
| static void | node_sort_axis (const RTree *rtree, RTreeNode *node, int index, bool upper) |
| Sort the bounding boxes in an RTree node along a given axis using QuickSort. More... | |
| static void | node_split (RTree *rtree, RTreeNode *node, void *box, RTreeNode **right_out) |
| Splits an RTree node and redistributes its bounding boxes between two nodes. More... | |
| static void | node_swap (const RTree *rtree, RTreeNode *node, int i, int j) |
| Swaps two bounding boxes and their associated data within an RTree node. More... | |
| RTree * | rtree_create (MeosType bboxtype) |
| Creates an RTree index. More... | |
| RTree * | rtree_create_bigintspan () |
| Creates an RTree index for big integer spans. More... | |
| RTree * | rtree_create_datespan () |
| Creates an RTree index for temporal boxes. More... | |
| RTree * | rtree_create_floatspan () |
| Creates an RTree index for float spans. More... | |
| RTree * | rtree_create_intspan () |
| Creates an RTree index for integer spans. More... | |
| RTree * | rtree_create_stbox () |
| Creates an RTree index for spatiotemporal boxes. More... | |
| RTree * | rtree_create_tbox () |
| Creates an RTree index for temporal boxes. More... | |
| RTree * | rtree_create_tstzspan () |
| Creates an RTree index for temporal boxes. More... | |
| void | rtree_free (RTree *rtree) |
| Frees an RTree. More... | |
| void | rtree_insert (RTree *rtree, void *box, int id) |
| Insert a bounding box into the RTree index. More... | |
| void | rtree_insert_temporal (RTree *rtree, const Temporal *temp, int id) |
| Insert a temporal value into the RTree index. More... | |
| int | rtree_search (const RTree *rtree, RTreeSearchOp op, const void *query, MeosArray *result) |
| Search an RTree with a bounding box, collecting matching IDs into a MeosArray. More... | |
| int | rtree_search_temporal (const RTree *rtree, RTreeSearchOp op, const Temporal *temp, MeosArray *result) |
| Search an RTree using a temporal value's bounding box, collecting matching IDs into a MeosArray. More... | |
| static double | unioned_area (const RTree *rtree, const void *box1, const void *box2) |
| Return the length, area, or volume of the union of two bounding boxes. More... | |