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

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

Allows the creation of a ColumnVector (m × 1 Matrix) from an array instead of an array of arrays.
public __construct ( array $M )
$M array 1-dimensional array of vector values
    public function __construct(array $M)
    {
        $this->n = 1;
        $this->m = count($M);
        $A = [];
        foreach ($M as $value) {
            $A[] = [$value];
        }
        $this->A = $A;
    }