Matrix chain multiplication: Difference between revisions

m
m (+Stata)
Line 191:
 
== {{header|Stata}} ==
{{trans|Python}}
 
Here is the equivalent of optim3 in Python's solution. Memoization is done with an [https://www.stata.com/help.cgi?mf_asarray associative array]. Multiple results are returned in a [https://www.stata.com/help.cgi?m2_struct structure]. The same effect as optim2 can be achieved by removing the asarray machinery.
 
<lang stata>mata
1,336

edits