Closed aatmdelissen closed 3 years ago
Seems to make sense to me. Lets try to get the base one as little as possible indeed. Nothing comes to mind at this point that might be missing in the list.
Two thoughts:
P
is relatively sparse, right? We might consider one of the scipy.sparse
matricesYes, those common attributes can nicely be defined as class attributes, since they are the same for all instances of a certain approximation class. What are class attributes?
Nice, haven't seen that one before, but looks handy for attributes
Seems to make sense to me. Lets try to get the base one as little as possible indeed. Nothing comes to mind at this point that might be missing in the list.
Two thoughts:
P
is relatively sparse, right? We might consider one of thescipy.sparse
matrices- For common attributes it is nice to store them in the class directly I think. If there will be many (unsure if this is actually the case) then we could store them in some sort of collection, dict/list/...
The way it is now, P
is not sparse, because it includes both the P
and Q
matrices of Svanberg (i.e. ourP = svanP + svanQ
).
Done
This is to define the interface for a more abstract
Approximation
class. The current one has a lot of redundancies. We need to determine what are the most essential characteristics and requirements, shared by allApproximation
's children.xmin=0.0
andxmax=1
?), can both be given as afloat
, or anp.array
.build_sub_prob
is called.m
orn
from one call tobuild_sub_prob
to another should be accepted (?)Data storage (attributes
x
,g
,dg
and possiblyddg
(numpy referenced array, so no copy), used for the last call tobuild_sub_prob
P
matrix for intervening variablesDid I miss anything?