project: introduce GcalRangeTree

In order to correctly implement the week grid, we must
have a fast and optimized data structure to handle date
intervals.

This commit introduces, then, GcalRangeTree. The range tree
is an augmented AVL tree designed to handle intervals (i.e.
ranges) rather than single-dimensional keys.

It is a very good struct since common operations like insert
and removal are O(log n). It also is optimized for the ranges
we work on, so the nodes only take up the absolutely minimum
space required.
This commit is contained in:
Georges Basile Stavracas Neto
2016-12-07 21:27:25 -02:00
parent c93d634454
commit 29ad51b19a
3 changed files with 678 additions and 0 deletions
+2
View File
@@ -67,6 +67,8 @@ gnome_calendar_SOURCES = \
gcal-utils.h \
gcal-view.c \
gcal-view.h \
views/gcal-range-tree.c \
views/gcal-range-tree.h \
views/gcal-week-grid.c \
views/gcal-week-grid.h \
views/gcal-week-header.c \