def _increment(self, data, verbose):
        # Empty memory
        self.precision = 0

        # Select correct method to create the precision matrix based on the
        # graph type and the sparse flag
        if self.graph.n_edges == 0:
            if self.sparse:
                constructor = _increment_sparse_diagonal_precision
            else:
                constructor = _increment_dense_diagonal_precision
        else:
            if self.sparse:
                constructor = partial(_increment_sparse_precision,
                                      mode=self.mode)
            else:
                constructor = partial(_increment_dense_precision,
                                      mode=self.mode)

        # Create the precision matrix and optionally store the covariance
        # matrices
        self.precision, self._covariance_matrices = constructor(
            data, self.mean_vector, self._covariance_matrices, self.n_samples,
            self.graph, self.n_features, self.n_features_per_vertex,
            dtype=self.dtype, n_components=self.n_components, bias=self.bias,
            verbose=verbose)

        # Update mean and number of samples
        self.mean_vector = _increment_multivariate_gaussian_mean(
            data, self.mean_vector, self.n_samples)
        self.n_samples += data.shape[0]
dataset/ETHPy150Open menpo/menpo/menpo/model/gmrf.py/GMRFVectorModel._increment/original