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
파일 보기 프로젝트 열기: markrogoyski/math-php

공개 메소드들

메소드 설명
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