It can be more efficient to compute the objective function and gradient together, since they can reuse the expansion of the CPD into an array. We should add and use these methods.
Related upstream functionality is here for LBFGSB: Gnimuc/LBFGSB.jl#19
In case that doesn't get merged, we can also handle it ourselves by implementing the appropriate wrapper for setulb here.
It can be more efficient to compute the objective function and gradient together, since they can reuse the expansion of the CPD into an array. We should add and use these methods.
Related upstream functionality is here for LBFGSB: Gnimuc/LBFGSB.jl#19
In case that doesn't get merged, we can also handle it ourselves by implementing the appropriate wrapper for
setulbhere.