Skip to content

Commit 93e8430

Browse files
committed
Clarifying comments in model_base, namely 'set'-->'appended' parameters
1 parent 5621ebd commit 93e8430

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

src/stan/model/model_base.hpp

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ class model_base : public prob_grad {
6363

6464
/**
6565
* Set the specified argument to sequence of parameters, transformed
66-
* parameters, and generated quantities in the order in which they
67-
* were declared. The input sequence is cleared and resized.
66+
* parameters, and generated quantities in the order in which they were
67+
* declared. Each parameter is included once, regardless of its size or
68+
* dimensionality. The input sequence is cleared and resized.
6869
*
6970
* @param[in,out] names sequence of names parameters, transformed
7071
* parameters, and generated quantities
@@ -91,9 +92,10 @@ class model_base : public prob_grad {
9192
virtual void get_dims(std::vector<std::vector<size_t> >& dimss) const = 0;
9293

9394
/**
94-
* Set the specified sequence to the indexed, scalar, constrained
95-
* parameter names. Each variable is output with a
96-
* period-separated list of indexes as a suffix, indexing from 1.
95+
* Append to the given sequence with the names of the indexed, scalar,
96+
* constrained parameters. Each variable is output with a period-separated
97+
* list of indexes as a suffix, indexing from 1. This gives a "flattened"
98+
* representation of all constrained parameters.
9799
*
98100
* <p>A real parameter `alpha` will produce output `alpha` with no
99101
* indexes.
@@ -133,10 +135,11 @@ class model_base : public prob_grad {
133135
bool include_gqs = true) const = 0;
134136

135137
/**
136-
* Set the specified sequence of parameter names to the
137-
* unconstrained parameter names. Each unconstrained parameter is
138-
* represented as a simple one-dimensional sequence of values. The
139-
* actual transforms are documented in the reference manual.
138+
* Append to the given sequence with unconstrained parameter names. Each
139+
* unconstrained parameter is represented as a simple one-dimensional
140+
* sequence of values. Transforms from the unconstrained parameter space
141+
* back to the constrained parameter space are documented in the reference
142+
* manual, and implemented in the model_base::write_array methods.
140143
*
141144
* <p>The sizes will not be the declared sizes for types such as
142145
* simplexes, correlation, and covariance matrices. A simplex of

0 commit comments

Comments
 (0)