Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lucidfrontier45/indexedvectors.jl
https://github.com/lucidfrontier45/indexedvectors.jl
Last synced: about 4 hours ago
JSON representation
- Host: GitHub
- URL: https://github.com/lucidfrontier45/indexedvectors.jl
- Owner: lucidfrontier45
- License: mit
- Created: 2021-05-01T04:49:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-05-06T12:19:11.000Z (over 3 years ago)
- Last Synced: 2024-10-11T14:21:33.469Z (28 days ago)
- Language: Julia
- Size: 9.77 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# IndexedVectors
[![Build Status](https://travis-ci.org/lucidfrontier45/IndexedVectors.svg?branch=master)](https://travis-ci.org/lucidfrontier45/IndexedVectors) [![Coverage Status](https://coveralls.io/repos/github/lucidfrontier45/IndexedVectors/badge.svg?branch=master)](https://coveralls.io/github/lucidfrontier45/IndexedVectors?branch=master)
Vectors that can be looked up by the specidied key.
Example
```julia
using IndexedVectors# base data
data = [("a", 100), ("b", 200), ("c", 300)]# create index by the first item
indexed_data = IndexedVector(data, x -> x[1])# get by index
data[1] # ("a", 100)# get by key
data["b"] # ("b", 200)# slice index
data[1:2] # [("a", 100), ("b", 200)]
```