Should The Algebraic Solver Require At Least One Parameter?

Currently the algebraic solver requires that the vector of input parameters theta is larger than zero, but this makes it awkward when trying to use the algebraic solver in the transformed data block where the gradients aren’t needed. Technically in this case there’s an ambiguity between whether external parameters are placed into theta or x_r and placing them all in theta does work, it’s just not as natural as placing them in x_r.

@charlesm93, any reason why the algebraic solver shouldn’t proceed to solve the system without any gradients when theta is a zero-length vector?

None that I can think of.

In C++ the algebraic solver is overloaded for the cases theta is passed as a vector of var or double. For the latter I’ll remove the constraint.

Why not remove it for both cases? When the algebraic solver is called from most places theta will register as a vector of vars even if it is of size zero. But, again, if it’s size zero then there’s no gradient to calculate.

That seems like the right solution. Want to make an issue for it?

Ok, I’ll be on it and I’ll provide a fix.