The following looks better to me, but I'm not sure. @rxin ?
~~~
var regVal = updater.compute(
  weights,
  new DoubleMatrix(initialWeights.length, 1), 0, 1, regParam
)._2
~~~