[ https://issues.apache.org/jira/browse/MATH1464?page=com.atlassian.jira.plugin.system.issuetabpanels:commenttabpanel&focusedCommentId=16536125#comment16536125
]
Erik Erlandson commented on MATH1464:

Aha, I see, the goal is dependency injection for linear algebra. If this was Scala, the idioms
would be less controversial (some variety of implicit typeclassbased API). In java, the options
seem more limited.
It looked like you were referring to a JIRA above, but there is no link. It sounds like I
am wandering in on a longstanding community debate.
For APIs that are based on {{OptimizationData}}, I can imagine an optional parameter that
is of {{interface}} {{LinearAlgebra}}, which would behave as a kind of (pseudo)implicit typeclass,
and it would contain all the linear algebra operations, and could be backed by various underlying
linear algebra packages. However, there is a lot of territory that doesn't cover, since only
a subset of commonsmath operates on {{OptimizationData}}. Also, this would require quite
a large number of methods.
In the java universe an api based on {{interface}} seems like the most idiomatic approach
to depinjection. IMO the current {{o.a.c.mathX.linear}} doesn't take full advantage here.
For example {{RealMatrix}} is an {{interface}} and {{RealVector}} is not (but should be).
My preferred direction would be to put all of commons math (that uses linear algebra) on a
footing of using {{interface}} for matrix and vector objects, and having better (and more
consistently named) support for both inplace and nondestructive variations of operations.
Another thing I found myself wishing for was a distinction between mutable and immutable matrix
& vector. These things are never totally clean in a classic objectoriented hierarchy,
but I'd imagine mutable {{interface}} as a subinterface of immutable, since mutable supports
strictly(?) superset of operations.
> convex optimization with constraints, barrier method
> 
>
> Key: MATH1464
> URL: https://issues.apache.org/jira/browse/MATH1464
> Project: Commons Math
> Issue Type: New Feature
> Reporter: Erik Erlandson
> Priority: Major
> Labels: math, optimization
>
> Commons math supports SimplexOptimizer for linear programming. I created a somewhat
similar package for convex optimization with constraints, which is here:
> [https://github.com/erikerlandson/gibbous]
> I designed it to work in the style of commonsmath optimizers, so I thought I would propose
it for inclusion with commons math optimization, to see if there is any community interest.

This message was sent by Atlassian JIRA
(v7.6.3#76005)
