graph-function 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/LICENSE.txt +21 -0
- data/README.md +108 -0
- data/Rakefile +6 -0
- data/bin/console +7 -0
- data/bin/setup +8 -0
- data/custom_comparison.jpg +0 -0
- data/graph-function.gemspec +29 -0
- data/lib/graph/function/comparison.rb +44 -0
- data/lib/graph/function/ints_comparison.rb +44 -0
- data/lib/graph/function/only.rb +39 -0
- data/lib/graph/function/plot_config.rb +12 -0
- data/lib/graph/function/reformat_string.rb +12 -0
- data/lib/graph/function/version.rb +5 -0
- data/lib/graph/function.rb +37 -0
- data/single_func.jpg +0 -0
- data/two_func.jpg +0 -0
- metadata +179 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 5c946f96f1d2b6ad1677597932a09d73718cd212
|
4
|
+
data.tar.gz: 1384ddf665e7264e443cadbe244d1b891de6fa38
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: dd6abd630322b75eb5c39b0f93db4e93cc9982a3d0befee797e633fda804317bc3ca91e396e1285d9aa80456cdbfb1e29fd5bf0a1f2f50ebb35db3348df5efd3
|
7
|
+
data.tar.gz: f92d97f294452485d1ba65b6023b4c5ca7e0d1147eb070bc10c0801b8ab3021e7e699f3566aba4d9e38a21d9a2835aaf7a3058f1a3772a0b3e1a736072ee215e
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at your_email@example.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2016 Alex Moore-Niemi
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 Billy Everyteen
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,108 @@
|
|
1
|
+
# Graph::Function
|
2
|
+
|
3
|
+
When I work on katas and exercises I found I often wanted to compare my implementations. After doing so a half dozen times I noticed some patterns, and figured it'd be valuable to capture those into an easier API to work with.
|
4
|
+
|
5
|
+
## Disclaimer
|
6
|
+
|
7
|
+
Because of the current implementation details: Ruby methods which operate on `self` **will not work**, and there is a negligible constant slow down on all functions tested because of use of `send(:func)`. The latter won't corrupt comparisons, but means you don't want to use this to benchmark functions individually except through `Graph::Function::Only`.
|
8
|
+
|
9
|
+
## Installation
|
10
|
+
|
11
|
+
Because this gem depends on `gnuplot` and `xquartz`, we need to follow their [prereq steps](https://github.com/rdp/ruby_gnuplot#pre-requisites-and-installation):
|
12
|
+
|
13
|
+
```
|
14
|
+
# these will vary by your system, mine is mac
|
15
|
+
brew install Caskroom/cask/xquartz
|
16
|
+
brew install gnuplot --with-x11
|
17
|
+
# verify you have x11
|
18
|
+
xpdyinfo | grep version
|
19
|
+
```
|
20
|
+
|
21
|
+
Now we're set. Add this line to your application's Gemfile:
|
22
|
+
|
23
|
+
```ruby
|
24
|
+
gem 'graph-function'
|
25
|
+
```
|
26
|
+
|
27
|
+
And then execute:
|
28
|
+
|
29
|
+
$ bundle
|
30
|
+
|
31
|
+
Or install it yourself as:
|
32
|
+
|
33
|
+
$ gem install graph-function
|
34
|
+
|
35
|
+
## Usage
|
36
|
+
|
37
|
+
To set up, you only need the following:
|
38
|
+
|
39
|
+
```ruby
|
40
|
+
require 'graph/function'
|
41
|
+
Graph::Function.configure
|
42
|
+
```
|
43
|
+
|
44
|
+
If you don't want to output to x11, just set `config.terminal` to a different option like `jpg`. Output is the file location of output, and is ignored for x11.
|
45
|
+
|
46
|
+
```ruby
|
47
|
+
Graph::Function.configure do |config|
|
48
|
+
config.terminal = 'jpg'
|
49
|
+
config.output = File.expand_path('../your_graph_name.jpg', __FILE__)
|
50
|
+
end
|
51
|
+
```
|
52
|
+
|
53
|
+
For most use cases, you'll be creating a `Graph::Function::Comparison` and executing `#of` on it to provide it with `Method` objects that operate on the same parameter types<sup id="a1">[1](#f1)</sup>. `Comparison` and `Only` take a generator when initialized, but because `IntsComparison` does not, `.of` is a class method instead.
|
54
|
+
|
55
|
+
The simplest usage (suitable for a large class of exercises, in my experience) is if you're comparing two functions that take a single argument of `Array[Int]` type:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
c = YourClass.new # this class has #function_name_one & #function_name_two
|
59
|
+
Graph::Function::IntsComparison.of(c.method(:function_name_one), c.method(:function_name_two))
|
60
|
+
# => will output an xquartz graph
|
61
|
+
```
|
62
|
+
|
63
|
+
![comparison](two_func.jpg)
|
64
|
+
|
65
|
+
If your functions need to operate on other types, then you need to generate values of those types. For this, I use [Rantly](https://github.com/hayeah/rantly). Here's an example of comparing two functions that take `Hash{String => Integer}`:
|
66
|
+
|
67
|
+
```ruby
|
68
|
+
generator = proc {|size| Rantly { dict(size) { [string, integer] } }
|
69
|
+
dict_comparison = Graph::Function::Comparison.new(generator)
|
70
|
+
# CustomComparison can take any number of Methods
|
71
|
+
dict_comparison.of(method(:hash_func_one), method(:hash_func_two))
|
72
|
+
# => will output an xquartz graph
|
73
|
+
```
|
74
|
+
|
75
|
+
![comparison](custom_comparison.jpg)
|
76
|
+
|
77
|
+
If you want to make use of more "real" fake data, [Faker](https://github.com/stympy/faker) is included, and can be used like so:
|
78
|
+
|
79
|
+
```ruby
|
80
|
+
faker_generator = proc {|size| Rantly(size) { call(Proc.new { Faker::Date.backward(14) }) }
|
81
|
+
# using Only here, but anything that takes a generator can take one with Faker
|
82
|
+
graph = Graph::Function::Only.new(faker_generator)
|
83
|
+
graph.of(method(:custom_types))
|
84
|
+
# => will output an xquartz graph
|
85
|
+
```
|
86
|
+
|
87
|
+
The only downside here is that you can't parameterize `Faker`, but you could use random generators to mix it up. Using the above example, `graph-function` won't pass anything into the `faker_generator` but the `size`, so if we want the value to change, we could use `Faker::Date.backward(proc { rand(10) }.call)`.
|
88
|
+
|
89
|
+
Check out the [spec file](spec/graph/function_spec.rb) to see all of these and more examples.
|
90
|
+
|
91
|
+
## Development
|
92
|
+
|
93
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
94
|
+
|
95
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
96
|
+
|
97
|
+
## Contributing
|
98
|
+
|
99
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/mooreniemi/graph-function. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
100
|
+
|
101
|
+
|
102
|
+
## License
|
103
|
+
|
104
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
105
|
+
|
106
|
+
## Footnotes
|
107
|
+
|
108
|
+
<b id="f1">1</b> Why are we constrained to testing the same parameter types? The intent of this library is to graph _implementations_. Changing parameter types suggests a change in the _behavior_ of the function. That doesn't make for a very productive comparison. [↩](#a1)
|
data/Rakefile
ADDED
data/bin/console
ADDED
data/bin/setup
ADDED
Binary file
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'graph/function/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'graph-function'
|
8
|
+
spec.version = Graph::Function::VERSION
|
9
|
+
spec.authors = ['Alex Moore-Niemi']
|
10
|
+
spec.email = ['moore.niemi@gmail.com']
|
11
|
+
|
12
|
+
spec.summary = %q{Graph function performance.}
|
13
|
+
spec.description = %q{Using gnuplot and Ruby's benchmarking abilities, see the asymptotic behavior of your functions graphed.}
|
14
|
+
spec.homepage = 'http://github.com/mooreniemi/graph-function'
|
15
|
+
spec.license = 'MIT'
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = 'exe'
|
19
|
+
spec.require_paths = ['lib']
|
20
|
+
|
21
|
+
spec.add_dependency 'gnuplot'
|
22
|
+
spec.add_dependency 'rantly'
|
23
|
+
spec.add_dependency 'faker'
|
24
|
+
spec.add_dependency 'benchmark-memory'
|
25
|
+
spec.add_development_dependency 'bundler', '~> 1.12'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
28
|
+
spec.add_development_dependency 'pry'
|
29
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Graph
|
2
|
+
module Function
|
3
|
+
class Comparison
|
4
|
+
include ReformatString
|
5
|
+
include PlotConfig
|
6
|
+
attr_accessor :data_generator
|
7
|
+
|
8
|
+
def initialize(generator)
|
9
|
+
@data_generator = generator
|
10
|
+
end
|
11
|
+
|
12
|
+
def of(*methods)
|
13
|
+
fail unless methods.all? {|m| m.is_a?(Method) }
|
14
|
+
|
15
|
+
methods.each do |m|
|
16
|
+
self.class.send(:define_method, m.name, proc(&m))
|
17
|
+
end
|
18
|
+
|
19
|
+
Gnuplot.open do |gp|
|
20
|
+
Gnuplot::Plot.new(gp) do |plot|
|
21
|
+
|
22
|
+
plot.title "#{methods.map {|m| camel_title(m.name) }.join(', ') }"
|
23
|
+
set_up(plot)
|
24
|
+
|
25
|
+
x = (0..10000).step(1000).to_a
|
26
|
+
|
27
|
+
methods.each do |m|
|
28
|
+
y = x.collect do |v|
|
29
|
+
data = data_generator.call(v)
|
30
|
+
# FIXME can i get ride of the cost of `send`?
|
31
|
+
Benchmark.measure { self.send(m.name, data) }.real
|
32
|
+
end
|
33
|
+
|
34
|
+
plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds|
|
35
|
+
ds.with = "linespoints"
|
36
|
+
ds.title = "#{escape_underscores(m.name)}"
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
module Graph
|
2
|
+
module Function
|
3
|
+
class IntsComparison
|
4
|
+
extend ReformatString
|
5
|
+
extend PlotConfig
|
6
|
+
|
7
|
+
def self.of(method_one, method_two)
|
8
|
+
fail unless method_one.is_a?(Method) && method_two.is_a?(Method)
|
9
|
+
|
10
|
+
Gnuplot.open do |gp|
|
11
|
+
Gnuplot::Plot.new(gp) do |plot|
|
12
|
+
self.class.send(:define_method, :a, proc(&method_one))
|
13
|
+
self.class.send(:define_method, :b, proc(&method_two))
|
14
|
+
|
15
|
+
plot.title "#{camel_title(method_one.name)} vs #{camel_title(method_two.name)}"
|
16
|
+
set_up(plot)
|
17
|
+
|
18
|
+
x = (0..10000).step(1000).to_a
|
19
|
+
|
20
|
+
y = x.collect do |v|
|
21
|
+
array = (0..v - 1).to_a.shuffle
|
22
|
+
Benchmark.measure { a(array) }.real
|
23
|
+
end
|
24
|
+
|
25
|
+
plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds|
|
26
|
+
ds.with = "linespoints"
|
27
|
+
ds.title = "#{escape_underscores(method_one.name)}"
|
28
|
+
end
|
29
|
+
|
30
|
+
z = x.collect do |v|
|
31
|
+
array = (0..v - 1).to_a.shuffle
|
32
|
+
Benchmark.measure { b(array) }.real
|
33
|
+
end
|
34
|
+
|
35
|
+
plot.data << Gnuplot::DataSet.new( [x, z] ) do |ds|
|
36
|
+
ds.with = "linespoints"
|
37
|
+
ds.title = "#{escape_underscores(method_two.name)}"
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module Graph
|
2
|
+
module Function
|
3
|
+
class Only
|
4
|
+
include ReformatString
|
5
|
+
include PlotConfig
|
6
|
+
attr_accessor :data_generator
|
7
|
+
|
8
|
+
def initialize(generator)
|
9
|
+
@data_generator = generator
|
10
|
+
end
|
11
|
+
|
12
|
+
def of(method_obj)
|
13
|
+
fail unless method_obj.is_a?(Method)
|
14
|
+
|
15
|
+
self.class.send(:define_method, :a, proc(&method_obj))
|
16
|
+
|
17
|
+
Gnuplot.open do |gp|
|
18
|
+
Gnuplot::Plot.new(gp) do |plot|
|
19
|
+
|
20
|
+
plot.title "#{camel_title(method_obj.name)}"
|
21
|
+
set_up(plot)
|
22
|
+
|
23
|
+
x = (0..10000).step(1000).to_a
|
24
|
+
|
25
|
+
y = x.collect do |v|
|
26
|
+
data = data_generator.call(v)
|
27
|
+
Benchmark.measure { a(data) }.real
|
28
|
+
end
|
29
|
+
|
30
|
+
plot.data << Gnuplot::DataSet.new( [x, y] ) do |ds|
|
31
|
+
ds.with = "linespoints"
|
32
|
+
ds.title = "#{escape_underscores(method_obj.name)}"
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
module Graph
|
2
|
+
module Function
|
3
|
+
module PlotConfig
|
4
|
+
def set_up(plot)
|
5
|
+
plot.ylabel 'execution time'
|
6
|
+
plot.xlabel 'input size'
|
7
|
+
plot.terminal (t = Graph::Function.configuration.terminal)
|
8
|
+
plot.output Graph::Function.configuration.output unless t == 'x11'
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'gnuplot'
|
2
|
+
require 'benchmark'
|
3
|
+
require 'rantly'
|
4
|
+
require 'faker'
|
5
|
+
|
6
|
+
require 'graph/function/version'
|
7
|
+
require 'graph/function/reformat_string'
|
8
|
+
require 'graph/function/plot_config'
|
9
|
+
require 'graph/function/only'
|
10
|
+
require 'graph/function/comparison'
|
11
|
+
require 'graph/function/ints_comparison'
|
12
|
+
|
13
|
+
module Graph
|
14
|
+
module Function
|
15
|
+
# https://robots.thoughtbot.com/mygem-configure-block
|
16
|
+
class << self
|
17
|
+
attr_accessor :configuration
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.configure
|
21
|
+
self.configuration ||= Configuration.new
|
22
|
+
yield(configuration) if block_given?
|
23
|
+
end
|
24
|
+
|
25
|
+
class Configuration
|
26
|
+
attr_accessor :terminal, :output
|
27
|
+
|
28
|
+
# defaults
|
29
|
+
# see https://github.com/rdp/ruby_gnuplot/blob/master/examples/output_image_file.rb
|
30
|
+
# or http://mibai.tec.u-ryukyu.ac.jp/~oshiro/Doc/gnuplot_primer/gptermcmp.html
|
31
|
+
def initialize
|
32
|
+
@terminal = 'x11'
|
33
|
+
@output = '.'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/single_func.jpg
ADDED
Binary file
|
data/two_func.jpg
ADDED
Binary file
|
metadata
ADDED
@@ -0,0 +1,179 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: graph-function
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Alex Moore-Niemi
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: gnuplot
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rantly
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: faker
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: benchmark-memory
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: bundler
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.12'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.12'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rake
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '10.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '10.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '3.0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '3.0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Using gnuplot and Ruby's benchmarking abilities, see the asymptotic behavior
|
126
|
+
of your functions graphed.
|
127
|
+
email:
|
128
|
+
- moore.niemi@gmail.com
|
129
|
+
executables: []
|
130
|
+
extensions: []
|
131
|
+
extra_rdoc_files: []
|
132
|
+
files:
|
133
|
+
- ".gitignore"
|
134
|
+
- ".rspec"
|
135
|
+
- ".travis.yml"
|
136
|
+
- CODE_OF_CONDUCT.md
|
137
|
+
- Gemfile
|
138
|
+
- LICENSE
|
139
|
+
- LICENSE.txt
|
140
|
+
- README.md
|
141
|
+
- Rakefile
|
142
|
+
- bin/console
|
143
|
+
- bin/setup
|
144
|
+
- custom_comparison.jpg
|
145
|
+
- graph-function.gemspec
|
146
|
+
- lib/graph/function.rb
|
147
|
+
- lib/graph/function/comparison.rb
|
148
|
+
- lib/graph/function/ints_comparison.rb
|
149
|
+
- lib/graph/function/only.rb
|
150
|
+
- lib/graph/function/plot_config.rb
|
151
|
+
- lib/graph/function/reformat_string.rb
|
152
|
+
- lib/graph/function/version.rb
|
153
|
+
- single_func.jpg
|
154
|
+
- two_func.jpg
|
155
|
+
homepage: http://github.com/mooreniemi/graph-function
|
156
|
+
licenses:
|
157
|
+
- MIT
|
158
|
+
metadata: {}
|
159
|
+
post_install_message:
|
160
|
+
rdoc_options: []
|
161
|
+
require_paths:
|
162
|
+
- lib
|
163
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
164
|
+
requirements:
|
165
|
+
- - ">="
|
166
|
+
- !ruby/object:Gem::Version
|
167
|
+
version: '0'
|
168
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
169
|
+
requirements:
|
170
|
+
- - ">="
|
171
|
+
- !ruby/object:Gem::Version
|
172
|
+
version: '0'
|
173
|
+
requirements: []
|
174
|
+
rubyforge_project:
|
175
|
+
rubygems_version: 2.4.5.1
|
176
|
+
signing_key:
|
177
|
+
specification_version: 4
|
178
|
+
summary: Graph function performance.
|
179
|
+
test_files: []
|