stair_car 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -140,6 +140,8 @@ Math is simple, just use the standard +,-,/ * does matrix multiplication and **
140
140
 
141
141
  Transpose can be done with either matrix.transpose or ~matrix
142
142
 
143
+ Do matrix.inv to invert a matrix.
144
+
143
145
  ### Stats
144
146
 
145
147
  All stats operations can operate on the whole matrix, or just the columns or the rows. Just pass in a dimension to specify cols or rows (rows = 0, cols = 1)
@@ -8,6 +8,7 @@ require 'stair_car/shared/inspect'
8
8
  require 'stair_car/shared/indicies'
9
9
  require 'stair_car/shared/init_methods'
10
10
  require 'stair_car/shared/errors'
11
+ require 'stair_car/shared/methods'
11
12
 
12
13
 
13
14
  module StairCar
@@ -20,6 +21,7 @@ module StairCar
20
21
  include Inspect
21
22
  include Indicies
22
23
  include InitMethods
24
+ include Methods
23
25
 
24
26
  attr_accessor :data
25
27
 
@@ -0,0 +1,11 @@
1
+ module StairCar
2
+ module Methods
3
+ def abs
4
+ self.map {|v| v.abs }
5
+ end
6
+
7
+ def sqrt
8
+ self.map {|v| Math.sqrt(v) }
9
+ end
10
+ end
11
+ end
@@ -10,6 +10,7 @@ require 'stair_car/shared/inspect'
10
10
  require 'stair_car/shared/indicies'
11
11
  require 'stair_car/shared/init_methods'
12
12
  require 'stair_car/shared/errors'
13
+ require 'stair_car/shared/methods'
13
14
 
14
15
  module StairCar
15
16
  class UMatrix
@@ -22,6 +23,7 @@ module StairCar
22
23
  include Inspect
23
24
  include Indicies
24
25
  include InitMethods
26
+ include Methods
25
27
 
26
28
  attr_accessor :data
27
29
 
data/lib/stair_car.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # Main StairCar module, include to get shortcuts for creating PMatrix's
2
+
1
3
  require 'java'
2
4
  require 'stair_car/pmatrix/pmatrix'
3
5
  require 'stair_car/umatrix/umatrix'
data/stair_car.gemspec CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
5
  Gem::Specification.new do |gem|
6
6
  gem.name = "stair_car"
7
- gem.version = "0.1.0"
7
+ gem.version = "0.1.1"
8
8
  gem.authors = ["Ryan Stout"]
9
9
  gem.email = ["ryanstout@gmail.com"]
10
10
  gem.description = "StairCar is a fully featured matrix library for jruby (think matlab or numpy)"
@@ -16,4 +16,5 @@ Gem::Specification.new do |gem|
16
16
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
17
17
  gem.require_paths = ["lib"]
18
18
  gem.add_development_dependency "rspec"
19
+ gem.add_development_dependency 'rdoc', '~> 3.12'
19
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stair_car
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
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-12-29 00:00:00.000000000 Z
12
+ date: 2013-01-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
@@ -29,6 +29,22 @@ dependencies:
29
29
  none: false
30
30
  prerelease: false
31
31
  type: :development
32
+ - !ruby/object:Gem::Dependency
33
+ name: rdoc
34
+ version_requirements: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ~>
37
+ - !ruby/object:Gem::Version
38
+ version: '3.12'
39
+ none: false
40
+ requirement: !ruby/object:Gem::Requirement
41
+ requirements:
42
+ - - ~>
43
+ - !ruby/object:Gem::Version
44
+ version: '3.12'
45
+ none: false
46
+ prerelease: false
47
+ type: :development
32
48
  description: StairCar is a fully featured matrix library for jruby (think matlab or numpy)
33
49
  email:
34
50
  - ryanstout@gmail.com
@@ -65,6 +81,7 @@ files:
65
81
  - lib/stair_car/shared/init_methods.rb
66
82
  - lib/stair_car/shared/inspect.rb
67
83
  - lib/stair_car/shared/iteration.rb
84
+ - lib/stair_car/shared/methods.rb
68
85
  - lib/stair_car/umatrix/compare.rb
69
86
  - lib/stair_car/umatrix/matrix_math.rb
70
87
  - lib/stair_car/umatrix/transforms.rb
@@ -119,3 +136,4 @@ test_files:
119
136
  - spec/umatrix/matrix_math_spec.rb
120
137
  - spec/umatrix/transform_spec.rb
121
138
  - spec/umatrix/umatrix_spec.rb
139
+ has_rdoc: