Skip to content

Commit

Permalink
Add license information to README
Browse files Browse the repository at this point in the history
  • Loading branch information
msk committed Aug 20, 2020
1 parent 6246561 commit 86f5692
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 4 deletions.
1 change: 1 addition & 0 deletions Cargo.toml
Expand Up @@ -3,6 +3,7 @@ name = "petal-neighbors"
version = "0.4.0"
description = "Nearest neighbor search algorithms including a ball tree and a vantage point tree."
readme = "README.md"
documentation = "https://docs.rs/petal-neighbors"
homepage = "https://github.com/petabi/petal-neighbors"
repository = "https://github.com/petabi/petal-neighbors"
license = "Apache-2.0"
Expand Down
29 changes: 25 additions & 4 deletions README.md
Expand Up @@ -6,10 +6,6 @@ Nearest neighbor search algorithms including a ball tree and a vantage point tre
[![Documentation](https://docs.rs/petal-neighbors/badge.svg)](https://docs.rs/petal-neighbors)
[![Coverage Status](https://codecov.io/gh/petabi/petal-neighbors/branch/master/graphs/badge.svg)](https://codecov.io/gh/petabi/petal-neighbors)

## Requirements

* Rust ≥ 1.37

## Examples

The following example shows how to find two nearest neighbors in a ball tree.
Expand All @@ -23,3 +19,28 @@ let tree = BallTree::euclidean(points).unwrap();
let (indices, distances) = tree.query(&[3., 3.], 2);
assert_eq!(indices, &[1, 0]); // points[1] is the nearest, points[0] the next.
```

## Minimum Supported Rust Version

This crate is guaranteed to compile on Rust 1.37 and later.

## License

Copyright 2019-2020 Petabi, Inc.

Licensed under [Apache License, Version 2.0][apache-license] (the "License");
you may not use this crate except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed
under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied. See [LICENSE](LICENSE) for
the specific language governing permissions and limitations under the License.

## Contribution

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

[apache-license]: http://www.apache.org/licenses/LICENSE-2.0

0 comments on commit 86f5692

Please sign in to comment.