prevariable is better for separable_functions.
The difference is between say x(i) when x is a dvar_vector. then x(i) is a prevariable.
If you pass x(i) to a function which takes a dvariable a constructor is invoked to change
it to a dvariable. This incurs a bit of overhead. Also if you changed the value of argument
corresponding to x(i) inside the function the original x(i) would not be changed
since you are actually changing a different object.
If this seems bizarre it was done so that
the access functions x(i) and x[i] which involve a copy
constructor would not incur extra overhead.
_______________________________________________
Users mailing list
Us...@admb-project.org
http://lists.admb-project.org/mailman/listinfo/users