Hello,

Ran into problems with DerivativeStructure today. It requires a lot of
memory with 6000 or so independent variables. I poked around and found it
the problem starts with the number of DSCompiler objects instantiated.

Given this and my earlier observation that in sparse derivative trees, the
existing structure allocates space for all independent variables and hence
is computationally inefficient, I designed a faster/leaner(less memory)
structure.

One shortcomming of DS is that it computes only up to the first derivative.
This may not be a problem in many cases such as the minimization of a
multivariate function where optimization can be much quicker with a
gradient. Going as far as the hessian may be fundamentally too memory or
time intensive. So, it is useful to have an easier method to computing just
the first derivative.

The design of DS is that all DS instances created either as a results of
calling:
DS.getConst(value);  // for constants
DS.getVariable(idx, value); // for independent variables
... OR as a rest of some computation.

I felt it appropriate to add an addInPlace and multInPlace for aggregation
processes so that objects are not copied over too often.

Attached is the code.

Cheers,
Ajo
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org
For additional commands, e-mail: dev-h...@commons.apache.org

Reply via email to