public function __construct(array $M, int $n)
{
$this->n = $n;
$this->m = count($M);
if ($this->m !== $this->n) {
throw new Exception\MatrixException('n must equal m for square Vandermonde Matrix');
}
$A = [];
foreach ($M as $row => $α) {
for ($i = 0; $i < $n; $i++) {
$A[$row][$i] = $α ** $i;
}
}
$this->A = $A;
}