pretty_gsl 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
- # PrettyGLS
1
+ # PrettyGSL
2
2
 
3
- This gem provides a nice interface to the GNU scientific library through the Ruby/GSL wrapper. I've simply attempted to update the interface to use more idiomatic ruby.
3
+ This gem provides a nice interface to the <a href = 'http://rb-gsl.rubyforge.org/'>GNU scientific library</a> through the <a href = 'http://www.gnu.org/software/gsl/manual/html_node/'>Ruby/GSL</a> wrapper. I've simply attempted to update the interface to use more idiomatic ruby.
4
4
 
5
5
  ## Installation
6
6
 
@@ -1,4 +1,5 @@
1
1
  require 'gsl'
2
2
  require "pretty_gsl/version"
3
3
  require "pretty_gsl/minimizer"
4
+ require 'logger'
4
5
 
@@ -13,8 +13,10 @@ module PrettyGSL
13
13
  step_size: 0.01, # initial guess of the length scale of the minimiztion steps
14
14
  direction_tolerance: 1e-4, # the tolerance for errors in the direction of line minimization
15
15
  absolute_gradient_tolerance: 1e-3, # halt if the magnetude of the gradient falls below this value
16
+ logger: nil, # logger target
16
17
  }.merge(options)
17
18
  @result = nil
19
+ @logger = Logger.new(@params[:logger])
18
20
  self
19
21
  end
20
22
 
@@ -23,6 +25,7 @@ module PrettyGSL
23
25
  @params[:max_iterations].times do |iter|
24
26
  status = minimizer.iterate
25
27
  status = test_gsl_convergence(minimizer)
28
+ @logger.info minimizer.x.to_a.inspect
26
29
  if status != CONTINUE
27
30
  @result = {
28
31
  success: status == SUCCESS,
@@ -1,3 +1,3 @@
1
1
  module PrettyGSL
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pretty_gsl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-10-02 00:00:00.000000000 Z
12
+ date: 2012-10-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gsl
@@ -42,6 +42,7 @@ files:
42
42
  - lib/pretty_gsl.rb
43
43
  - lib/pretty_gsl/minimizer.rb
44
44
  - lib/pretty_gsl/version.rb
45
+ - pretty_gsl-0.0.1.gem
45
46
  - pretty_gsl.gemspec
46
47
  - test/minimizer_test.rb
47
48
  - test/test_helper.rb