I'm looking for a library but I'm not sure what to search for because I'm not sure what to call the task I want to do (in such a way that it's searchable).
Example of functionality
I have a number of matrix equations involving a single operation (multiplication), with some common elements in them, for example:
result_1 = a * b * c * e
result_2 = b * c
result_3 = c * e * f
There are no unknowns here; we're just calculating the result_n
items.
These multiplications are expensive to perform so I'm wanting a library that lets me set up the equations and the values of a
, b
, etc, then retrieve the result
items.
Most crucially, I also need to then be able to say "I am updating values (for example) a
and f
", and have the library not do any unnecessary calcualtion; it would not bother recalculating result_2
(as the answer won't change), and it wouldn't not bother recalculating sub-terms b * c * e
(in result_1
) or c * e
(in result_3
) as these parts will be not different either.
Is there a good name for this kind of facility?
Ideally it would also be able to handle different operators (e.g. binary *
and unary transpose
) and you could specify properties of operators, e.g. "*
does not commute, but is associative". Knowing these properties would allow the lib to sometimes do a more efficient job.