cvxgrp / qcml

A Python parser for generating Python/C/Matlab solver interfaces
Other
42 stars 9 forks source link

Should we have dimension variables? #14

Open echu opened 11 years ago

echu commented 11 years ago

Instead of "variable x vector", we have "dimension n; variable x(n)".

Will this be a better representation of the problem? Or will it reduce its ability to be generic? At the moment, you already have to specify the dimensions of x, so specifying "n" instead is not so bad.

Then again, if we wanted to be able to "infer" dimensions directly from the parameters, we would not be able to do that using "variable x(n)" notation, since the user has already said what size "x" should be.

It's a toss-up, but since everything is "abstract" at the moment, doing the latter may "violate" that abstraction. Any other thoughts would be welcome.