tasks_generator 1.2 → 1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/tasks_generator/variants.h +12 -0
- data/lib/tasks_generator/version.rb +1 -1
- metadata +13 -5
- checksums.yaml +0 -15
@@ -110,6 +110,18 @@ class variants_t {
|
|
110
110
|
fitness += double(count) / questions[i].size();
|
111
111
|
}
|
112
112
|
}
|
113
|
+
{
|
114
|
+
for (size_t i = 0; i < questions.size(); ++i) {
|
115
|
+
size_t buffer[questions[i].size()];
|
116
|
+
for (size_t j = 0; j < questions[i].size(); ++j)
|
117
|
+
buffer[j] = questions[i][j].get_topic_id();
|
118
|
+
std::sort(buffer, buffer + questions[i].size());
|
119
|
+
size_t count = 1;
|
120
|
+
for (size_t j = 1; j < questions[i].size(); ++j)
|
121
|
+
count += buffer[j] != buffer[j - 1];
|
122
|
+
fitness += double(count) * 10.0 / questions[i].size();
|
123
|
+
}
|
124
|
+
}
|
113
125
|
{
|
114
126
|
double buffer[questions_count];
|
115
127
|
for (size_t i = 0; i < questions.size(); ++i)
|
metadata
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tasks_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '1.
|
4
|
+
version: '1.3'
|
5
|
+
prerelease:
|
5
6
|
platform: ruby
|
6
7
|
authors:
|
7
8
|
- Arslan Urtashev
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2015-04-17 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
16
18
|
requirements:
|
17
19
|
- - ~>
|
18
20
|
- !ruby/object:Gem::Version
|
@@ -20,6 +22,7 @@ dependencies:
|
|
20
22
|
type: :runtime
|
21
23
|
prerelease: false
|
22
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
23
26
|
requirements:
|
24
27
|
- - ~>
|
25
28
|
- !ruby/object:Gem::Version
|
@@ -27,6 +30,7 @@ dependencies:
|
|
27
30
|
- !ruby/object:Gem::Dependency
|
28
31
|
name: rake
|
29
32
|
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
30
34
|
requirements:
|
31
35
|
- - ! '>='
|
32
36
|
- !ruby/object:Gem::Version
|
@@ -34,6 +38,7 @@ dependencies:
|
|
34
38
|
type: :runtime
|
35
39
|
prerelease: false
|
36
40
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
37
42
|
requirements:
|
38
43
|
- - ! '>='
|
39
44
|
- !ruby/object:Gem::Version
|
@@ -41,6 +46,7 @@ dependencies:
|
|
41
46
|
- !ruby/object:Gem::Dependency
|
42
47
|
name: rice
|
43
48
|
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
44
50
|
requirements:
|
45
51
|
- - ! '>='
|
46
52
|
- !ruby/object:Gem::Version
|
@@ -48,6 +54,7 @@ dependencies:
|
|
48
54
|
type: :runtime
|
49
55
|
prerelease: false
|
50
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
51
58
|
requirements:
|
52
59
|
- - ! '>='
|
53
60
|
- !ruby/object:Gem::Version
|
@@ -78,25 +85,26 @@ files:
|
|
78
85
|
homepage: https://github.com/Avitella/tasks_generator
|
79
86
|
licenses:
|
80
87
|
- MIT
|
81
|
-
metadata: {}
|
82
88
|
post_install_message:
|
83
89
|
rdoc_options: []
|
84
90
|
require_paths:
|
85
91
|
- lib
|
86
92
|
required_ruby_version: !ruby/object:Gem::Requirement
|
93
|
+
none: false
|
87
94
|
requirements:
|
88
95
|
- - ! '>='
|
89
96
|
- !ruby/object:Gem::Version
|
90
97
|
version: '0'
|
91
98
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
92
100
|
requirements:
|
93
101
|
- - ! '>='
|
94
102
|
- !ruby/object:Gem::Version
|
95
103
|
version: '0'
|
96
104
|
requirements: []
|
97
105
|
rubyforge_project:
|
98
|
-
rubygems_version:
|
106
|
+
rubygems_version: 1.8.23
|
99
107
|
signing_key:
|
100
|
-
specification_version:
|
108
|
+
specification_version: 3
|
101
109
|
summary: Test Tasks Generator
|
102
110
|
test_files: []
|
checksums.yaml
DELETED
@@ -1,15 +0,0 @@
|
|
1
|
-
---
|
2
|
-
!binary "U0hBMQ==":
|
3
|
-
metadata.gz: !binary |-
|
4
|
-
OTE2ZjE1Nzg2YTliNjE4ZDllOTQ0ZjMyMTRhMGUzNDVmMTBkOTgyYg==
|
5
|
-
data.tar.gz: !binary |-
|
6
|
-
MDQ1MjI5MGMwMDFlNTM1YzI0ZTJjZWY0ZDJlMTc0OGRhODM4NDA1Zg==
|
7
|
-
SHA512:
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
YTA1M2IwZDA4OWIxODllODhkOGFkY2QzMWQxNTMxOGUyYTcwZGUzZjk3NDgy
|
10
|
-
OWI4ODFhZDNjNTJhOGJhOGEyMWMzM2EyMTdkMjcxMWRiMmY2MGQzMTc3M2Vl
|
11
|
-
YmRiN2M5NTg1NDQwNzUzOTU0ZWI4Zjc5OGI5ZjQ5MTY4ZmY1Mjc=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmYzOGZlOGE5MjhhMjZkZWIwNDY5YWQyYmI3Y2I2ZTAxOTU5NmY5MmE4NGIw
|
14
|
-
NzJlNzQ0NWU4MDViMTg0MTQzOGM1YTUwYTVlMjJjNTg3NTZiODhmNGY1NWNj
|
15
|
-
OWFjYTgyZjZiZDIxZTRhMmNlZmU2ZjFjYjk0ZjFhNDU4MThlYjE=
|