PHP Trait MathPHP\NumericalAnalysis\NumericalIntegration\Validation

Show file Open project: markrogoyski/math-php Trait Usage Examples

Public Methods

Method Description
isSpacingConstant ( array $sorted ) Ensures that the length of each subinterval is equal, or equivalently, that the spacing between each point is equal
isSubintervalsMultiple ( array $points, number $m ) Ensures that the number of subintervals is a multiple of m, or equivalently, if there are n points, that n-1 is a multiple of m

Method Details

isSpacingConstant() public static method

Ensures that the length of each subinterval is equal, or equivalently, that the spacing between each point is equal
public static isSpacingConstant ( array $sorted )
$sorted array Points sorted by (increasing) x-component

isSubintervalsMultiple() public static method

Ensures that the number of subintervals is a multiple of m, or equivalently, if there are n points, that n-1 is a multiple of m
public static isSubintervalsMultiple ( array $points, number $m )
$points array
$m number The number that n-1 should be a multiple of