rfuzzy 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/rfuzzy/function.rb +1 -2
- metadata +39 -36
- data/.document +0 -5
- data/Gemfile +0 -13
- data/LICENSE.txt +0 -9
- data/README.rdoc +0 -33
- data/Rakefile +0 -53
- data/VERSION +0 -1
- data/test/helper.rb +0 -18
- data/test/test_rfuzzy.rb +0 -7
data/lib/rfuzzy/function.rb
CHANGED
@@ -63,7 +63,7 @@ class Function
|
|
63
63
|
end
|
64
64
|
new_function = Function.new("#{@name}*#{fl}")
|
65
65
|
@points.each do |p|
|
66
|
-
new_function.points.push Point.new(p.x, [p.y*fl, 1.0].
|
66
|
+
new_function.points.push Point.new(p.x, [p.y*fl, 1.0].min)
|
67
67
|
end
|
68
68
|
return new_function
|
69
69
|
end
|
@@ -79,7 +79,6 @@ class Function
|
|
79
79
|
end
|
80
80
|
new_function = Function.new("#{@name} MAX #{fl}")
|
81
81
|
@points.each do |p|
|
82
|
-
puts "#{fl} #{p.y}"
|
83
82
|
new_function.points.push Point.new(p.x, [p.y,fl].min)
|
84
83
|
end
|
85
84
|
return new_function
|
metadata
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rfuzzy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 2
|
10
|
+
version: 0.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
|
-
-
|
13
|
+
- Karol Majta
|
14
14
|
autorequire:
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-23 00:00:00 +02:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
+
name: shoulda
|
22
23
|
prerelease: false
|
23
|
-
type: :development
|
24
24
|
requirement: &id001 !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
@@ -30,27 +30,25 @@ dependencies:
|
|
30
30
|
segments:
|
31
31
|
- 0
|
32
32
|
version: "0"
|
33
|
-
|
33
|
+
type: :development
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
+
name: bundler
|
36
37
|
prerelease: false
|
37
|
-
type: :development
|
38
38
|
requirement: &id002 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
|
-
- -
|
41
|
+
- - ">="
|
42
42
|
- !ruby/object:Gem::Version
|
43
|
-
hash:
|
43
|
+
hash: 3
|
44
44
|
segments:
|
45
|
-
- 1
|
46
45
|
- 0
|
47
|
-
|
48
|
-
|
49
|
-
name: bundler
|
46
|
+
version: "0"
|
47
|
+
type: :development
|
50
48
|
version_requirements: *id002
|
51
49
|
- !ruby/object:Gem::Dependency
|
50
|
+
name: jeweler
|
52
51
|
prerelease: false
|
53
|
-
type: :development
|
54
52
|
requirement: &id003 !ruby/object:Gem::Requirement
|
55
53
|
none: false
|
56
54
|
requirements:
|
@@ -62,11 +60,11 @@ dependencies:
|
|
62
60
|
- 6
|
63
61
|
- 2
|
64
62
|
version: 1.6.2
|
65
|
-
|
63
|
+
type: :development
|
66
64
|
version_requirements: *id003
|
67
65
|
- !ruby/object:Gem::Dependency
|
66
|
+
name: rcov
|
68
67
|
prerelease: false
|
69
|
-
type: :development
|
70
68
|
requirement: &id004 !ruby/object:Gem::Requirement
|
71
69
|
none: false
|
72
70
|
requirements:
|
@@ -76,25 +74,31 @@ dependencies:
|
|
76
74
|
segments:
|
77
75
|
- 0
|
78
76
|
version: "0"
|
79
|
-
|
77
|
+
type: :development
|
80
78
|
version_requirements: *id004
|
81
|
-
|
79
|
+
- !ruby/object:Gem::Dependency
|
80
|
+
name: rake
|
81
|
+
prerelease: false
|
82
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ">="
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 3
|
88
|
+
segments:
|
89
|
+
- 0
|
90
|
+
version: "0"
|
91
|
+
type: :development
|
92
|
+
version_requirements: *id005
|
93
|
+
description: Intuitive framework for fuzzy logic in ruby
|
82
94
|
email: karolmajta@gmail.com
|
83
95
|
executables: []
|
84
96
|
|
85
97
|
extensions: []
|
86
98
|
|
87
|
-
extra_rdoc_files:
|
88
|
-
|
89
|
-
- README.rdoc
|
99
|
+
extra_rdoc_files: []
|
100
|
+
|
90
101
|
files:
|
91
|
-
- .document
|
92
|
-
- Gemfile
|
93
|
-
- LICENSE.txt
|
94
|
-
- README.rdoc
|
95
|
-
- Rakefile
|
96
|
-
- VERSION
|
97
|
-
- lib/rfuzzy.rb
|
98
102
|
- lib/rfuzzy/adherence.rb
|
99
103
|
- lib/rfuzzy/defuzz.rb
|
100
104
|
- lib/rfuzzy/function.rb
|
@@ -106,12 +110,11 @@ files:
|
|
106
110
|
- lib/rfuzzy/rule.rb
|
107
111
|
- lib/rfuzzy/trapezoidal.rb
|
108
112
|
- lib/rfuzzy/triangular.rb
|
109
|
-
-
|
110
|
-
- test/test_rfuzzy.rb
|
113
|
+
- lib/rfuzzy.rb
|
111
114
|
has_rdoc: true
|
112
|
-
homepage:
|
113
|
-
licenses:
|
114
|
-
|
115
|
+
homepage: https://github.com/lolek09/rfuzzy
|
116
|
+
licenses: []
|
117
|
+
|
115
118
|
post_install_message:
|
116
119
|
rdoc_options: []
|
117
120
|
|
@@ -137,10 +140,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
137
140
|
version: "0"
|
138
141
|
requirements: []
|
139
142
|
|
140
|
-
rubyforge_project:
|
143
|
+
rubyforge_project: nowarning
|
141
144
|
rubygems_version: 1.5.2
|
142
145
|
signing_key:
|
143
146
|
specification_version: 3
|
144
|
-
summary: rfuzzy
|
147
|
+
summary: rfuzzy - fuzzy logic for ruby
|
145
148
|
test_files: []
|
146
149
|
|
data/.document
DELETED
data/Gemfile
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
source "http://rubygems.org"
|
2
|
-
# Add dependencies required to use your gem here.
|
3
|
-
# Example:
|
4
|
-
# gem "activesupport", ">= 2.3.5"
|
5
|
-
|
6
|
-
# Add dependencies to develop your gem here.
|
7
|
-
# Include everything needed to run rake, tests, features, etc.
|
8
|
-
group :development do
|
9
|
-
gem "shoulda", ">= 0"
|
10
|
-
gem "bundler", "~> 1.0.0"
|
11
|
-
gem "jeweler", "~> 1.6.2"
|
12
|
-
gem "rcov", ">= 0"
|
13
|
-
end
|
data/LICENSE.txt
DELETED
@@ -1,9 +0,0 @@
|
|
1
|
-
Copyright (c) 2002 JSON.org
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
4
|
-
|
5
|
-
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
6
|
-
|
7
|
-
The Software shall be used for Good, not Evil.
|
8
|
-
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
= rfuzzy
|
2
|
-
|
3
|
-
Rfuzzy is a small, yet handy tool for express creation of fuzzy systems.
|
4
|
-
It's goal is to provide a quick way for defining any kind of expert system.
|
5
|
-
|
6
|
-
== Features
|
7
|
-
|
8
|
-
Adherence functions
|
9
|
-
* Easy creation of any adherence function.
|
10
|
-
* Performing t and s norms on functions.
|
11
|
-
* Defuzzification.
|
12
|
-
|
13
|
-
Fuzzy domains (fuzzy sets)
|
14
|
-
* Easy creation of domains.
|
15
|
-
* Domains described by named adherence functions.
|
16
|
-
|
17
|
-
Fuzzy rules
|
18
|
-
* Syntax similar to natural language.
|
19
|
-
* Proc's used as both antecendent and consequent of a rule.
|
20
|
-
|
21
|
-
Fuzzy systems
|
22
|
-
* Easy definition of input and output variables.
|
23
|
-
* Easy definition of rules
|
24
|
-
|
25
|
-
== Tutorials
|
26
|
-
|
27
|
-
More information can be found at:
|
28
|
-
http://student.agh.edu.pl/~majta/rfuzzy
|
29
|
-
|
30
|
-
== Copyright
|
31
|
-
|
32
|
-
This software is distributed under JSON License:
|
33
|
-
http://www.json.org/license.html
|
data/Rakefile
DELETED
@@ -1,53 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'bundler'
|
5
|
-
begin
|
6
|
-
Bundler.setup(:default, :development)
|
7
|
-
rescue Bundler::BundlerError => e
|
8
|
-
$stderr.puts e.message
|
9
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
-
exit e.status_code
|
11
|
-
end
|
12
|
-
require 'rake'
|
13
|
-
|
14
|
-
require 'jeweler'
|
15
|
-
Jeweler::Tasks.new do |gem|
|
16
|
-
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
-
gem.name = "rfuzzy"
|
18
|
-
gem.homepage = "http://github.com/lolek09/rfuzzy"
|
19
|
-
gem.license = "JSON"
|
20
|
-
gem.summary = %Q{rfuzzy is a fuzzy logic library for Ruby}
|
21
|
-
gem.description = %Q{rfuzzy is a fuzzy logic library for Ruby}
|
22
|
-
gem.email = "karolmajta@gmail.com"
|
23
|
-
gem.authors = ["lolek09"]
|
24
|
-
# dependencies defined in Gemfile
|
25
|
-
end
|
26
|
-
Jeweler::RubygemsDotOrgTasks.new
|
27
|
-
|
28
|
-
require 'rake/testtask'
|
29
|
-
Rake::TestTask.new(:test) do |test|
|
30
|
-
test.libs << 'lib' << 'test'
|
31
|
-
test.pattern = 'test/**/test_*.rb'
|
32
|
-
test.verbose = true
|
33
|
-
end
|
34
|
-
|
35
|
-
require 'rcov/rcovtask'
|
36
|
-
Rcov::RcovTask.new do |test|
|
37
|
-
test.libs << 'test'
|
38
|
-
test.pattern = 'test/**/test_*.rb'
|
39
|
-
test.verbose = true
|
40
|
-
test.rcov_opts << '--exclude "gems/*"'
|
41
|
-
end
|
42
|
-
|
43
|
-
task :default => :test
|
44
|
-
|
45
|
-
require 'rake/rdoctask'
|
46
|
-
Rake::RDocTask.new do |rdoc|
|
47
|
-
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
-
|
49
|
-
rdoc.rdoc_dir = 'rdoc'
|
50
|
-
rdoc.title = "rfuzzy #{version}"
|
51
|
-
rdoc.rdoc_files.include('README*')
|
52
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
-
end
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
0.0.1
|
data/test/helper.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
require 'bundler'
|
3
|
-
begin
|
4
|
-
Bundler.setup(:default, :development)
|
5
|
-
rescue Bundler::BundlerError => e
|
6
|
-
$stderr.puts e.message
|
7
|
-
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
-
exit e.status_code
|
9
|
-
end
|
10
|
-
require 'test/unit'
|
11
|
-
require 'shoulda'
|
12
|
-
|
13
|
-
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
-
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
-
require 'rfuzzy'
|
16
|
-
|
17
|
-
class Test::Unit::TestCase
|
18
|
-
end
|