tasks_generator 1.3 → 1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/tasks_generator/variants.h +1 -13
- data/lib/tasks_generator/version.rb +1 -1
- metadata +1 -1
@@ -98,18 +98,6 @@ class variants_t {
|
|
98
98
|
fitness += count == questions[i].size();
|
99
99
|
}
|
100
100
|
}
|
101
|
-
{
|
102
|
-
for (size_t i = 0; i < questions.size(); ++i) {
|
103
|
-
size_t buffer[questions[i].size()];
|
104
|
-
for (size_t j = 0; j < questions[i].size(); ++j)
|
105
|
-
buffer[j] = questions[i][j].get_select_id();
|
106
|
-
std::sort(buffer, buffer + questions[i].size());
|
107
|
-
size_t count = 1;
|
108
|
-
for (size_t j = 1; j < questions[i].size(); ++j)
|
109
|
-
count += buffer[j] != buffer[j - 1];
|
110
|
-
fitness += double(count) / questions[i].size();
|
111
|
-
}
|
112
|
-
}
|
113
101
|
{
|
114
102
|
for (size_t i = 0; i < questions.size(); ++i) {
|
115
103
|
size_t buffer[questions[i].size()];
|
@@ -142,7 +130,7 @@ class variants_t {
|
|
142
130
|
for (size_t i = 0; i < questions.size(); ++i) {
|
143
131
|
size_t buffer[questions[i].size()];
|
144
132
|
for (size_t j = 0; j < questions[i].size(); ++j)
|
145
|
-
buffer[j] = questions[i][j].
|
133
|
+
buffer[j] = questions[i][j].get_topic_id();
|
146
134
|
std::sort(buffer, buffer + questions[i].size());
|
147
135
|
size_t count = 1;
|
148
136
|
for (size_t j = 1; j < questions[i].size(); ++j)
|