Class: ArrayOfNumerics

Inherits
Array show all
Defined in
lib/kyanite/enumerable/enumerable_numerics.rb

Enumeration Of Numerics

Kyanite definitions

EnumerableNumerics

Kyanite class with module included

ArrayOfNumerics

Kyanite tests and examples

TestKyaniteEnumerableNumerics

Usage

require 'kyanite/enumerable/enumerable_numerics'

Mean Values (collapse)

Sum, Product, Parallel (collapse)

Instance Method Details

- (Float) mean Also known as: avg, average, mean_arithmetric Originally defined in module EnumerableNumerics

Arithmetic mean

Tests and examples here.

Returns:

- (Float) mean_geometric Originally defined in module EnumerableNumerics

Geometric mean

Returns:

- (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.

Returns:

- (Float) parallel Originally defined in module EnumerableNumerics

Parallel

Result is equal to the total resistance of resistors in parallel circuits. Tests and examples here.

Returns:

- (Numeric) prd Originally defined in module EnumerableNumerics

Product

Tests and examples here.

Returns:

- (Numeric) summation Originally defined in module EnumerableNumerics

Sum

Tests and examples here.

Returns: