#topology #metrics #merge

no-std topology-traits

Topological traits for generic mathematics in Rust

2 releases

0.1.2 Jun 1, 2023
0.1.1 Aug 25, 2021
0.1.0 Aug 12, 2021

#546 in Math

Download history 676/week @ 2024-01-11 590/week @ 2024-01-18 724/week @ 2024-01-25 462/week @ 2024-02-01 749/week @ 2024-02-08 525/week @ 2024-02-15 463/week @ 2024-02-22 539/week @ 2024-02-29 461/week @ 2024-03-07 515/week @ 2024-03-14 500/week @ 2024-03-21 588/week @ 2024-03-28 618/week @ 2024-04-04 534/week @ 2024-04-11 633/week @ 2024-04-18 396/week @ 2024-04-25

2,292 downloads per month
Used in 10 crates (via enterpolation)

MIT/Apache

8KB

Topology-traits

Topological traits for generic mathematics in Rust.

This crate is supposed to be an extension to num-traits. That is, often one has to work with more than simple numbers, for example Points in 3D space. topology-traits aims to define traits describing element relationships in various mathematical spaces and properties of these spaces.

Usage

Add this to your Cargo.toml:

[dependencies]
topology-traits = "0.1"

At the moment this crate contains traits to describe the distance of two elements and the points lying between those two elements. Hereby we define

  • distance to be the length of the shortest path between the elements and
  • the points lying between the elements to be exactly the points on the shortest path.

For certain elements calculating the shortest path between two elements may be costly, such the trait Topology allows to implement the calculation of the shortest path separately. Such algorithms are able to use this trait to gain performance if they need multiple properties between two elements.

Crate Features

This crate can be used without the standard library (#![no_std]) by disabling the default std feature. Use this in Cargo.toml:

[dependencies.topology-traits]
version = "0.1"
default-features = false
features = ["libm"]

Contributing

If you have a requirement for elements in mind which describes a mathematical property which is not numerical in nature and which is not covered by this crate yet, please tell us about it and create a new issue.

Furthermore all contributions are welcome, no matter how huge or tiny.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~220KB