protected function enforceCompleteness()
    {
        //empty matrix is ok
        if ($this->is('empty')) {
            return;
        }
        //check that each row has same number of columns
        $numcols = count($this->data[0]);
        array_walk(
                $this->data,
                function($value, $index, $matchCols) {
                    if (count($value) != $matchCols) {
                        throw new NotCompleteMatrixException($index);
                    }
                },
                $numcols);
    }