PHP Класс MathPHP\Probability\CombinatoricsAxiomsTest

If all the combinatorics math is implemented properly, these tests should all work out according to the axioms. Axioms tested: - Lah numbers, rising and falling factorials - x⁽ⁿ⁾ = ∑ L⟮n,k⟯ x₍k₎ - x₍n₎ = ∑ (-1)ⁿ⁻ᵏ L(n,k) x⁽ᵏ⁾ - L(n,1) = n! - L(n,2) = (n - 1)n! / 2 - L(n,n) = 1
Наследование: extends PHPUnit_Framework_TestCase
Показать файл Открыть проект

Открытые методы

Метод Описание
dataProivderForLahNumberIdentities ( )
dataProivderForLahNumbers ( )
testFallingFactorialAsLahNumberAndRisingFactorial ( integer $x, $n ) Axiom: x₍n₎ = ∑ (-1)ⁿ⁻ᵏ L(n,k) x⁽ᵏ⁾ Falling factorial can be represented as the summation of Lah numbers and rising factorials
testLahNumberIdentityKEqualsOne ( integer $n ) Axiom: L(n,1) = n! Lah number identity when k is 1
testLahNumberIdentityKEqualsTwo ( integer $n ) Axiom: L(n,2) = (n - 1)n! / 2 Lah number identity when k is 2
testLahNumberIdentityNNEqualsOne ( integer $n ) Axiom: L(n,n) = 1 Lah number identity when n = n
testRisingFactorialAsLahNumberAndFallingFactorial ( integer $x, $n ) Axiom: x⁽ⁿ⁾ = L⟮n,k⟯ x₍k₎ Rising factorial can be represented as the summation of Lah numbers and falling factorials

Описание методов

dataProivderForLahNumberIdentities() публичный Метод

dataProivderForLahNumbers() публичный Метод

testFallingFactorialAsLahNumberAndRisingFactorial() публичный Метод

Axiom: x₍n₎ = ∑ (-1)ⁿ⁻ᵏ L(n,k) x⁽ᵏ⁾ Falling factorial can be represented as the summation of Lah numbers and rising factorials

testLahNumberIdentityKEqualsOne() публичный Метод

Axiom: L(n,1) = n! Lah number identity when k is 1

testLahNumberIdentityKEqualsTwo() публичный Метод

Axiom: L(n,2) = (n - 1)n! / 2 Lah number identity when k is 2

testLahNumberIdentityNNEqualsOne() публичный Метод

Axiom: L(n,n) = 1 Lah number identity when n = n

testRisingFactorialAsLahNumberAndFallingFactorial() публичный Метод

Axiom: x⁽ⁿ⁾ = L⟮n,k⟯ x₍k₎ Rising factorial can be represented as the summation of Lah numbers and falling factorials