![]() |
Stan
1.0
probability, sampling & optimization
|
Represents named arrays with dimensions. More...
#include <dump.hpp>
Public Member Functions | |
| dump (std::istream &in) | |
| Construct a dump object from the specified input stream. | |
| bool | contains_r (const std::string &name) const |
Return true if this dump contains the specified variable name is defined. | |
| bool | contains_i (const std::string &name) const |
Return true if this dump contains an integer valued array with the specified name. | |
| std::vector< double > | vals_r (const std::string &name) const |
| Return the double values for the variable with the specified name or null. | |
| std::vector< size_t > | dims_r (const std::string &name) const |
| Return the dimensions for the double variable with the specified name. | |
| std::vector< int > | vals_i (const std::string &name) const |
| Return the integer values for the variable with the specified name. | |
| std::vector< size_t > | dims_i (const std::string &name) const |
| Return the dimensions for the integer variable with the specified name. | |
| virtual void | names_r (std::vector< std::string > &names) const |
| Return a list of the names of the floating point variables in the dump. | |
| virtual void | names_i (std::vector< std::string > &names) const |
| Return a list of the names of the integer variables in the dump. | |
| bool | remove (const std::string &name) |
| Remove variable from the object. | |
Represents named arrays with dimensions.
A dump object represents a dump of named arrays with dimensions. The arrays may have any dimensionality. The values for an array are typed to double or int.
See dump_reader for more information on the format.
Dump objects are created from reading dump files from an input stream.
The dimensions and values of variables may be accessed by name.
|
inline |
|
inlinevirtual |
Return true if this dump contains an integer valued array with the specified name.
| name | Variable name to test. |
true if the variable name has an integer array value. Implements stan::io::var_context.
|
inlinevirtual |
Return true if this dump contains the specified variable name is defined.
This method returns true even if the values are all integers.
| name | Variable name to test. |
true if the variable exists. Implements stan::io::var_context.
|
inlinevirtual |
Return the dimensions for the integer variable with the specified name.
| name | Name of variable. |
Implements stan::io::var_context.
|
inlinevirtual |
Return the dimensions for the double variable with the specified name.
| name | Name of variable. |
Implements stan::io::var_context.
|
inlinevirtual |
Return a list of the names of the integer variables in the dump.
| names | Vector to store the list of names in. |
Implements stan::io::var_context.
|
inlinevirtual |
Return a list of the names of the floating point variables in the dump.
| names | Vector to store the list of names in. |
Implements stan::io::var_context.
|
inline |
|
inlinevirtual |
Return the integer values for the variable with the specified name.
| name | Name of variable. |
Implements stan::io::var_context.
|
inlinevirtual |
Return the double values for the variable with the specified name or null.
| name | Name of variable. |
Implements stan::io::var_context.