artofscience / SAOR

Sequential Approximate Optimization Repository
GNU General Public License v3.0
5 stars 1 forks source link

Define most basic abstract `Approximation` class #24

Closed aatmdelissen closed 3 years ago

aatmdelissen commented 3 years ago

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 all Approximation's children.

Data storage (attributes

Did I miss anything?

MaxvdKolk commented 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:

aatmdelissen commented 3 years ago

Yes, 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?

MaxvdKolk commented 3 years ago

Nice, haven't seen that one before, but looks handy for attributes

Giannis1993 commented 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 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).

Giannis1993 commented 3 years ago

Done