VOL 85 .... No. 7

TUESDAY, MAY 17, 2022

Tagged ‘data structure’

Improved MultiMap Implementation

MONDAY, JANUARY 14, 2030 Kevin No comments

old_map

The other day, I implemented a parameterised MultiMap in Java.  In my project, however, I recently discovered that it would be nice to choose what data structures underlie the MultiMap, since you might have a preference for ordering, runtime, duplicates, etc.  So I made some minor changes that make the MultiMap significantly more powerful. Read more…

Java Parameterised MultiMap Implementation

WEDNESDAY, AUGUST 2, 1995 Kevin No comments

old-world-map

A MultiMap is essentially an augmented data structure for storing key-value pairs where one key can potentially be associated with any number of values.  I’ve accomplished this in the past by using a Map<Key, List<Value>> or some variation in the past, but methods of access are inconvenient and can be a source of many bugs.  Surprisingly, I’ve never gone out of my way to implement what should be a relatively simple data structure, but I finally did it for my most recent project, so I’m making it available to anyone who wants to use it. Read more…

Categories: Programming Tags: ,

Interval Tree Java Implementation

WEDNESDAY, AUGUST 5, 1998 Kevin 1 comment

15_19_1---Tree--Sunrise--Northumberland_web

In a recent Java project, I found myself needing to store several intervals of time which I could access readily and efficiently.  I only needed to build the tree once, so a static data structure would work fine, but queries needed to be as efficient as possible. Read more…

hide this follow me