Giter Club home page Giter Club logo

bosque's Introduction

About Me (Twitter: @cavemanloverboy)

I work on a lot of things including non-equilibrium fluid dynamics, cosmology (large scale structure and scalar field dark matter), machine learning, distributed systems, smart contracts, (financial) derivatives.

Check out my crates!

bosque: a fast in-place kD-tree library

A very fast in-place kD-tree library with no storage overhead. As it is intended for cosmology, it only works for 3D data as is but is easily generalized. https://github.com/cavemanloverboy/bosque

sol: a command line explorer for the solana bockchain

Inspect transactions and accounts (coming soon) directly from your terminal. https://github.com/cavemanloverboy/sol

sha2-const-stable: sha2-const, but stable

Calculate sha2 hashes (sha224, sha256, sha384, sha512) at compile time using stable rust! https://github.com/cavemanloverboy/sha2-const-stable

solana-nostd-entrypoint: a zerocopy, no_alloc/no_std entrypoint for solana programs

https://github.com/cavemanloverboy/solana-nostd-entrypoint

sokoban-bindings: using sokoban in C/C++/Zig

Use the highly efficient zerocopy data structures of sokoban in C, C++, or Zig! https://github.com/ellipsis-labs/sokoban-bindings

oxylana: full stack solana development in rust

A template repository that includes a smart contract, frontend, client and test suite all in Rust. https://github.com/cavemanloverboy/oxylana

zipper: an anti-rug & anti-sandwich primitive

A smart contract that zips transactions, preventing sandwiches and rugs. https://github.com/cavemanloverboy/zipper

packed_bools: a lightweight ergonomic bit manipulation library for packing booleans

https://crates.io/crates/packed_bools

cosmology: a rust crate for cosmology

An early-in-development crate intended to eventually include lots of utilities commonly used in cosmology https://crates.io/crates/cosmology

interp1d: a simple rust crate for 1D linear interpolation

https://crates.io/crates/interp1d

anchor-viz: visualizing anchor programs

A color-coded visualization tool for the instructions of an anchor program. image

bosque's People

Contributors

cavemanloverboy avatar yipihey avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

yipihey

bosque's Issues

Zero-Cost monomorphization

The generic branch contains code to unify the kdtree library under a single module that is generic over CP32, f32, and f64. However, in the presence of generics, it appears the monomorphized version of the build and query functions are not as fast as those explicitly typed. This is true even for the build function into_tree which has only a simple CP32 -> T: PartialOrd bound, as that's the only thing required to build the tree.

We must investigate why this is the case.

Add comparison against kd-tree

The somewhat older kd_tree crate has mentioned optimisations as well (it uses quickselect, as well as has parallel build via par_build_by_ordered_float) so it could be interesting to compare its performance to this implementation, but I noticed it's currently missing in README.

(Originally posted at cavemanloverboy/FNNTW#8)

Tree.query fails in Python interface

Hi! I just tried taking bosque for a spin in Python and ran into an issue:

>>> from bosque_py import Tree
>>> import numpy as np
>>> DATA = 100_000
>>> QUERY = 1_000_000

>>> data = np.random.uniform(size=(DATA, 3))
>>> query = np.random.uniform(size=(QUERY, 3))

>>> tree = Tree(data)
>>> tree.query(query, 1)
thread '<unnamed>' panicked at /Users/philipps/.cargo/registry/src/index.crates.io-6f17d22bba15001f/ndarray-0.15.6/src/impl_constructors.rs:516:9:
assertion failed: dimension::can_index_slice(&v, &dim, &strides).is_ok()
---------------------------------------------------------------------------
PanicException                            Traceback (most recent call last)
Cell In[2], line 10
      7 query = np.random.uniform(size=(QUERY, 3))
      9 tree = Tree(data)
---> 10 tree.query(query, 1)

PanicException: assertion failed: dimension::can_index_slice(&v, &dim, &strides).is_ok()

This is with commit a8f8fca of bosque, rustc 1.73.0, maturin 1.3.0 and numpy 1.26.1.

Any ideas?

value incorrect

Great fast kdtree implementation!

However, in python api, the tree=Tree(X) will sort the data X and result in wrong index.

Please check.

Release

Would it be possible to get a release of the current master? The tree construction is quite different compared to the last release on crates.io, and I have a dependent crate which I'd like to go up (bosque is one of several optional backends) but can't without a release.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.