Skip to content

Commit

Permalink
Improve documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
europeanplaice committed Feb 15, 2022
1 parent 45660d4 commit 59ba6f9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
name = "subset_sum"
version = "0.8.0"
version = "0.8.1"
edition = "2018"
authors = ["Tomohiro Endo <[email protected]>"]
description = "Solves subset sum problem and return a set of decomposed integers."
description = "Solves subset sum problem and returns a set of decomposed integers. It also can match corresponding numbers from two vectors and be used for Account reconciliation."
repository = "https://github.com/europeanplaice/subset_sum"
readme = "readme.md"
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Subset Sum

This is a Rust implementation that calculates subset sum problem. It returns sets of integers that sum up to a target value.
This is a Rust implementation that calculates subset sum problem. It solves subset sum problem and returns a set of decomposed integers. It also can match corresponding numbers from two vectors and be used for Account reconciliation.

## Installation
Binary files are provided on the [Releases](https://github.com/europeanplaice/subset_sum/releases) page. When you download one of these, please add it to your PATH manually.
Expand Down
5 changes: 1 addition & 4 deletions src/dp_module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,13 +333,12 @@ pub mod dp {
n_max: usize
) -> Vec<Vec<(VecDeque<i32>, VecDeque<i32>)>>{

use rand::thread_rng;
use rand::seq::SliceRandom;

let mut group: Vec<(VecDeque<i32>, VecDeque<i32>)> = Vec::new();
let mut answer: Vec<Vec<(VecDeque<i32>, VecDeque<i32>)>> = Vec::new();
let mut rng: rand::rngs::StdRng = rand::SeedableRng::from_seed([13; 32]);
for i in 0..n_max {
for _i in 0..n_max {
sequence_matcher_core_m2m(key, targets, &mut group, &mut answer, 1, key.len(), &mut key.clone(), rng.clone());
key.shuffle(&mut rng);
}
Expand All @@ -354,9 +353,7 @@ pub mod dp {
n_key: usize, len_key: usize, key_orig: &mut Vec<i32>,
mut rng: rand::rngs::StdRng
){
use rand::thread_rng;
use rand::seq::SliceRandom;
use rand::{Rng, SeedableRng};

// if n_key == len_key{
// println!("finish n_key");
Expand Down

0 comments on commit 59ba6f9

Please sign in to comment.