/usr/include/JAGS/compiler/CounterTab.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 | #ifndef COUNTERTAB_H_
#define COUNTERTAB_H_
#include <model/NodeArray.h>
#include <compiler/Counter.h>
#include <string>
#include <vector>
#include <map>
namespace jags {
/**
* @short Counter table
*
* The CounterTab class stores counters in the BUGS language
* representation of the model. Counters are only required during
* compilation of the model.
*
* @see NodeArray
* @see Counter
*/
class CounterTab {
std::vector<std::pair<std::string, Counter*> > _table;
public:
CounterTab();
~CounterTab();
/**
* Pushes a counter onto the internal counter stack and returns
* a pointer to it.
* @param name Name of the counter
* @param range Range over which the counter will vary
*/
Counter * pushCounter(std::string const &name, Range const &range);
/**
* Pops the top counter off the counter stack, freeing the associated
* memory in the process.
*/
void popCounter();
/**
* Returns a pointer associated with the given name, or a NULL
* pointer if there is no such Counter
*/
Counter *getCounter(std::string const &name) const;
};
} /* namespace jags */
#endif /* COUNTERTAB_H_ */
|