def _calculate_index_independent_matrix(self, label: str, dataset_model: DatasetModel): matrix = calculate_matrix(dataset_model, {}) self._group._matrices[label] = matrix if not dataset_model.has_global_model(): reduced_matrix = reduce_matrix(matrix, self._group.model, self._group.parameters, None) self._group._reduced_matrices[label] = reduced_matrix
def _calculate_index_dependent_matrix(self, label: str, dataset_model: DatasetModel): self._group._matrices[label] = [] self._group._reduced_matrices[label] = [] for i, index in enumerate(dataset_model.get_global_axis()): matrix = calculate_matrix( dataset_model, {dataset_model.get_global_dimension(): i}, ) self._group._matrices[label].append(matrix) if not dataset_model.has_global_model(): reduced_matrix = reduce_matrix(matrix, self._group.model, self._group.parameters, index) self._group._reduced_matrices[label].append(reduced_matrix)