Giter Club home page Giter Club logo

id-bimap's Introduction

Build Status

C++ Bidirectional Map Library

This C++ library provides an implementation of a two-way associative data structure, also known as a bidirectional map. It is designed as a template class following the principles of the C++ Standard Template Library (STL). The data structure allows for efficient mapping between keys and values, supporting both forward and reverse lookups. This library was developed as part of the "Modern C++" course at ELTE university.

Key Requirements

  • The key type must be incrementable (++) and support comparison and sorting (==, !=, <).
  • The key type is expected to be of integer type. A compile-time error will be generated if any other types, such as floats, are used as keys.
  • The key type parameter has a default value. If not explicitly specified by the user, the library will default to using the platform's default indexing type.

Value Type

The mapped value type can be any user-defined type. Similar to the key type, it should support comparison and sorting. However, it is essential to note that the key and value types must be distinct and cannot be the same.

Memory Usage

The bidirectional map optimizes memory usage by storing values only one time. To implement the bidirectional mapping, references are utilized, resulting in an efficient utilization of memory resources.

Running the tests

mkdir build
cd build
cmake ..
cmake --build .
ctest

id-bimap's People

Contributors

denes710 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.