[
https://issues.apache.org/jira/browse/MATH-1550?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17161083#comment-17161083
]
Gilles Sadowski commented on MATH-1550:
---------------------------------------
bq. I think you mean the class SimplexTableau
Right; I fixed the issue's description. :-)
bq. core data structures are mutable [...] meant to be that way.
IMHO, if that's indeed the case that they are *meant* to be mutable, it lacks
code documentation on the design. Indeed, over the long haul, we've been
trying to modify all the library's codes towards _immutability_ (foremost to
ensure thread safety).
I wonder whether the class could be redesigned for more clarity, safety and
flexibility. For example, if my impression is right, we should be able to write
{code}
final SimplexTableau t = new SimplexTableau(...).scale();
{code}
(i.e. letting the user decide whether/how to handle potential issues with the
input data).
> SimplexTableau (linear programming)
> -----------------------------------
>
> Key: MATH-1550
> URL: https://issues.apache.org/jira/browse/MATH-1550
> Project: Commons Math
> Issue Type: Improvement
> Affects Versions: 3.6.1
> Reporter: Gilles Sadowski
> Priority: Minor
> Labels: design
> Fix For: 4.0, 4.X
>
>
> Class {{SimplexTableau}} is package private and does not seem designed for
> inheritance, but it contains "protected" methods.
> There are several instance fields that should preferably be made "final" (for
> thread safety). It seems that to do this, some design changes are necessary
> (a.o. the relationship with {{SimplexSolver}} should be clarified).
>
> {{SimplexSolver}} also contains a protected method ({{solvePhase1}}) that is
> not documented for inheritance.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)