Squashed 'pystan/stan/' changes from fad1ae2..8de1916

0928d1f Merge pull request #560 from stan-dev/release/v2.2.0
4984647 adding artifacts (manual + api doc) to the repository for v2.2.0
5526c9f updating doxygen
8b035d8 bumping version numbers
a0865ba Merge pull request #559 from stan-dev/feature/issue-485-next-manual
dbd6e0c manual ready to go for 2.2.0, completing issue #485
f689ba0 Merge pull request #556 from stan-dev/feature/user-provided-gradients
04b97fb adding a precomputed_gradients() function with unit tests
67a0c50 removing errant space from command.hpp
cb07d1a Merge pull request #542 from stan-dev/feature/optimize_dump_reader
9329578 Merge pull request #536 from stan-dev/feature/issue-532-remove_write_csv
316847a Merge branch 'develop' into feature/optimize_dump_reader
1ca971c removing last remaining call to write_csv
5d8700a adding optimization output test. fixed newton method so it actually runs
cadb604 finished problematic posterios chapter, updated hoffman-gelman in press to 2014
63276f5 Merge pull request #550 from stan-dev/feature/issue-549-fix-correlation_matrix_test
00d8356 Merge branch 'develop' into feature/issue-532-remove_write_csv
4e1e92b fixed correlation_matrix_test.cpp
f721823 Merge pull request #548 from stan-dev/bugfix/issue-543-grad-functional-leak
1863ffd re-added memory recovery for gradient to fix issue with symplectic test
805245e added apply_recover functional to autodiff to catch, recover memory, rethrow, fixing leak in #543
c58eabd Merge branch 'develop' of https://github.com/stan-dev/stan into develop
dd27a57 updated problematic posteriors section, removing identification references
82c36a3 resolved acknowledgement conflicts
b548485 Merge pull request #545 from stan-dev/bugfix/issue-543-log-prob-grad-exception-spew
8283406 fixes issue #543
cac6bd7 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
be81ba7 slight revision to identifiability based on comments from Ben
f9c1d41 many updates to manual including identifiability chapter
0450a81 changing command.hpp to use the write_iteration function
eb55393 changing command.hpp to use the write_iteration function
196f1d0 added new functions to stan/gm/command.hpp; write_iteration_csv, write_iteration; both unit tested
7cfc22a Merge branch 'develop' into feature/issue-532-remove_write_csv
1ab0af5 Merge pull request #541 from stan-dev/feature/issue-540-fix-brittle-command-tests
d28f298 updating command tests so they are robust to minimal changes in output
5864691 Speed up reading R dump formatted files by: - Prevent constant reallocations of std::strings - Convert to using boost::lexical_cast instead of stringstream
2a0d7f4 Merge pull request #526 from stan-dev/feature/issue-427
5083b3e Merge pull request #535 from stan-dev/feature/issue-534-improving-make-help
b4403e3 Merge pull request #504 from stan-dev/feature/issue_394
598b629 Merge pull request #349 from stan-dev/feature/add-dist-funcs
a0ca15a Merge pull request #528 from stan-dev/bugfix/issue-239-inf-vars
a373442 updating latex documentation for distance and squared_distance
b01ccd3 removing compiler warnings from tests
a0c3f83 Merge branch 'develop' into bugfix/issue-239-inf-vars
9aeafab silencing 1 doxygen warning
b54f46e adding function signature test
6367006 adding function signature test
a4f5ae3 updating function signatures order
0b28237 adding tests; fixed bug in templated distance function
86a95f7 Merge pull request #523 from stan-dev/bugfix/issue-464-diag_pre_multiply
479e612 Merge pull request #539 from stan-dev/feature/issue-335-vect-log-prob
848d125 Merge pull request #531 from stan-dev/bugfix/issue-476-more-catch-and-reject
b0450dd fixes issues #335 and #533
c77c79c Merge branch 'develop' into feature/issue_394
0db6efa adding doc for do_print(). added unit test.
339bca4 Merge branch 'develop' into bugfix/issue-476-more-catch-and-reject
bdd40b9 Add unit test for refresh=0 and refresh>0
b3d3596 Merge branch 'develop' into feature/issue-427
4ed910c Stop using write_csv and write_csv_header during optimize.
f0b0875 fixed all outstanding bugs and added all requested clarifications
973543e added spaces
6838be7 added spaces
0b01f5a updated make help message
b26eb0a fixed failing test
ca06177 Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-485-next-manual
8187f6c Merge branch 'develop' of https://github.com/stan-dev/stan into develop
660aeef Merge pull request #459 from stan-dev/feature/uniform_autodiff_pattern
4af231a test file from Bob
53a508c Merge branch 'feature/issue_394' of https://github.com/stan-dev/stan into feature/issue_394
c1e85b5 Merge pull request #353 from stan-dev/feature/persistent_sampler
39e4457 reordered terms in term grammar to fix issue #239
d93f65f Merge branch 'develop' of https://github.com/stan-dev/stan into develop
3aa5836 Merge branch 'develop' into feature/issue-427
e30c116 adding test for stan/gm/command.hpp's init_adapt
3eaa23a Merge pull request #525 from dchudz/patch-1
fd6960a Merge branch 'develop' into bugfix/issue-476-more-catch-and-reject
9817a26 clarify model block variable locality
51508f2 Merge branch 'develop' into feature/persistent_sampler
decc3d9 reducing memory requirement for src/test/unit/memory/stack_alloc_test.cpp for Windows
f6f7093 Merge branch 'feature/issue_296' into develop
ad1741f Merge branch 'develop' into feature/uniform_autodiff_pattern
00ae2c4 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
cc8c485 updating unit-agrad-fwd/matrix/diag_post_multiply test
cfa9064 Allow refresh=0 to silence all iteration output.
6be38bf Merge branch 'develop' into feature/add-dist-funcs
ef572c4 Merge pull request #505 from stan-dev/feature/issue-493-remove-test-dependency-on-compiling-grammars
6440bc7 Use proper gradient template parameters
b0baeba Bumped the number of parameters to skip to take into account new NUTS diagnostic
9dfd249 Updated signature of test implementation to restore valid compilation
a04d18e fixed refresh doc by removing refresh=0 and adding redirect to /dev/null option
9f7c3ad finished manual for next version other than possible addition of fake data and posterior predictive chapter
4e657fb moving test files
e3573df Merge branch 'develop' into bugfix/issue-464-diag_pre_multiply
9e2aec7 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
bb04ae5 Merge pull request #510 from stan-dev/feature/disable-failing-model-tests
30bd2d4 Merge pull request #509 from stan-dev/bugfix/issue-499-multinomial-rng-size
48f10cc fixed issue with mcmc_writer_test using char rather than string
5e24eeb Merge branch 'develop' of https://github.com/stan-dev/stan into develop
4253b49 moved location of static pattern rule to after GRAMMAR_TESTS were defined
ec7aa20 disabling bugs_examples/vol1/seeds test
1001ba1 Merge branch 'develop' into bugfix/issue-499-multinomial-rng-size
7d8c9b2 Merge pull request #494 from stan-dev/hotfix/v2.1.1
56998bc removed default null character from mcmc_writer and replaced with empty string
13a7440 remove test dependency on compiling grammars
4a5a56b moving test
731bfd6 Merge branch 'develop' into hotfix/v2.1.1
6e363f8 removing bytes_allocated function from stack_alloc. The functions that were leaking have already been patched.
2533d1a Update definition of tree depth
7e6eb4d Move from using a char prefix to string prefix
e118a80 disabling vol3/camel and vol3/hepatitis tests
525fe52 updated multinomial, fixes #499
98d7ddf added pre/post-multiply tests for agrad matrix rev
e1e668e added tests for pre/post multiply, fixed bug in post multiply
6ae6659 got rid of extraneous print in log_softmax test
a4aca9b fixed leak on log_softmax, added brittle test; added code doc to softmax test
3bd62c6 Merge branch 'hotfix/v2.1.1' of https://github.com/stan-dev/stan into hotfix/v2.1.1
9548674 Merge pull request #474 from stan-dev/bugfix/issue-472-softmax-leak
e7018b7 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
09fbc64 Merge pull request #478 from stan-dev/feature/issue-391-move-tests
5e9474d adding pipe to CFLAGS
8c6329e adding a forced parallel flag for windows.
6a68e58 Merge branch 'feature/issue-391-move-tests' of https://github.com/stan-dev/stan into feature/issue-391-move-tests
871806b updating GENERATE_TESTS rule for Windows
7ab7135 I guess a space matters in makefiles. wtf?
6c5b6e3 updating gitignore
13efa80 fixes #475. Using -fsytnax-only
52ce6c3 fixes #475. Using -fsytnax-only
e0f299c updating clean target: hopefully this fixes the windows issue
b5fa7c8 remove duplicated run of tests when building
b18ecc3 fixing if statement in makefile
08243a6 fixing typo
18bf056 updated help, added in test targets that were removed
71d1083 updated depcreated warning message
0b3b8bf adding check for SECONDEXPANSION functionality in make
98ec7d5 moved make/os_detect to make/detect_os
d0c9aa8 Merge branch 'develop' into feature/issue-391-move-tests
66f24c5 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
b63bfa7 Merge pull request #419 from stan-dev/feature/fix-ldlt
271216f updated command and base_hamiltonian to catch std::exception instead of std::domain_error to catch all Boost math and Stan throws, fixes #476
64d6de1 adding a test that could be used for speed tests
7d79626 disabling bugs_examples/vol3/hepatits/hepatitsME test
7678edc updating test-unit target
d0c8b5a Merge branch 'develop' into feature/issue-391-move-tests
259e6a7 added stronger language indicating that success() must be true before using the other functions within LDLT_factor
06c4e2e Expand documentation to make it clear that you must call compute() if you use the default constructor.
5403b6a Check that a factorization attempt has happend in success()
3dd3574 changed name from cur_size to bytes_requested in stack_alloc
9bf6e88 Merge branch 'bugfix/issue-472-softmax-leak' of https://github.com/stan-dev/stan into bugfix/issue-472-softmax-leak
dcb83cf added acknowledgement for bug report
a159727 Adding LDLT_factor test that breaks. Not just fails, but breaks
a4d5564 adding more tests for LDLT_alloc
e616811 Added method to inspect the size of the stack. Added test for softmax checking that all elements were allocated to the correct stack.
6df5490 Merge branch 'develop' into feature/fix-ldlt
1295dbd Unit test for LDLT_alloc.
05ab90c Merge branch 'master' of https://github.com/stan-dev/stan into hotfix/v2.1.1
57fd72b getting stack_alloc to work under Windows
c8b30d2 fixing namespaces and names for models
3f4095c splitting out agrad/rev and agrad/fwd unit tests
4ca0e9b updating make/tests for windows
cf02cd6 using = instead of := for  function calls
79a3a91 updating mcmc_writer_test to match changes in makefile
30c265c added bytes allocated test to softmax test
942312a added stack_alloc::bytes_allocated and test
0afabfe trying out a different secondexpansion
2d82895 moved gm tests to src/test/integration, src/test/CmdStan, and src/test/unit/gm
9a1ce23 adding deprecation message
f394e4e fixed base_hmc_test.cpp
8dd78c3 moved distribution tests to src/test/unit-distribution/ and src/test/unit/distribution
3341b9a switched to arena malloc to fix #472
711037f disabled 5 model tests that have failed for v2.1.0
bc5dff1 moved models tests to src/test/CmdStan/models
489c806 moved prob tests to src/test/unit/prob
62d10df moved model test to src/test/unit/model
d6a3650 moved meta test to src/test/unit/meta
ee4dba6 moved memory test to src/test/unit/memory
6e91988 cleaning up mcmc tests
bcbd8c6 moved mcmc tests to src/test/unit/mcmc
20a0ec6 moved math tests to src/test/unit/math
9d19893 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
052f929 Merge pull request #466 from stan-dev/release/v2.1.0
c245bc4 Revert "adding artifacts (manual + api doc) to the repository for v2.1.0"
7922147 added diag_post_multiply to signatures and tested compilability
343d26d fixes issue #464
f6692bb Add some more API documentation to LDLT_factor and LDLT_alloc.
0aac5eb Merge branch 'develop' of https://github.com/stan-dev/stan into develop
04ea540 Forgot to commit this file, silences warnings.
cc4dfc8 ASSERT_TRUE on LDLT_factor::success() in unit tests.
8bc764e Change types to silence new compiler warnings.
1dbf152 Remove domain test for the moment
ced1a67 moved io tests to src/test/unit/io
b14bdcd Fix model functional to work with higher-order autodiff by specifying template parameters; add test
0780fc2 moved command tests to src/test/CmdStan
6e7e287 moved agrad tests to src/test/unit/agrad; left distribution tests in place.
7df009f Merge branch 'develop' into feature/fix-ldlt
ad3d237 forgot to commit check_ldlt_factor.hpp
ce0d415 Unified interface for autodiff'ing models
195fd49 use check_ldlt_factor() in distributions
30222b8 add .vectorD() method to LDLT
26bebbf Merge branch 'develop' into feature/issue-391-move-tests
de12afb added target for src/test/*
3b41109 Merge branch 'develop' into feature/add-dist-funcs
60f4171 Merge branch 'feature/fix-ldlt' of https://github.com/stan-dev/stan into feature/fix-ldlt
04f6c54 Add some comments on how LDLT_factor should be used.
284b18d add some code comments
9e1bb33 Merge branch 'feature/fix-ldlt' of https://github.com/stan-dev/stan into feature/fix-ldlt
b58855c use mdivide_right_spd instead of inverse to test gradients.
0106013 Fix mdivide_right_ldlt unit test.
f708c7a added tests for trace_inv_quad_form_ldlt for gradients checking against auto-diff implementation
646b550 adding math test for trace_inv_quad_form_ldlt
b42ebe8 testing mdivide_right_ldlt. tests fail
47f64db changed include order of multiply
213c119 added test for trace_gen_inv_quad_form_ldlt using basic math and auto-diff
abf13e3 added more tests for log_determinant
9750c13 Fix LDLT finite difference tests.
9aa3f4b added failing finite diff test for agrad mdivide_left_ldlt
11e0634 split src/stan/agrad/rev/matrix/ldlt.hpp into 6 header files; created test files for missing tests (no tests included)
c2173f6 split apart src/stan/math/matrix/ldlt.hpp into 6 header files; created test files for the missing ones (no tests included)
cf6f01d Fix memory issue with log_determiant_ldlt_test.cpp
a6826ae Fix function call in multi_gp_log.
97e5dc1 Use trace_inv_quad_form_ldlt() in multi_student_t.
e9555dc Use LDLT_factor in multi_normal_log again now that the gradients are fixed.
bc1069e Expand testing for multi_student_t_log.
82a393e Unit test for trace_gen_inv_quad_form_ldlt.
25e4453 Rename test functions to be consistent.
0953b37 Rename trace_inv_quad_form_ldlt with three arguments to trace_gen_inv_quad_form_ldlt to be consistent with the non-inverse form of the trace-of-quadratic-form functions.
358b38e Add unit tests for trace_inv_quad_form_ldlt and fix derivative error.
1b7069d Split trace_gen_quad_form tests into their own files.
a7b0f25 Test mdivide_{left|right}_ldlt and log_determinant_ldlt.
b3e120e Working empty sampler test
299e659 Merge branch 'feature/persistent_sampler' of github.com:stan-dev/stan into feature/persistent_sampler
16b6f98 Updated tests
e7752d9 Merge branch 'develop' into feature/persistent_sampler
c1967e0 Changed name from persistent sampler to fixed parameter sampler
e4e4103 making test clearer
1f6b877 Fix broken test, update doc
1324bb0 Merge branch 'develop' into feature/persistent_sampler
df81de0 Fixed header guard issue.
da07915 Missed %
ce756c1 Rename dist -> distance and squared_dist -> squared_distance, enable squared_distance in the modelling language and readd the reference documentation.
f9ac868 Added new persistent sampler that does not change the chain state, useful for forward sampling using generated quanities only

git-subtree-dir: pystan/stan
git-subtree-split: 8de1916f18b21c72af0770352157ff07b9936257
Update to Stan v2.2.0

Merge commit '61be9292e78a667fb4efe6edf5ff955ae8cb4718' into feature/stan-2.2.0
Minor updates for Stan 2.2.0
Release v2.2.0.0