All Projects → dirmeier → Datastructures

dirmeier / Datastructures

Licence: gpl-3.0
🚀 Implementation of core data structures for R

Programming Languages

r
7636 projects

Projects that are alternatives of or similar to Datastructures

Datastructure
常用数据结构及其算法的Java实现,包括但不仅限于链表、栈,队列,树,堆,图等经典数据结构及其他经典基础算法(如排序等)...
Stars: ✭ 419 (+554.69%)
Mutual labels:  algorithms, datastructures
Complete Placement Preparation
This repository consists of all the material required for cracking the coding rounds and technical interviews during placements.
Stars: ✭ 1,114 (+1640.63%)
Mutual labels:  algorithms, datastructures
Algorithms
数据结构和算法专项训练营。✍️✍️✍️
Stars: ✭ 424 (+562.5%)
Mutual labels:  algorithms, datastructures
Competitive Programming Library
Templates, algorithms and data structures implemented and collected for programming contests. Check README.md for an overview.
Stars: ✭ 236 (+268.75%)
Mutual labels:  algorithms, datastructures
Awesome Java Leetcode
👑 LeetCode of algorithms with java solution(updating).
Stars: ✭ 8,297 (+12864.06%)
Mutual labels:  algorithms, datastructures
Leetcode
Leetcode problems & solutions
Stars: ✭ 258 (+303.13%)
Mutual labels:  algorithms, datastructures
Algorithms And Data Structures In Java
Algorithms and Data Structures in Java
Stars: ✭ 498 (+678.13%)
Mutual labels:  algorithms, datastructures
Algocasts Js
DSA in JavaScript ✅
Stars: ✭ 189 (+195.31%)
Mutual labels:  algorithms, datastructures
Dsjslib
A library implementing several standard data structures and utilities, in JavaScript. Its written and tested using Node.js which is the target platform.
Stars: ✭ 707 (+1004.69%)
Mutual labels:  algorithms, datastructures
Go
Algorithms Implemented in GoLang
Stars: ✭ 7,385 (+11439.06%)
Mutual labels:  algorithms, datastructures
Competitive Programming
Repository of all my submissions to some competitive programming website (Online Judges), as well as, the implementation of some data structures and algorithms.
Stars: ✭ 53 (-17.19%)
Mutual labels:  algorithms, datastructures
Algorithms
Here is the my solutions for problems in {leetcode, hackerrank, geeksforgeeks}
Stars: ✭ 36 (-43.75%)
Mutual labels:  algorithms, datastructures
Competitive Programming Resources
This repository consists of data helpful for ACM ICPC programming contest, in general competitive programming.
Stars: ✭ 199 (+210.94%)
Mutual labels:  algorithms, datastructures
Proalgos Cpp
C++ implementations of well-known (and some rare) algorithms, while following good software development practices
Stars: ✭ 369 (+476.56%)
Mutual labels:  algorithms, datastructures
Data Structures And Algorithms
Data Structures and Algorithms implementation in Go
Stars: ✭ 2,272 (+3450%)
Mutual labels:  algorithms, datastructures
Competitive Programming
📌 📚 Solution of competitive programming problems, code templates, Data Structures and Algorithms, hackathons, interviews and much more.
Stars: ✭ 496 (+675%)
Mutual labels:  algorithms, datastructures
Algorithm
The repository algorithms implemented on the Go
Stars: ✭ 163 (+154.69%)
Mutual labels:  algorithms, datastructures
Matlab Octave
This repository contains algorithms written in MATLAB/Octave. Developing algorithms in the MATLAB environment empowers you to explore and refine ideas, and enables you test and verify your algorithm.
Stars: ✭ 180 (+181.25%)
Mutual labels:  algorithms, datastructures
Cdsa
A library of generic intrusive data structures and algorithms in ANSI C
Stars: ✭ 549 (+757.81%)
Mutual labels:  algorithms, datastructures
Phpalgorithms
A collection of common algorithms implemented in PHP. The collection is based on "Cracking the Coding Interview" by Gayle Laakmann McDowell
Stars: ✭ 865 (+1251.56%)
Mutual labels:  algorithms, datastructures

datastructures

Project Status Project Life ci codecov CRAN

Implementation of core data structures for R.

Introduction

Implementation of advanced data structures such as hashmaps, heaps, or queues in R. Advanced data structures are essential in many computer science and statistics problems, for example graph algorithms or string analysis. The package uses Boost and STL data types and extends these to R with Rcpp modules.

So far datastructures has implementations for:

  • Fibonacci and binomial heaps,
  • queues and stacks,
  • hashmaps, multimaps and bimaps.

As an introductory example, imagine that you want to compute shortest paths on a graph and decide to use a Fibonacci heap for keeping the distances. A Fibonacci heap is an efficient tree-like data structure that satisfies the min-heap property. We can use it to quickly get the node with the shortest distance in O(log n) time like this:

  fh <- fibonacci_heap("numeric")
  node.labels    <- paste0("n", 10:1)
  node.distances <- seq(1, 0, length.out=length(node.labels))
  fh <- insert(fh, node.distances, node.labels)

  peek(fh)
  $`0`
  [1] "n1"

datastructures also allows storing non-orimitive objects, like data.frames, matrices or environments. For instance, we could use a hashmap for storing such objects:

  hm <- hashmap("integer")
  keys <- 1:2
  values <- list(
    environment(),
    data.frame(A=rbeta(3, .5, .5), B=rgamma(3, 1)))
  hm[keys] <- values

  hm[1L]
  [[1]]
  <environment: R_GlobalEnv>

Installation

Get the package from CRAN using:

  install.packages("datastructures")

You can also download the tarball of the latest release and install with:

  R CMD install <datastructures-x.y.z.tar.gz>

where <datastructures-x.y.z.tar.gz> is your downloaded tarball. If you want to you can also use devtools, but I don't recommend it since it might give unstable versions:

  devtools::install_github("dirmeier/datastructures")

Documentation

Load the library using library(datastructures). We provide a vignette for the package that can be called using: vignette("datastructures"). If there are any questions let met know.

Citation

If you want to cite datastructures, please use the following entry:

Dirmeier, Simon (2018). datastructures: An R package for organisation and storage of data. Journal of Open Source Software, 3(28), 910, https://doi.org/10.21105/joss.00910

Feature requests and contributing

If you want to have another datastructure added, say from boost or the STL, just open up a new issue. Alternatively it would be great if you provided a PR.

Author

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].