Commit Graph

5 Commits

Author SHA1 Message Date
Christopher Berner
eafdc58d0a Run cargo clippy --fix 2023-07-03 11:09:19 -07:00
Slesarew
5a720829fa
feat: support no_std (#143)
* feat: support no_std

`metal` feature supports `no_std` in configuration `default-features = false, features = ["metal"]`.
Float calculation is done via `micromath` crate.

All previously available functionality remains under default `std` feature.

Some tweaking of `python` and `wasm` features was done to compile tests.

* feat: get rid of floats (#2)

* feat: remove conversion to f64, fix features

* chore: uncomment symbols_required checker, fmt

* revert: add cdylib target for python support

* fix: generalize crate type

---------

Co-authored-by: varovainen <99664267+varovainen@users.noreply.github.com>
2023-02-02 18:07:41 -08:00
Christopher Berner
8b669faefd Fix panic in graph traversal
There was an off-by-one error in the initialization of storage for
connected components, such that if there were the same number of
connected components as nodes it would cause an index out of bounds
error
2021-07-27 21:46:46 -07:00
Christopher Berner
602fc8711d Reduce length of merge chains in union-find data structure 2020-12-26 20:46:47 -08:00
Christopher Berner
3e88b065dd Optimize graph substep
Use a union-find data structure which is incrementally updated, instead
of always recomputing the entire graph

This improves performance by 5-10%
2020-12-26 10:05:53 -08:00