Skip to content

Allow const access to base_hmc::_z #2947

Description

@kedartal

PR

Implementation in #2946

Summary:

Allow access to stan::mcmc::base_hmc::_z in constant contexts.

Description:

When integrating Stan as a library, it is many times useful to work with a const reference to a sampler, but then access to _z is blocked. The PR in #2946 suggests adding to stan::mcmc::base_hmc

const typename Hamiltonian<Model, BaseRNG>::PointType& z() const noexcept {
   return z_;
}

Current Version:

v2.24.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions