Squashed 'pystan/stan/' changes from 8de1916..45a2cb1

45a2cb1 Merge pull request #615 from ariddell/feature/chains-adapter-pystan
d74dfee Merge pull request #633 from ariddell/feature/visual-studio-2008
a5831dc Merge pull request #631 from tmalsburg/develop
12b4663 Support MS Visual Studio 2008 std::math idiosyncrasies
85fc356 Fix another typo in an error message.
fe92ace Fixed typo in error message.
02cad93 Merge pull request #621 from stan-dev/feature/issue-597-function-lang
d00fb0b Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
7887358 Merge pull request #627 from stan-dev/bugfix/issue-624-json-compare-unsigned
aeee3d4 fixed and tested conversion routing array indexing ltr_2_rtl (row-major to column major)
9eef0bb required functions ending in _log to return real
3eb6faa added check that no duplicate functions get added, updated model tests and doc to be consistent
7c526d4 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
d080d92 Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
66d6ed8 Merge pull request #618 from stan-dev/feature/issue-595-json
616c0de Merge pull request #616 from stan-dev/feature/QR
8efc994 adding missing functions-good2 that was hidden by .gitignore
e464095 completes functions for issue #597 and also fixes #422, allowing binary ops in constraints
8ec60d3 functions passing all tests
2df8ea1 Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
d54bc6b Merge pull request #620 from aadler/patch-1
d947b16 Update all.bib
45f9481 Update all.bib
de46e08 Update all.bib
e2cbf6f Update all.bib
50f7b77 Update all.bib
2795df1 Update all.bib
17adefe Update all.bib
5d95127 correcting unit test
947aae2 Update all.bib
4200d8b Update all.bib
01b76e5 Update all.bib
c7333f6 Update all.bib
a437851 Merge pull request #617 from aadler/patch-1
a45d82f added class-level doc
4991651 removed spurious comments
d1f4b7f Update programming.tex
15b2530 Update all.bib
2a3b366 Update programming.tex
b6350c2 forgot semicolons
4df1fef Update all.bib
3f89c27 do not #include<boost/multi_array.hpp> since it is not used
4b207b7 forgot to add two headers
61aec00 Allow construction of stan::mcmc::chains using vectors (rather than Eigen)
6d5c3c6 reverted command.hpp to use io::dump
c0d1d73 parser handles unicode escapes, checks for number range errors, more unit tests
7c9677f functions feature complete with doc and tests all passing
5fbaf16 patched generator behavior for function declarations to avoid body
b53e652 fixed template parameter and return type generation errors for int function params
af8d86b clean up QR decomposition stuff
74069a8 added support for return checks for void functions
97e9d8e Merge branch 'feature/QR' of https://github.com/stan-dev/stan into feature/QR
f75d7c0 added include for forward-mode and qr_Q tests now passing
d745fd4 reorganized location of functions chapter
d91833b introduce qr_Q and qr_R functions (fwd-mode broken)
3f801cf Merge branch 'develop' of https://github.com/stan-dev/stan into develop
761038a fixed and tested error handling and messages in functions to match doc in manual
3b8c880 removed C++11 to_string in favor of boost::lexical_cast
3f57fdf fixed char vs. string comparison bug in parser tests and fixed associated tests, all of which reflected bugs in tests, not in parser
2a32ff8 fixed bug in error testing parser mismatch check so now checking again
4b47c8d generated models for all function uses cases now compile with templates
ed38169 all legal scopes of functions and argument scalar types tested
c4fde5e added test model file, updated language section of manual, more functions as statements
477dd34 command reads data in JSON format, added more checks, tests, to json_data
f102305 simplified ast, added _lp and _rng functions and parser constraints
7221e8c unit tests for json_data_handler
8c08678 fix return in matrix/initialize for clean compile, added tests for return of correct type
fe35e67 json data handler and unit tests
1ccc5ed removed redundant bare_type, test return only from functions with error msg otherwise
03e1d9a functions working through mutual recursion; no check on returns yet
bcb3376 Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
3dfc813 adding necessary grammars to previous commit
bae8024 basic function example compiling and running
dacb441 Merge pull request #606 from stan-dev/feature/fix-issue-244-scale
9ddc2e3 more unit tests, better parser diagnostics, added json.hpp
7284c47 unit tests for strings, bugs fix
11150e4 more unit tests, fixed parser bugs, added error messages
6acf501 fixed bug in parser, added more unit tests
e0affd5 added json parser with base handler and exception, and tests -- no UTF-8 validation or Unicode escapes
2d1607e removing unnec. includes
218bf11 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
c9e9cc0 Group quad_form_diag with quad_form in the manual
4fcdad1 Renamed function scale to quad_form_diag
447a31f Applying changes recommended by Marcus Brubaker
70dc1ac Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
18b87da Some small improvements to diag_pre_multiply and diag_post_multiply
ad0c0dd Added function matrix scale(matrix, vector), relevant unit tests and documentation
90d09ae added validate equal in similar fashion to validade_greater, validate_greater_or_equal, etc
04f36a9 Merge pull request #600 from stan-dev/feature/more_nuts_tests
144fc51 Merge branch 'develop' of https://github.com/stan-dev/stan into feature/issue-597-function-lang
73c0944 Merge pull request #594 from stan-dev/feature/fix-issue591-nb_rng
22d9c08 more principled patch for issue #422 with tests
20a1ae4 adds template for function grammar, fixes issue #422
7efbe16 Merge pull request #601 from stan-dev/feature/travis-ci
134b18a updating travis script
868ef22 updated neg_binomial_rng test to use the neg_binomial_log to generate the expected values
bffc851 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
468003b fully specifying call to boost::math::pdf
0442557 Merge pull request #565 from stan-dev/feature/fix-cross-compilation
9c8a8f7 Merge pull request #555 from stan-dev/feature/neg_bin
753b066 Unit test to check the NUTS slice criterion
c0c5a19 more fixes for cross-compilation on Linux
0a1b086 Merge branch 'feature/fix-cross-compilation' of https://github.com/stan-dev/stan into feature/fix-cross-compilation
7e6b27a adding tests to make sure c++ syntax is correct
f41f6e1 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
b98cbd9 Fix neg_binomial_rng
dc8d8fc renaming test
3a9e0c0 Merge branch 'develop' into feature/fix-cross-compilation
a8fd956 Merge pull request #570 from stan-dev/bugfix/issue-530-no-model-parameters
e96fbc8 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
f1373d2 Merge branch 'develop' into bugfix/issue-530-no-model-parameters: moving test to CmdStan branch bugfix/issue-530-no-model-parameters
0d69427 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
47e9541 Merge pull request #585 from stan-dev/feature/c++11
7ebc325 Fixing unsigned warning.
052030c updated transform param sample to increment_log_prob, removed false positives for linear transforms, tests
3f7959a Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
cf93279 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
add3680 squashing more warnings
415ebf7 squashing warnings
36bccc6 fixing typo in the generator
ce69af0 testing: moving models out of syntax-only
6c61b66 Merge branch 'develop' into feature/c++11
6c82b59 Merge pull request #588 from stan-dev/feature/issue-405-refactor-command
9c3a259 Fix typo in stan/prob/distributions/univariate/discrete.hpp
f7db402 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
4740ea1 Expanding documentation for neg_binomial_2 (forgot to finish sentence)
d2f7d5a Expanding documentation for neg_binomial_2
acede17 Small improvements to neg_binomial_2
ecc42dc add sign tests for rev and fwd
0f200ad Merge pull request #582 from aadler/patch-2
0a7bc82 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
0124c62 refactor: split tests into two tests
60e318b refactor: split tests into two tests
7fd5746 refactor: split tests into two tests
bddf084 Merge pull request #573 from stan-dev/feature/issue-571-const-chain
cfc7ffe adding conditional_condition_bad_2.stan model that I missed earlier
b5886b1 set_double_range_upper unsequenced, tests
110e856 set_int_range_upper unsequenced fix, tests
c454f2c set_double_range_lower unsequenced fix, tests
6faadd9 set_int_range_lower unsequenced fix, tests
33215b9 validate_int_expr unsequenced fix, tests
7c1035b add_var unsequenced fix, tests
95f75e8 validate_set_fun_type unsequenced fix, tests
e73672e add_expression_dimss unsequenced fix, tests
361151f logical_negate_expr unsequenced fix, tests
ab67122 negate_expr unsequenced fix, tests
7ae3ae2 elt_division unsequenced fix, tests
0f53e3b elt_multiplication unsequenced fix, tests
35dcd9f left division unsequenced fix, tests
529730d division unsequenced fix, tests
997f17b multiplication function unsequenced fix, tests
7195d0c validate allow sample unsequenced errors fixed, tests
841b42e validate_int_expr2 unsequenced fix, tests
93fc214 add_conditional_condition unsequenced fix, tests
bfbb2a5 merged origin develop
36c39b0 fix neg_binomial_2 in function_signatures
d12a2c3 added rng for neg_binomial_2
d0773f0 Added neg_binomial_2_log
65d23f1 Update appendices.tex
68e73ff Merge branch 'develop' of https://github.com/stan-dev/stan into develop
0dc5c33 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
f189b15 refactor: tested new print_progress method
841befb refactor: abstracted prefix and suffix out of print_progress
1819651 refactor: abstracted std::cout out of print_progress
e118db2 Merge pull request #564 from stan-dev/feature/sort_index
c88259e fixing references to src/test/test-models/compiled in makefile
8d3dea6 refactor: moving individual tests from compile_models_test to cmdstan repository
4b7b705 Merge pull request #576 from apw/patch-1
180d360 fixed unsigned comparison warnings inside tests
b77f473 adding function sigatures tests for sort_indicies
4c2b07f hopefully this fixes the sign errors
7af1295 Revert "A possible way to use to solve sign-compare warnings"
57e6f00 updating gitignore
1f50e2a Fix two typos: "ane" and "rwo".
7dab996 refactor: moving src/test/CmdStan/models/* tests to cmdstan repository
50a8dfe refactor: removing CmdStan specific models
4fbbf2f refactor: moving src/test/CmdStan/gm/argument_configuration_test.cpp to cmdstan repository
160b30b refactor: moving src/test/CmdStan/print_test.cpp to cmdstan repository
5c0a329 refactor: moving src/test/CmdStan/optimization_output_test.cpp to cmdstan repository
960ec89 refactor: moving src/test/CmdStan/fixed_param_test.cpp to cmdstan repository
8aa7742 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
89901eb moving src/test/CmdStan/command_test.cpp to cmdstan repository
1894554 Minor fix for neg_binomial_2_log_log
7092cd7 adding a typedef to the stan model for use in CmdStan
b0c223d moving namespace ui to common
c4a46eb A possible way to use to solve sign-compare warnings
de7fddd Merge branch 'develop' of https://github.com/stan-dev/stan into develop
5c49c3f Merge pull request #569 from stan-dev/bugfix/issue-568-epil
bbfd68c updated formatting to reduce lines to 80 chars and put open curlies on same line as signature
0bcc50f Merge branch 'develop' into feature/neg_bin
ce0e3d8 Change neg_binomial_log_log to neg_binomial_2_log_log
b0b5ea7 templated container out rather than type of std::vector or Eigen::Matrix
950c8ad Merge branch 'feature/sort_index' of https://github.com/stan-dev/stan into feature/sort_index
ff9f6d5 Changed a bunch of chains methods to be either static or const, as appropriate.
070f5da Manual now mentions that algorithm=fixed_param is mandatory when the parameters block is empty.
0040d0c Merge branch 'develop' of https://github.com/stan-dev/stan into bugfix/issue-530-no-model-parameters
a0ba5d8 Changed name of template parameter to avoid compiler bug on Mac OS X 10.7.5.
3fe07b9 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
fbdafe9 Merge pull request #566 from aadler/patch-1
49f7fa4 Update distributions.tex
2668156 Adjustments in rev and fwd diff for the refactoring of sort_indices_* functions
496798e refactor of sort_indices_* functions based on Bob Carpenter's https://github.com/stan-dev/stan/pull/564#issuecomment-35143532
d6560ed refactor: splitting init_* functions out of command.hpp; needs tests
8278ac5 refactor: splitting sample() out of command.hpp; needs tests
ba38e42 refactor: splitting warmup() out of command.hpp; needs tests
3dd43f1 refactor: splitting run_markov_chain(); needs tests
764e0d8 refactor: splitting print_progress() out of command.hpp
7f2f122 Merge pull request #563 from stan-dev/feature/minor-improvs-log_sum_exp
84d5114 revised doc, section titles, and added examples for sort functions
7f65b53 Added functions sort_indices_* to function_signatures.h
d6d51fb Added sort_indices_* functions to the manual
6d6f31a Added sort_indices_* functions
de9acda fix merge conflicts
c1287e4 refactor: splitting do_print() out of command.hpp
5acceee refactor: splitting write_error_msg() out of command.hpp; added unit tests
b630198 refactor: splitting write_model() out of command.hpp; added unit tests
834c6e9 refactor: splitting write_stan() out of command.hpp; added unit tests
9c84b76 refactor: splitting write_csv() out of command.hpp
973315c refactor: splitting write_iteration_csv() out of command.hpp
f47bc12 moved stan/gm/command.hpp to stan/ui/command.hpp; changed namespaces; moved tests
c3fc12a Adds a test to fwd-diff of log1p_exp
8c7c31e Minor fix for log_sum_exp
cdbd499 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
03f1b15 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
403a3da removing artifacts
0918eb6 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
d8ee233 Added neg_binomial_log_log to manual
3d89efe Added neg_binomial_log_rng
e7ff805 Added distribution neg_binomial_log_log
1d6cb5c Merge remote-tracking branch 'origin/develop' into bugfix/issue-530-no-model-parameters
df6c9ff Check for algorithm=fixed_param when there are no model parameters.
ead81fc Merge branch 'develop' of https://github.com/stan-dev/stan into develop
51be3e0 ps_point::_fast_vector_copy and ps_point::_fast_matrix_copy now check for zero-byte sources.
2dfaea5 Merge remote-tracking branch 'origin/develop' into bugfix/issue-530-no-model-parameters Getting feature #353.
3d2793e Merge branch 'develop' of https://github.com/stan-dev/stan into develop
11fdbb1 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
5f43578 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
e44a250 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
9d6b122 add make/local
af27ff4 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
46c3a24 's/EXPECT_FLOAT_EQ/EXPECT_NEAR/g'
283001d Merge branch 'develop' of https://github.com/stan-dev/stan into develop
c3f1b5c fix the runtest no fail target
c266daf define, test, and use a sign() function
cc362fb get cross-compiling working again
a9af1ff fix test for Windows vs. not Windows
db517b0 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
d8904ee Merge branch 'develop' of https://github.com/stan-dev/stan into develop
d0b195a Merge branch 'develop' of https://github.com/stan-dev/stan into develop
383db8d Merge branch 'develop' of https://github.com/stan-dev/stan into develop
a19dc5a Merge branch 'develop' of https://github.com/stan-dev/stan into develop
dddca39 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
b2ff974 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
7664436 Merge branch 'develop' of https://github.com/stan-dev/stan into develop
413e47e Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
c8dc409 updated parser test
9c71b31 add -lc++ on Linux
e93ea1f Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
56aa195 fix ox_mac makefile after merge
5e8f89e Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
5335f14 implement C++11 flag on Linux too
c0465ba Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
7f59d4c Merge branch 'develop' into feature/c++11
767d93e Removed one more comment
7a10155 Final clean-ups and removal of unneccesary files.
faf96a1 Merge branch 'develop' into feature/c++11
9f65843 Merge branch 'feature/c++11' of https://github.com/stan-dev/stan into feature/c++11
68bfc32 Merge branch 'develop' into feature/c++11
b99a2c1 Added a C++11 flag in makefile
71c8e88 Test with g++ on mac
88bd763 Merge branch 'develop' into feature/c++11
a15de58 Removed clang detection
f361cf4 C++11README updated with make test-* results
888ac4e Updated C++11README
fabb3ff c++11 cleanup
ec75b72 Get parser working under c++11

git-subtree-dir: pystan/stan
git-subtree-split: 45a2cb1496ee46ffb51a625b75879cd4b582804b
Update Stan source to commit 45a2cb1496ee46ffb51a625b75879cd4b582804b

Merge commit 'e46836df6eae10615b668ff6a10cf7d2ee842403' into feature/stan-dev
Use stan::mcmc::chains to do estimated sample size and rhat calculations.

Closes #21
API: optimizing now returns a vector rather than a dictionary

This mirrors an API change in RStan. Closes #80
Check for empty parameters and remove them.

Mirrors remove_empty_pars in RStan.
Mirror minor changes in RStan
Follow RStan's refactoring of stan_fit.hpp
Update wrapping of stanc
Update documentation and tests for new optimizing return format
Update optimizing tests
Fix remove_empty_pars tests
Update PyStan to work with development version of Stan (45a2cb1)

Merge branch 'feature/stan-dev-catchup' into develop