/usr/include/JAGS/sampler/ImmutableSampler.h is in jags 4.2.0-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | #ifndef IMMUTABLE_SAMPLER_H_
#define IMMUTABLE_SAMPLER_H_
#include <sampler/Sampler.h>
namespace jags {
struct RNG;
class ImmutableSampleMethod;
/**
* @short Samples multiple chains in parallel
*
* Uses an ImmutableSampleMethod object to update each chain
* independently.
*
* In contrast to the MutableSampler, only one sample
* method is required to update all chains.
*/
class ImmutableSampler : public Sampler
{
ImmutableSampleMethod const * const _method;
const unsigned int _nchain;
const std::string _name;
public:
/**
* Constructor.
*
* @param gv View of the sample graph, passed directly to the
* parent class Sampler.
*
* @param methods Pointer to an ImmutableSampleMethod This
* must be dynamically allocated, as the
* ImmutableSampler will take ownership of it, and
* will delete it when the destructor is called.
*
* @param name Name of the sampler, which will be returned
* by the member function name.
*/
ImmutableSampler(GraphView *gv, ImmutableSampleMethod* method,
std::string const &name);
~ImmutableSampler();
/**
* Updates all chains in parallel using the update method
* provided to the constructor
*/
void update(std::vector<RNG*> const &rngs);
/**
* The sampler is not adaptive
*/
bool isAdaptive() const;
/**
* This does nothing
*/
void adaptOff();
/**
* This always returns true
*/
bool checkAdaptation() const;
/**
* Returns the name of the sampler, as given to the constructor.b
*/
std::string name() const;
};
} /* namespace jags */
#endif /* IMMUTABLE_SAMPLER_H_ */
|