Commit a88cfc54 authored by Stephan Seitz's avatar Stephan Seitz
Browse files

Eliminate usages of old name 'equation collection' for `AssignmentCollection`

parent f1f2faee
......@@ -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"
......
......@@ -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
......
......@@ -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.
"""
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment