MathPHP\LinearAlgebra\VandermondeMatrix::__construct PHP Метод

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

Create the Vandermonde Matrix from a simple array.
public __construct ( array $M, integer $n )
$M array array (α₁, α₂, α₃ ⋯ αm)
$n integer int
    public function __construct(array $M, int $n)
    {
        $this->n = $n;
        $this->m = count($M);
        $A = [];
        foreach ($M as $row => $α) {
            for ($i = 0; $i < $n; $i++) {
                $A[$row][$i] = $α ** $i;
            }
        }
        $this->A = $A;
    }
VandermondeMatrix