All Projects → samchon → Tstl

samchon / Tstl

Licence: mit
TypeScript-STL (Standard Template Library, migrated from C++)

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Tstl

Tbox
🎁 A glib-like multi-platform c library
Stars: ✭ 3,800 (+857.18%)
Mutual labels:  algorithm, iterator, container
avl array
High performance templated AVL tree using a fixed size array. Extensive test suite passing.
Stars: ✭ 33 (-91.69%)
Mutual labels:  container, stl
Libchef
🍀 c++ standalone header-only basic library. || c++头文件实现无第三方依赖基础库
Stars: ✭ 178 (-55.16%)
Mutual labels:  algorithm, container
ctl
My variant of the C Template Library
Stars: ✭ 105 (-73.55%)
Mutual labels:  iterator, hashmap
Rhashmap
Robin Hood hash map library
Stars: ✭ 33 (-91.69%)
Mutual labels:  algorithm, hashmap
Mystl
C++11 实现的简易版 STL
Stars: ✭ 97 (-75.57%)
Mutual labels:  algorithm, stl
indicium
🔎 A simple in-memory search for collections and key-value stores.
Stars: ✭ 41 (-89.67%)
Mutual labels:  collection, hashmap
Fifo map
a FIFO-ordered associative container for C++
Stars: ✭ 100 (-74.81%)
Mutual labels:  stl, container
velcro
Collection initialization macros for Rust
Stars: ✭ 45 (-88.66%)
Mutual labels:  collection, hashmap
output container
Automatic output function for STL containers
Stars: ✭ 32 (-91.94%)
Mutual labels:  container, stl
Mytinystl
Achieve a tiny STL in C++11
Stars: ✭ 4,813 (+1112.34%)
Mutual labels:  algorithm, stl
Algorithms
CLRS study. Codes are written with golang.
Stars: ✭ 482 (+21.41%)
Mutual labels:  algorithm, hashmap
Staticvec
Implements a fixed-capacity stack-allocated Vec alternative backed by an array, using const generics.
Stars: ✭ 236 (-40.55%)
Mutual labels:  iterator, container
Rolling
Computationally efficient rolling window iterators for Python (including sum, min/max, median and more...)
Stars: ✭ 158 (-60.2%)
Mutual labels:  algorithm, iterator
Containers
This library provides various containers. Each container has utility functions to manipulate the data it holds. This is an abstraction as to not have to manually manage and reallocate memory.
Stars: ✭ 125 (-68.51%)
Mutual labels:  collection, container
USmallFlat
Ubpa small flat containers based on C++20
Stars: ✭ 20 (-94.96%)
Mutual labels:  container, stl
php-sorted-collections
Sorted Collections for PHP
Stars: ✭ 22 (-94.46%)
Mutual labels:  collection, iterator
Interview
📚 C/C++ 技术面试基础知识总结,包括语言、程序库、数据结构、算法、系统、网络、链接装载库等知识及面试经验、招聘、内推等信息。This repository is a summary of the basic knowledge of recruiting job seekers and beginners in the direction of C/C++ technology, including language, program library, data structure, algorithm, system, network, link loading library, interview experience, recruitment, recommendatio…
Stars: ✭ 21,608 (+5342.82%)
Mutual labels:  algorithm, stl
Collection
A (memory) friendly, easy, lazy and modular collection class.
Stars: ✭ 331 (-16.62%)
Mutual labels:  iterator, collection
Vaadin Core
An evolving set of free, open source web components for building mobile and desktop web applications in modern browsers.
Stars: ✭ 382 (-3.78%)
Mutual labels:  collection

TypeScript Standard Template Library

TSTL logo

npm install --save tstl

GitHub license npm version Downloads Build Status FOSSA Status Chat on Gitter

Implementation of STL (Standard Template Library) in TypeScript.

  • Containers
  • Iterators
  • Algorithms
  • Functors

TSTL is an open-source project providing features of STL, migrated from C++ to TypeScript. You can enjoy the STL's own specific containers, algorithms and functors in the JavaScript. If TypeScript, you also can take advantage of type restrictions and generic programming with the TypeScript.

Below components are list of provided objects in the TSTL. If you want to know more about the TSTL, then please read the Guide Documents.

Features

Containers

Algorithms

Functors

Installation

NPM Module

Installing TSTL in NodeJS is very easy. Just install with the npm

# Install TSTL from the NPM module
npm install --save tstl

Usage

import std from "tstl";

function main(): void
{
    const map: std.TreeMap<number, string> = new std.TreeMap();

    map.emplace(1, "First");
    map.emplace(4, "Fourth");
    map.emplace(5, "Fifth");
    map.set(9, "Nineth");

    for (let it = map.begin(); !it.equals(map.end()); it = it.next())
        console.log(it.first, it.second);

    const it: std.TreeMap.Iterator<number, string> = map.lower_bound(3);
    console.log(`lower bound of 3 is: ${x.first}, ${x.second}`);
}
main();

Appendix

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].