Nearest neighbor search algorithms including a ball tree and a vantage point tree.

Overview

petal-neighbors

Nearest neighbor search algorithms including a ball tree and a vantage point tree.

crates.io Documentation Coverage Status

Examples

The following example shows how to find two nearest neighbors in a ball tree.

use ndarray::{array, aview1};
use petal_neighbors::BallTree;

let points = array![[1., 1.], [1., 2.], [9., 9.]];
let tree = BallTree::euclidean(points).unwrap();
let (indices, distances) = tree.query(&aview1(&[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.49 and later.

License

Copyright 2019-2021 Petabi, Inc.

Licensed under Apache License, Version 2.0 (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 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, shall be licensed as above, without any additional terms or conditions.

Comments
  • Update ndarray-rand requirement from 0.13 to 0.14

    Update ndarray-rand requirement from 0.13 to 0.14

    Updates the requirements on ndarray-rand to permit the latest version.

    Changelog

    Sourced from ndarray-rand's changelog.

    Version 0.14.0 (2020-11-28)

    New features

    Enhancements

    API changes

    • The old function stack has been renamed to concatenate. A new function stack with numpy-like semantics have taken its place. Old usages of stack should change to use concatenate.

      concatenate produces an array with the same number of axes as the inputs.
      stack produces an array that has one more axis than the inputs.

      This change was unfortunately done without a deprecation period, due to the long period between releases.

      rust-ndarray/ndarray#844
      rust-ndarray/ndarray#850

    • Enum ErrorKind is now properly non-exhaustive and has lost its old placeholder invalid variant. By [@​Zuse64] rust-ndarray/ndarray#848

    • Remove deprecated items:

      • RcArray (deprecated alias for ArcArray)
      • Removed subview_inplace use collapse_axis
      • Removed subview_mut use index_axis_mut
      • Removed into_subview use index_axis_move
      • Removed subview use index_axis

    ... (truncated)

    Commits
    • abb0f9e ndarray-rand 0.14
    • a77825a Merge pull request #957 from rust-ndarray/neg-stride-windows
    • 288f131 Merge pull request #956 from rust-ndarray/axis-axes-cleanup
    • 1f65811 Merge pull request #955 from rust-ndarray/blas-integration
    • e377e82 FIX: Fix .windows() producer for negative stride arrays
    • c542a6b MAINT: Silence one clippy lint
    • 7be7fd5 DOC: Add comment on Axis about why we don't have conversion traits
    • be13f3d FIX: Update Axes example, clarify docs and adjust reexports
    • a241240 FIX: Simplify .is_square() slightly
    • 0b7d317 DOC: Elaborate a bit more on BLAS integration instructions
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update approx requirement from 0.3 to 0.4

    Update approx requirement from 0.3 to 0.4

    Updates the requirements on approx to permit the latest version.

    Commits

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • Update criterion requirement from 0.3 to 0.4

    Update criterion requirement from 0.3 to 0.4

    Updates the requirements on criterion to permit the latest version.

    Changelog

    Sourced from criterion's changelog.

    [0.4.0] - 2022-09-10

    Removed

    • The Criterion::can_plot function has been removed.
    • The Criterion::bench_function_over_inputs function has been removed.
    • The Criterion::bench_functions function has been removed.
    • The Criterion::bench function has been removed.

    Changed

    • HTML report hidden behind non-default feature flag: 'html_reports'
    • Standalone support (ie without cargo-criterion) feature flag: 'cargo_bench_support'
    • MSRV bumped to 1.57
    • rayon and plotters are optional (and default) dependencies.
    • Status messages ('warming up', 'analyzing', etc) are printed to stderr, benchmark results are printed to stdout.
    • Accept subsecond durations for --warm-up-time, --measurement-time and --profile-time.
    • Replaced serde_cbor with ciborium because the former is no longer maintained.
    • Upgrade clap to v3 and regex to v1.5.

    Added

    • A --discard-baseline flag for discarding rather than saving benchmark results.
    • Formal support for benchmarking code compiled to web-assembly.
    • A --quiet flag for printing just a single line per benchmark.
    • A Throughput::BytesDecimal option for measuring throughput in bytes but printing them using decimal units like kilobytes instead of binary units like kibibytes.

    Fixed

    • When using bench_with_input, the input parameter will now be passed through black_box before passing it to the benchmark.

    [0.3.6] - 2022-07-06

    Changed

    • MSRV bumped to 1.49
    • Symbol for microseconds changed from ASCII 'us' to unicode 'µs'
    • Documentation fixes
    • Clippy fixes

    [0.3.5] - 2021-07-26

    Fixed

    • Corrected Criterion.toml in the book.
    • Corrected configuration typo in the book.

    Changed

    • Bump plotters dependency to always include a bug-fix.
    • MSRV bumped to 1.46.

    ... (truncated)

    Commits
    • 5e27b69 Merge branch 'version-0.4'
    • 4d6d69a Increment version numbers.
    • 935c632 Add Throughput::BytesDecimal. Fixes #581.
    • f82ce59 Remove critcmp code (it belongs in cargo-criterion) (#610)
    • a18d080 Merge branch 'master' into version-0.4
    • f9c6b8d Merge pull request #608 from Cryptex-github/patch-1
    • 8d0224e Fix html report path
    • 2934163 Add missing black_box for bench_with_input parameters. Fixes 566.
    • dfd7b65 Add duplicated benchmark ID to assertion message.
    • ce8259e Bump criterion-plot version number.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ordered-float requirement from 2 to 3

    Update ordered-float requirement from 2 to 3

    Updates the requirements on ordered-float to permit the latest version.

    Release notes

    Sourced from ordered-float's releases.

    v3.0.0

    • Breaking change: Remove Add/Sub/Mul/Div/Rem impls for &OrderedFloat to fix type inference errors (#91).
    • Breaking change: Update optional schemars dependency to version 0.8.
    • Add NotNan::as_f32 method (#109).
    Commits
    • 96db24e Update README
    • e4b7c07 Version 3.0.0
    • a849e73 Remove Add/Sub/Mul/Div/Rem impls for &OrderedFloat
    • 61975f1 Add lossy conversion for NotNan\<f64> to NotNan\<f32> (#109)
    • 158a3ae Explains needless mut borrow
    • ba12cb5 Adds clippy and fmt check to CI
    • ed9dcd4 Bumps up schemars to the latest version (0.8.8)
    • 77b1457 Removes two needless borrows
    • 6d2f2d2 Version 2.10.0
    • fd3583f impl arbitrary::Arbitrary for NotNan and OrderedFloat.
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update approx requirement from 0.4 to 0.5

    Update approx requirement from 0.4 to 0.5

    Updates the requirements on approx to permit the latest version.

    Commits
    • 11f6fda Release v0.5.0
    • 9d5b905 Merge pull request #68 from brendanzab/dependabot/add-v2-config-file
    • 244328c Upgrade to GitHub-native Dependabot
    • 195a958 Merge pull request #66 from brendanzab/dependabot/cargo/num-complex-0.4.0
    • 68aaa77 Update num-complex requirement from 0.3.0 to 0.4.0
    • See full diff in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ndarray requirement from 0.14 to 0.15

    Update ndarray requirement from 0.14 to 0.15

    Updates the requirements on ndarray to permit the latest version.

    Changelog

    Sourced from ndarray's changelog.

    Version 0.15.0 (2021-03-25)

    New features

    • Support inserting new axes while slicing by [@​jturner314]. This is an example:

      let view = arr.slice(s![.., -1, 2..;-1, NewAxis]);
      

      rust-ndarray/ndarray#570

    • Support two-sided broadcasting in arithmetic operations with arrays by [@​SparrowLii]

      This now allows, for example, addition of a 3 x 1 with a 1 x 3 array; the operands are in this case broadcast to 3 x 3 which is the shape of the result.

      Note that this means that a new trait bound is required in some places when mixing dimensionality types of arrays in arithmetic operations.

      rust-ndarray/ndarray#898

    • Support for compiling ndarray as no_std (using core and alloc) by [@​xd009642] and [@​bluss]

      rust-ndarray/ndarray#861 rust-ndarray/ndarray#889

    • New methods .cell_view() and ArrayViewMut::into_cell_view that enable new ways of working with array elements as if they were in Cells - setting elements through shared views and broadcast views, by [@​bluss].

      rust-ndarray/ndarray#877

    • New methods slice_each_axis/_mut/_inplace that make it easier to slice a dynamic number of axes in some situations, by [@​jturner314]

      rust-ndarray/ndarray#913

    • New method a.assign_to(b) with the inverse argument order compared to the existing b.assign(a) and some extra features like assigning into uninitialized arrays, By [@​bluss].

      rust-ndarray/ndarray#947

    Enhancements

    ... (truncated)

    Commits
    • c7ae4eb 0.15.0
    • 3e48234 Merge pull request #952 from rust-ndarray/update-complex
    • 383ac0e TEST: Update dev-dependency itertools to 0.10
    • 888c160 API: Update num-complex to 0.4
    • 175b8f8 Merge pull request #951 from rust-ndarray/disconnect-blas-dependency
    • 5b96f1d TEST: Remove ndarray build.rs and test-blas-openblas-sys feature flag
    • f98e5c0 API: Drop direct blas-src dependency, update docs for blas integration
    • fdbc884 Merge pull request #948 from rust-ndarray/neg-stride-constructors
    • 67397ac Merge pull request #949 from rust-ndarray/rename-directories
    • 5c6ff77 MAINT: Rename directories for misc and tests in the root
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ndarray-rand requirement from 0.11 to 0.13

    Update ndarray-rand requirement from 0.11 to 0.13

    Updates the requirements on ndarray-rand to permit the latest version.

    Changelog

    Sourced from ndarray-rand's changelog.

    Version 0.13.0 (2019-09-23)

    New features

    • ndarray-parallel is merged into ndarray. Use the rayon feature-flag to get access to parallel iterators and other parallelized methods. (#563 by [@bluss])
    • Add logspace and geomspace constructors (#617 by [@JP-Ellis])
    • Implement approx traits for ArrayBase. They can be enabled using the approx feature-flag. (#581 by [@jturner314])
    • Add mean method (#580 by [@LukeMathWalker])
    • Add Zip::all to check if all elements satisfy a predicate (#615 by [@mneumann])
    • Add RawArrayView and RawArrayViewMut types and RawData, RawDataMut, and RawDataClone traits (#496 by [@jturner314])
    • Add CowArray, Clone on write array (#632 by [@jturner314] and [@andrei-papou])
    • Add as_standard_layout to ArrayBase: it takes an array by reference and returns a CoWArray in standard layout (#616 by [@jturner314] and [@andrei-papou])
    • Add Array2::from_diag method to create 2D arrays from a diagonal (#673 by [@rth])
    • Add fold method to Zip (#684 by [@jturner314])
    • Add split_at method to AxisChunksIter/Mut (#691 by [@jturner314])
    • Implement parallel iteration for AxisChunksIter/Mut (#639 by [@nitsky])
    • Add into_scalar method to ArrayView0 and ArrayViewMut0 (#700 by [@LukeMathWalker])
    • Add accumulate_axis_inplace method to ArrayBase (#611 by [@jturner314] and [@bluss])
    • Add the array!, azip!, and s! macros to ndarray::prelude (#517 by [@jturner314])

    Enhancements

    • Improve performance for matrix multiplications when using the pure-Rust backend thanks to matrix-multiply:v0.2 (leverage SIMD instructions on x86-64 with runtime feature detection) (#556 by [@bluss])
    • Improve performance of fold for iterators (#574 by [@jturner314])
    • Improve performance of nth_back for iterators (#686 by [@jturner314])
    • Improve performance of iterators for 1-d arrays (#614 by [@andrei-papou])
    • Improve formatting for large arrays

    ... (truncated)

    Commits
    • d237595 Merge pull request #867 from rust-ndarray/update-rand
    • 72eb592 ndarray-rand 0.13.0
    • 2dfa40f FEAT: Let RandomExt methods apply to array views if possible (sample)
    • 37e4070 rand: Update ndarray-rand to rand 0.8
    • fa35a35 Merge pull request #861 from xd009642/float_core
    • 1b4a1ec Put NdFloat and num-traits/std behind std feature
    • cb2dedb Merge pull request #862 from jturner314/fix-zip-indexed-0dim
    • e12d11d Fix Zip::indexed for the 0-dimensional case
    • 3a2040d Merge pull request #855 from rust-ndarray/checked-shape-strides
    • c195930 FIX: Error-check array shape before computing strides
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ndarray-rand requirement from 0.11 to 0.12

    Update ndarray-rand requirement from 0.11 to 0.12

    Updates the requirements on ndarray-rand to permit the latest version.

    Changelog

    Sourced from ndarray-rand's changelog.

    Version 0.12.0 (2018-09-01)

    • Add var_axis method for computing variance by @LukeMathWalker.
    • Add map_mut and map_axis_mut methods (mutable variants of map and map_axis) by @LukeMathWalker.
    • Add support for 128-bit integer scalars (i128 and u128).
    • Add support for slicing with inclusive ranges (start..=end and ..=end).
    • Relax constraint on closure from Fn to FnMut for mapv, mapv_into, map_inplace and mapv_inplace.
    • Implement TrustedIterator for IterMut.
    • Bump num-traits and num-complex to version 0.2.
    • Bump blas-src to version 0.2.
    • Bump minimum required Rust version to 1.27.
    • Additional contributors to this release: @ExpHP, @jturner314, @alexbool, @messense, @danmack, @nbro

    Version 0.11.2 (2018-03-21)

    • New documentation; @jturner314 has written a large “ndarray for NumPy users” document, which we include in rustdoc. Read it here a useful quick guide for any user, and in particular if you are familiar with numpy.
    • Add ArcArray. RcArray has become ArcArray; it is now using thread safe reference counting just like Arc; this means that shared ownership arrays are now Send/Sync if the corresponding element type is `Send
      • Sync`.
    • Add array method .permute_axes() by @jturner314
    • Add array constructor Array::ones by @ehsanmok
    • Add the method .reborrow() to ArrayView/Mut, which can be used to shorten the lifetime of an array view; in a reference-like type this normally happens implicitly but for technical reasons the views have an invariant lifetime parameter.
    • Fix an issue with type inference, the dimensionality of an array should not infer correctly in more cases when using slicing. By @jturner314.

    Version 0.11.1 (2018-01-21)

    • Dimension types (Ix1, Ix2, .., IxDyn) now implement Hash by @jturner314
    • Blas integration can now use gemv for matrix-vector multiplication also when the matrix is f-order by @maciejkula
    • Encapsulated unsafe code blocks in the s![] macro are now exempted from the unsafe_code lint by @jturner314

    Version 0.11.0 (2017-12-29)

    Release announcement

    ... (truncated)

    Commits
    • 26d1bc0 ndarray-rand 0.12.0
    • fec35f7 0.14.0
    • f51f3e4 API: Remove deprecated subview and indexing methods
    • 8fec0eb API: Remove RcArray (deprecated alias of ArcArray)
    • dd06116 Merge pull request #851 from rust-ndarray/further-dep-bumps
    • 84eeb11 MAINT: Write license spec in Cargo.toml in the more spec-correct way
    • a9b4ab8 API: Bump approx to 0.4
    • 5cf7572 API: Bump num-complex to version 0.3
    • 76c8a95 Merge pull request #810 from Eijebong/deps
    • 716221c Merge pull request #850 from andrei-papou/stack-concatenate-renaming
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Update ndarray requirement from 0.13 to 0.14

    Update ndarray requirement from 0.13 to 0.14

    Updates the requirements on ndarray to permit the latest version.

    Changelog

    Sourced from ndarray's changelog.

    Version 0.14.0 (2020-11-28)

    New features

    Enhancements

    • Handle inhomogenous shape inputs better in Zip, in practice, guess better whether to prefer c- or f-order for the inner loop by [@bluss] rust-ndarray/ndarray#809

    API changes

    • The old function stack has been renamed to concatenate. A new function stack with numpy-like semantics have taken its place. Old usages of stack should change to use concatenate.

      concatenate produces an array with the same number of axes as the inputs.
      stack produces an array that has one more axis than the inputs.

      This change was unfortunately done without a deprecation period, due to the long period between releases.

    • Enum ErrorKind is now properly non-exhaustive and has lost its old placeholder invalid variant. By [@Zuse64] rust-ndarray/ndarray#848

    • Remove deprecated items:

      • RcArray (deprecated alias for ArcArray)
      • Removed subview_inplace use collapse_axis
      • Removed subview_mut use index_axis_mut
      • Removed into_subview use index_axis_move
      • Removed subview use index_axis
      • Removed slice_inplace use slice_collapse
      • Undeprecate remove_axis because its replacement is hard to find out on your own.
    • Update public external dependencies to new versions by [@Eijebong] and [@bluss]

      • num-complex 0.3
      • approx 0.4 (optional)
      • blas-src 0.6.1 and openblas-src 0.9.0 (optional)

      rust-ndarray/ndarray#810

    ... (truncated)

    Commits
    • fec35f7 0.14.0
    • f51f3e4 API: Remove deprecated subview and indexing methods
    • 8fec0eb API: Remove RcArray (deprecated alias of ArcArray)
    • dd06116 Merge pull request #851 from rust-ndarray/further-dep-bumps
    • 84eeb11 MAINT: Write license spec in Cargo.toml in the more spec-correct way
    • a9b4ab8 API: Bump approx to 0.4
    • 5cf7572 API: Bump num-complex to version 0.3
    • 76c8a95 Merge pull request #810 from Eijebong/deps
    • 716221c Merge pull request #850 from andrei-papou/stack-concatenate-renaming
    • 2bae4cc Merge pull request #834 from acj/patch-1
    • Additional commits viewable in compare view

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Avoid panic when a coordinate is NaN

    Avoid panic when a coordinate is NaN

    No longer panics when a coordinate is NaN; the distance from a point with NaN in its coordinate and another point is considered greater than the distance between any two points without NaN in their coordinates.

    opened by msk 1
  • Make API more ergonomic and document them

    Make API more ergonomic and document them

    • query_one has been renamed query_nearest.
    • query functions return indices and distances separately, so that data of the same kind are stored in a contiguous memory.
    opened by msk 1
  • ball tree not parallelized?

    ball tree not parallelized?

    Dear ball tree/kd tree team,

    I think ball tree can be efficiently parallelized right according to this paper: https://www.nazneenrajani.com/hpgm.pdf

    We can rely on rayon package?

    Thanks,

    Jianshu

    opened by jianshu93 0
Owner
Petabi
Petabi
HNSW ANN from the paper "Efficient and robust approximate nearest neighbor search using Hierarchical Navigable Small World graphs"

hnsw Hierarchical Navigable Small World Graph for fast ANN search Enable the serde feature to serialize and deserialize HNSW. Tips A good default for

Rust Computer Vision 93 Dec 30, 2022
Graph-based Approximate Nearest Neighbor Search

granne* granne (graph-based retrieval of approximate nearest neighbors) is a Rust library for approximate nearest neighbor search based on Hierarchica

null 283 Dec 21, 2022
🚀 efficient approximate nearest neighbor search algorithm collections library written in Rust 🦀 .

?? efficient approximate nearest neighbor search algorithm collections library written in Rust ?? .

Hora-Search 2.3k Jan 3, 2023
Rust implementation of multi-index hashing for neighbor searches on binary codes in the Hamming space

mih-rs Rust implementation of multi-index hashing (MIH) for neighbor searches on binary codes in the Hamming space, described in the paper Norouzi, Pu

Shunsuke Kanda 8 Sep 23, 2022
C library for finding nearest (most similar) element in a set

VP-tree nearest neighbor search A relatively simple and readable Rust implementation of Vantage Point tree search algorithm. The VP tree algorithm doe

Kornel 28 Aug 20, 2022
Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Arthur·Thomas 13 Mar 10, 2022
Rust-port of spotify/annoy as a wrapper for Approximate Nearest Neighbors in C++/Python optimized for memory usage.

Fareast This library is a rust port of spotify/annoy , currently only index serving is supported. It also provides FFI bindings for jvm, dotnet and da

Arthur·Thomas 13 Mar 10, 2022
A simple url checker for finding fraud url(s) or nearest url

urlchecker A simple url checker for finding fraud url(s) or nearest url while being fast (threading) Eg:- use std::collections::HashMap; use urlchecke

Subconscious Compute 2 Aug 7, 2022
DBSCAN and OPTICS clustering algorithms.

petal-clustering A collection of clustering algorithms. Currently this crate provides DBSCAN and OPTICS. Examples The following example shows how to c

Petabi 15 Dec 15, 2022
Personal experiments with genetic algorithms and neuroevolution, in Rust, with the Bevy engine.

The Tango Problem Personal experiments with genetic algorithms and neuroevolution, in Rust, with the Bevy engine. A number of "Psychics" are placed in

null 3 Nov 20, 2023
Rust library for genetic algorithms

Spiril Spiril is an implementation of a genetic algorithm for obtaining optimum variables (genetics) for a task through mutation and natural selection

Ashley Jeffs 25 Apr 29, 2022
darwin-rs, evolutionary algorithms with rust

darwin-rs This library allows you to write evolutionary algorithms (EA) using the Rust programming language. Written by Willi Kappler, License: MIT -

Willi Kappler 95 Jan 1, 2023
🧮 alphatensor matrix breakthrough algorithms + simd + rust.

simd-alphatensor-rs tldr; alphatensor matrix breakthrough algorithims + simd + rust. This repo contains the cutting edge matrix multiplication algorit

drbh 50 Feb 11, 2023
A suite of benchmarks to test e-graph extraction algorithms

Extraction Gym A suite of benchmarks to test e-graph extraction algorithms. Add your algorithm in src/extract and then add a line in src/main.rs. To r

null 7 Jul 1, 2023
Machine learning framework for building object trackers and similarity search engines

Similari Similari is a framework that helps build sophisticated tracking systems. The most frequently met operations that can be efficiently implement

In-Sight 71 Dec 28, 2022
Qdrant - vector similarity search engine with extended filtering support

Vector Similarity Search Engine with extended filtering support Qdrant (read: quadrant ) is a vector similarity search engine. It provides a productio

qdrant 3.5k Dec 30, 2022
A neural network model that can approximate any non-linear function by using the random search algorithm for the optimization of the loss function.

random_search A neural network model that can approximate any non-linear function by using the random search algorithm for the optimization of the los

ph04 2 Apr 1, 2022
K-dimensional tree in Rust for fast geospatial indexing and lookup

kdtree K-dimensional tree in Rust for fast geospatial indexing and nearest neighbors lookup Crate Documentation Usage Benchmark License Usage Add kdtr

Rui Hu 154 Jan 4, 2023
An Implementation of the Context Tree Weighting (CTW) Sequence Prediction Algorithm

Context Tree Weighting (CTW) CTW is a lightweight, practical and well performing sequence prediction algorithm discovered by Frans Willems, Yuri Shtar

null 7 Dec 23, 2022