Class: ArrayOfNumerics
- Includes
- EnumerableNumerics
- Defined in
- lib/kyanite/enumerable/enumerable_numerics.rb
Enumeration Of Numerics
- Kyanite definitions
- Kyanite class with module included
- Kyanite tests and examples
- Usage
-
require 'kyanite/enumerable/enumerable_numerics'
Mean Values (collapse)
-
- (Float) mean
(also: #avg, #average, #mean_arithmetric)
Arithmetic mean.
-
- (Float) mean_geometric
Geometric mean.
-
- (Float) mean_harmonic(options = {})
Harmonic mean.
Sum, Product, Parallel (collapse)
-
- (Float) parallel
Parallel.
-
- (Numeric) prd
Product.
-
- (Numeric) summation
Sum.
Instance Method Details
- (Float) mean Also known as: avg, average, mean_arithmetric Originally defined in module EnumerableNumerics
Arithmetic mean
Tests and examples here.
- (Float) mean_geometric Originally defined in module EnumerableNumerics
Geometric mean
- (Float) mean_harmonic(options = {}) Originally defined in module EnumerableNumerics
Harmonic mean
Usually, the harmonic mean is defined only for positive numbers. The option :allow_negative => true can also include negative numbers in the calculation. Then the result will be a weighted arithmetic mean of the harmonic mean of all positive elements and the harmonic mean of all negative elements.
- (Float) parallel Originally defined in module EnumerableNumerics
Parallel
Result is equal to the total resistance of resistors in parallel circuits. Tests and examples here.
- (Numeric) prd Originally defined in module EnumerableNumerics
Product
Tests and examples here.
- (Numeric) summation Originally defined in module EnumerableNumerics
Sum
Tests and examples here.