europeanplaice / subset_sum Goto Github PK
View Code? Open in Web Editor NEWSolves subset sum problem and returns a set of decomposed integers.
Home Page: https://europeanplaice.github.io/subset_sum/
License: MIT License
Solves subset sum problem and returns a set of decomposed integers.
Home Page: https://europeanplaice.github.io/subset_sum/
License: MIT License
HI!
Is it expected that version 0.22.3 will also be available on pypi?
Thank you
I would like to use your rust crate in my project but I ran into a problem when I add it to my Cargo.toml
file.
Running cargo build
ends up in an error:
error[E0433]: failed to resolve: use of undeclared crate or module `mem`
--> /home/max/.cargo/registry/src/index.crates.io-6f17d22bba15001f/subset_sum-0.22.1/src/dp_module.rs:503:21
|
503 | mem::swap(&mut y.0, &mut y.1);
| ^^^ use of undeclared crate or module `mem`
This what I add to my Cargo.toml
:
[dependencies]
dpss = {version = "0.22.1", package = "subset_sum"}
Does this crate offer an unsigned version of the find_subset
function?
For example a function with a signature like:
fn find_subset(Vec<usize>, usize, usize) -> Vec<Vec<usize>>;
I would need that in my project.
Python version: 3.12
Platform: Win64
Full logs:
PS C:\Users\tavio\Downloads> pip install dpss
Collecting dpss
Using cached dpss-0.22.0.tar.gz (150 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: dpss
Building wheel for dpss (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for dpss (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
Running `maturin pep517 build-wheel -i C:\Users\tavio\AppData\Local\Programs\Python\Python312\python.exe --compatibility off`
Compiling autocfg v1.1.0
Compiling crossbeam-utils v0.8.8
Compiling cfg-if v1.0.0
Compiling lazy_static v1.4.0
Compiling scopeguard v1.1.0
Compiling rayon-core v1.9.1
Compiling num_cpus v1.13.1
Compiling either v1.6.1
Compiling itertools v0.10.3
Compiling memoffset v0.6.5
Compiling crossbeam-epoch v0.9.8
Compiling rayon v1.5.1
Compiling crossbeam-channel v0.5.4
Compiling crossbeam-deque v0.8.1
Compiling subset_sum v0.22.0 (C:\Users\tavio\AppData\Local\Temp\pip-install-vt8ik074\dpss_84d1f0c3ac4c4da8b3452018dafd92c1)
Finished release [optimized] target(s) in 7.60s
💥 maturin failed
Caused by: Failed to generate cffi declarations using C:\Users\tavio\AppData\Local\Programs\Python\Python312\python.exe: exit code: 1
--- Stdout:
--- Stderr:
Traceback (most recent call last):
File "<string>", line 2, in <module>
ModuleNotFoundError: No module named 'cffi'
📦 Including license file "LICENSE"
🔗 Found cffi bindings
ðŸ\x90\x8d Using CPython 3.12 at C:\Users\tavio\AppData\Local\Programs\Python\Python312\python.exe to generate the cffi bindings
Error: command ['maturin', 'pep517', 'build-wheel', '-i', 'C:\\Users\\tavio\\AppData\\Local\\Programs\\Python\\Python312\\python.exe', '--compatibility', 'off'] returned non-zero exit status 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for dpss
Failed to build dpss
ERROR: Could not build wheels for dpss, which is required to install pyproject.toml-based projects
What I tried:
maturin
from PyPIHi,
Thanks for this great pkg. I am testing the wasm package (wasm_find_subset) to do reconciliations. But I have some questions:
My subset array and target may include some values with 2 decimal places,
example: subset [-40000, 25305.55, 25305.55, 30000, 54123.78] target: 79429.33
.
Could I just multiply the subset and the target by 100 to remove the decimals and make it work? By doing this will it take longer get a result?
Using the same subset example as above, sometimes I can have repeated numbers in the subset array. Is it possible to get wasm_find_subset
to return the result as positions in the array? example:
subset [-40000, 25305.55, 25305.55, 30000, 54123.78] target: 79429.33
result: [[1, 4], [2,4]]
Currently the wasm_find_subset
function returns a string. Could it return an array of arrays? Or is there an easy way to convert that string to an array of arrays.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.