22 lines
1.1 KiB
Markdown
22 lines
1.1 KiB
Markdown
# `std::map` impl for CS440
|
|
|
|
This repo contains the results of an assignment I completed as a part of my CS 440 class.
|
|
|
|
The assignment in question was to implement much of the interface that `std::map` without using `std::map` with a performance bound requiring the usage of a red-black tree or comparably performant data structure.
|
|
|
|
The implementation is in the `Map.hpp` file with testing of that implementation occuring in `t.cpp`, `ta.cpp`, `minimal.cpp`, `morseex.cpp`, `test.cpp` `test-kec.cpp` `test-scaling.cpp`.
|
|
|
|
## Building
|
|
|
|
All `.cpp` files can be built into executables on Linux via the makefile albeit the makefile is currently written to use g++ even though this implementation should work with other C++ compilers (I've only tested building with `g++ (GCC) 15.2.1 20260103`)
|
|
|
|
## What is is implemented
|
|
|
|
The following is implemented.
|
|
|
|
- default, copy and move constructors and assignment operators
|
|
- initializer list constructor
|
|
- Mutable, Const and Reverse Iterators
|
|
- finding a value in the map `O(log(N))` time given the key both const and mutably
|
|
- insertion, modification and erasure of values via various methods
|
|
- and comparison operators
|