stan-dev/stan — pull request #539 by bob-carpenter (2014-02-05 16:06:57+00:00)
Title: Feature/issue 335 vect log prob

#### Summary:

Vectorizes arguments to increment_log_prob() function

#### Intended Effect:

Allow any type of expresison at all to be an argument to increment_log_prob() with the same effect as applying the function to each element.

Satisfies feature request #335 (vectorize increment_log_prob) and bug #533 (vector args parse but don't compile).

#### How to Verify:

Unit tests.

#### Side Effects:

It doesn't break any existing functionality.

#### Documentation:

Added sections to relevant parts of doc , including language specification, function specification, and BNF grammar for Stan.

#### Reviewer Suggestions:

Anyone. Be warned that it involves some template metaprogramming for enabling application to double, int, and auto-diff variables, as well as recursion in template code to deal with nested arrays.