math_probability 0.1.0 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 976113faf8a6edfd576c176235f77053a00ad18a
4
- data.tar.gz: 45869b1ad0f2dbd6364870653b3c303fd476fdf9
3
+ metadata.gz: 512ad96cd9913406ad58ea4fbeefa4d09e13032f
4
+ data.tar.gz: 857404e2821e0b4b0dec8077340b35f2b87d0a17
5
5
  SHA512:
6
- metadata.gz: 38d020d75ab0cc1f6b9158a1d1cd1ff20f268f50d95eff6aa1fc027cba824b65a9bda46713660c4b83729ac4d68d89c7471464d05996c41538ae2e3baf7fc5b1
7
- data.tar.gz: 07fb919f898894902f8662e424c757b027ad8358e76bf62c94915ee2131d105de6538487cbed4983d3b637bba00901f281708b74c6eee72b826df208d7f9f25d
6
+ metadata.gz: 606b30f62503ca92d8804887298bab08304db167417a5617fe9dd2be18080349ececf8da413fb9d19ce8c55ed6dce7a1ff2f516eef5079d0baf17f63cb99f503
7
+ data.tar.gz: 12649f47c02bc83d8eab0a36cddaf90d2ac91fa7489b068da1186b6d1ca88d56bd328ffa7782b5712a355e6acd0e57dbe3925fcd1219b4dbbd1758e788cece09
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.gem
2
2
  *.rbc
3
+ *.DS_Store
3
4
  .bundle
4
5
  .config
5
6
  .yardoc
@@ -15,3 +16,4 @@ spec/reports
15
16
  test/tmp
16
17
  test/version_tmp
17
18
  tmp
19
+ coverage
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # MathProbability
2
2
 
3
3
  [![Build Status](https://travis-ci.org/polysaturate/math_probability.png?branch=master)](https://travis-ci.org/polysaturate/math_probability)
4
+ [![Coverage Status](https://coveralls.io/repos/polysaturate/math_probability/badge.png?branch=master)](https://coveralls.io/r/polysaturate/math_probability?branch=master)
5
+ [![Code Climate](https://codeclimate.com/github/polysaturate/math_probability.png)](https://codeclimate.com/github/polysaturate/math_probability)
4
6
 
5
7
  Quickly find factorals, summnations, permutations, combanations and probability answers
6
8
 
@@ -19,8 +21,37 @@ Or install it yourself as:
19
21
  $ gem install math_probability
20
22
 
21
23
  ## Usage
22
-
23
- TODO: Write usage instructions here
24
+ General Usage:
25
+
26
+ 5.factoral
27
+ => 120
28
+ prob = MathProbability::Probability
29
+
30
+ Sigma(Summation) | Usage: sigma(start, end, formula)
31
+
32
+ prob.sigma(1,4,"4*x-3")
33
+ => 28
34
+
35
+ Permutation without repeating | Usage permutation_no_repeat(objects, at_a_time)
36
+
37
+ prob.permutations_no_repeat(8,5)
38
+ => 6720
39
+
40
+ Permutation with repeating | Usage permutation_no_repeat(objects, at_a_time)
41
+
42
+ prob.permutations_with_repeat(8,5)
43
+ => 32768
44
+
45
+ Combinations | Usage combinations(objects, at_a_time)
46
+
47
+ prob.combinations(10,4)
48
+ => 210
49
+
50
+ Probability | Usage probability(choices, outcomes)
51
+
52
+ prob.probability(1,4)
53
+ => [0.25, "25.0%", "1/4"]
54
+
24
55
 
25
56
  ## Contributing
26
57
 
@@ -1,3 +1,3 @@
1
1
  module MathProbability
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
data/test/test_helper.rb CHANGED
@@ -1,10 +1,12 @@
1
+ require 'simplecov'
2
+ require 'coveralls'
3
+ SimpleCov.formatter = Coveralls::SimpleCov::Formatter
4
+ SimpleCov.start
5
+
1
6
  require 'rubygems'
2
7
  gem 'minitest'
3
8
 
4
9
  require 'minitest/spec'
5
10
  require 'minitest/autorun'
6
11
 
7
- require 'coveralls'
8
- Coveralls.wear!
9
-
10
12
  require File.expand_path('../../lib/math_probability.rb', __FILE__)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: math_probability
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rob Race