New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add constructor to class `stan/io/array_var_context` which takes as input an Eigen::Matrix vector of reals #2723

Open
mitzimorris opened this Issue Jan 9, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@mitzimorris
Copy link
Member

mitzimorris commented Jan 9, 2019

Summary:

constructor method to class stan/io/array_var_context for real-valued vars only has params:

 /**
       * Construct an array_var_context from only real value arrays.
       *
       * @param names_r  names for each element
       * @param values_r a vector of double values for all elements
       * @param dim_r   a vector of dimensions
       */

add constructor methods where values_r argument is of type Eigen::VectorXd and Eigen::RowVectorXd

Description:

this would allow us to write methods for the standalone generated quantities feature which operate on Eigen matrices directly. when working against csv output files using the stan::io::csv_reader, samples are read into an Eigen matrixXd. the parameter values in each row must be copied into a std::vector<double>. avoiding the copy step would be a win.

Current Version:

v2.18.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment