From a88cfc5462f93ec9f004425cf146e0280ea990b1 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Thu, 26 Sep 2019 15:52:19 +0200 Subject: [PATCH] Eliminate usages of old name 'equation collection' for `AssignmentCollection` --- pystencils/simp/assignment_collection.py | 6 +++--- pystencils/simp/simplifications.py | 4 ++-- pystencils/simp/simplificationstrategy.py | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pystencils/simp/assignment_collection.py b/pystencils/simp/assignment_collection.py index 82df31f..fd5c827 100644 --- a/pystencils/simp/assignment_collection.py +++ b/pystencils/simp/assignment_collection.py @@ -16,12 +16,12 @@ class AssignmentCollection: These simplification methods can change the subexpressions, but the number and left hand side of the main equations themselves is not altered. Additionally a dictionary of simplification hints is stored, which are set by the functions that create - equation collections to transport information to the simplification system. + assignment collections to transport information to the simplification system. Attributes: main_assignments: list of assignments subexpressions: list of assignments defining subexpressions used in main equations - simplification_hints: dict that is used to annotate the equation collection with hints that are + simplification_hints: dict that is used to annotate the assignment collection with hints that are used by the simplification system. See documentation of the simplification rules for potentially required hints and their meaning. subexpression_symbol_generator: generator for new symbols that are used when new subexpressions are added @@ -344,7 +344,7 @@ class AssignmentCollection: return result def __repr__(self): - return "Equation Collection for " + ",".join([str(eq.lhs) for eq in self.main_assignments]) + return "Assignment Collection for " + ",".join([str(eq.lhs) for eq in self.main_assignments]) def __str__(self): result = "Subexpressions:\n" diff --git a/pystencils/simp/simplifications.py b/pystencils/simp/simplifications.py index 3d2f57c..e2fbbbf 100644 --- a/pystencils/simp/simplifications.py +++ b/pystencils/simp/simplifications.py @@ -30,10 +30,10 @@ def sort_assignments_topologically(assignments: Sequence[Union[Assignment, Node] def sympy_cse(ac): - """Searches for common subexpressions inside the equation collection. + """Searches for common subexpressions inside the assignment collection. Searches is done in both the existing subexpressions as well as the assignments themselves. - It uses the sympy subexpression detection to do this. Return a new equation collection + It uses the sympy subexpression detection to do this. Return a new assignment collection with the additional subexpressions found """ symbol_gen = ac.subexpression_symbol_generator diff --git a/pystencils/simp/simplificationstrategy.py b/pystencils/simp/simplificationstrategy.py index d9bcafa..2c70c25 100644 --- a/pystencils/simp/simplificationstrategy.py +++ b/pystencils/simp/simplificationstrategy.py @@ -9,8 +9,8 @@ from pystencils.simp.assignment_collection import AssignmentCollection class SimplificationStrategy: """A simplification strategy is an ordered collection of simplification rules. - Each simplification is a function taking an equation collection, and returning a new simplified - equation collection. The strategy can nicely print intermediate simplification stages and results + Each simplification is a function taking an assignment collection, and returning a new simplified + assignment collection. The strategy can nicely print intermediate simplification stages and results to Jupyter notebooks. """ -- GitLab