dither 0.2.1-java → 0.2.2-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/dither/ipog.cc +37 -36
- data/lib/dither/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c4f7b41b32e5ea6f96a929e5ffe96bb822c1810
|
4
|
+
data.tar.gz: 3cf78c076a39e9031bb4009f51c5e676da3c8589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e113ff89775611ac9624a6ebaf9c230e176b2b10904333c82134953a2ecb8f9222147e626ff2e48a5c7d6d26747d1639c5309cf748c99bc256be6aa46f6d1d45
|
7
|
+
data.tar.gz: 6b405fa6986676656ec3da84808b7b85453e9a8f94bd8b081b6025cb7349c182e6c5c91e36e468cda5ce01f84f3eb3deda7f3f8a19dc48510fd6636293355fce
|
data/ext/dither/ipog.cc
CHANGED
@@ -13,6 +13,7 @@
|
|
13
13
|
#include <utility>
|
14
14
|
#include <tuple>
|
15
15
|
#include <limits.h>
|
16
|
+
#include <cstddef>
|
16
17
|
|
17
18
|
namespace dither {
|
18
19
|
|
@@ -107,37 +108,41 @@ void Ipog::run() {
|
|
107
108
|
const std::vector<param> &test_case = *pairs;
|
108
109
|
bool case_covered = constraint_handler->violate_constraints(test_case);
|
109
110
|
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
}
|
135
|
-
if (!constraint_handler->violate_constraints(unbound_test_case)) {
|
136
|
-
unbound_.push_front(unbound_test_case);
|
137
|
-
}
|
138
|
-
}
|
139
|
-
}
|
111
|
+
if(!case_covered) {
|
112
|
+
for (auto it = unbound_.cbegin(); it != unbound_.cend(); ++it) {
|
113
|
+
if(is_covered(*it, test_case)) {
|
114
|
+
case_covered = true;
|
115
|
+
break;
|
116
|
+
}
|
117
|
+
}
|
118
|
+
}
|
119
|
+
|
120
|
+
if (!case_covered) {
|
121
|
+
bool is_merged = false;
|
122
|
+
|
123
|
+
for(auto next = unbound_.begin(); next != unbound_.end(); ++next) {
|
124
|
+
const int merge_result = merge(k, *next, test_case);
|
125
|
+
|
126
|
+
if (merge_result > 0) {
|
127
|
+
dtest_case tmp = *next;
|
128
|
+
for (auto it = test_case.cbegin(); it != test_case.cend(); ++it) {
|
129
|
+
tmp[(*it).first] = (*it).second;
|
130
|
+
}
|
131
|
+
is_merged = true;
|
132
|
+
break;
|
133
|
+
}
|
134
|
+
}
|
140
135
|
|
136
|
+
if (!is_merged) {
|
137
|
+
dtest_case unbound_test_case(param_cache_.size(), -1);
|
138
|
+
for (auto it = test_case.cbegin(); it != test_case.cend(); ++it) {
|
139
|
+
unbound_test_case[(*it).first] = (*it).second;
|
140
|
+
}
|
141
|
+
if (!constraint_handler->violate_constraints(unbound_test_case)) {
|
142
|
+
unbound_.push_front(unbound_test_case);
|
143
|
+
}
|
144
|
+
}
|
145
|
+
}
|
141
146
|
}
|
142
147
|
}
|
143
148
|
ground_solutions();
|
@@ -163,12 +168,8 @@ inline const int Ipog::merge(const int k, dtest_case &test_case,
|
|
163
168
|
return -1;
|
164
169
|
}
|
165
170
|
|
166
|
-
for (auto
|
167
|
-
|
168
|
-
}
|
169
|
-
|
170
|
-
for (auto i = 0; i < k; i++) {
|
171
|
-
if (test_case[i] == -1) {
|
171
|
+
for (auto i = 0; i <= k; i++) {
|
172
|
+
if (merge_scratch_[i] == -1) {
|
172
173
|
return 1;
|
173
174
|
}
|
174
175
|
}
|
data/lib/dither/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dither
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Jason Gowan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
requirement: !ruby/object:Gem::Requirement
|