Crates.io | kodiak-sets |
lib.rs | kodiak-sets |
version | 0.2.0 |
source | src |
created_at | 2023-06-17 21:01:37.169635 |
updated_at | 2023-08-20 13:41:00.466352 |
description | A library to manage generic sets supporting unique features. |
homepage | https://github.com/polarlabs |
repository | https://github.com/polarlabs/kodiak-sets |
max_upload_size | |
id | 893128 |
size | 82,809 |
Get things organized with these powerful, yet easy to use sets. The first set implemented in 0.1.0 was Sequence
.
From a generic perspective, sequences are ordered sets of elements, with each element at a unique position. Sequence
allows
to add and remove elements at any position, virtually infinitely.
At first, a Vec<T>
looks most appropriate for implementing a sequence. However, when thinking about persisting the sequence,
there are some challenges in practice:
The objective of kodiak-sets
implementation of Sequence
is to solve these challenges. In 0.1.0 it only offers support for Sequence
.
In the future, other types of sets might be added.
We use the "mediant fraction" algorithm to define a position within a Sequence
. The mediant fraction is a mathematical concept
that has been known and used for a long time. It is a method of finding a fraction that lies between two given fractions by
taking the sum of the numerators and denominators separately.
The crate is a building block of the Kodiak project, thus the naming of the crate. Kodiak supports sequences of entities at a very large scale.
However, the functionality provided by kodiak-sets
is useful on its own and might be of interest for other projects as well.
That's why we deliver it as a separate crate. So, feel free to use it. If you consider using kodiak-sets
in your project but are missing
something or have any other concerns, don't hesitate to file an issue on GitHub.
We are looking forward to your feedback.
You may be looking for:
todo: show two examples of sequences supported by kodiak-sets
.
Provide additional examples in EXAMPLES.md and link to it.
Demonstrate capabilities!
#![deny(missing_docs)]
.Iterator
and IntoIterator
for Sequence
.#[derive(Serialize, Deserialize)]
.Clone
.See CONTRIBUTING for more details.
Metric output format: x/y
x = unsafe code used by the build
y = total unsafe code found in the crate
Symbols:
🔒 = No `unsafe` usage found, declares #![forbid(unsafe_code)]
❓ = No `unsafe` usage found, missing #![forbid(unsafe_code)]
☢️ = `unsafe` usage found
Functions Expressions Impls Traits Methods Dependency
0/0 0/0 0/0 0/0 0/0 🔒 kodiak-sets 0.2.0
0/0 0/0 0/0 0/0 0/0 ❓ ├── num-integer 0.1.45
0/0 0/0 0/0 0/0 0/0 ❓ │ └── num-traits 0.2.16
0/0 0/5 0/0 0/0 0/0 ❓ └── serde 1.0.183
0/0 0/0 0/0 0/0 0/0 ❓ └── serde_derive 1.0.183
0/0 0/5 0/0 0/0 0/0
Licensed under either of
at your option.
[https://www.figma.com/blog/realtime-editing-of-ordered-sequences/]
[https://crates.io/crates/fractional_index]
[https://ccssmathanswers.com/inserting-a-fraction-between-two-given-fractions/]