/usr/include/opengm/graphicalmodel/parameters.hxx is in libopengm-dev 2.3.6+20160905-1build2.
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 | #ifndef OPENGM_PARAMETERS
#define OPENGM_PARAMETERS
namespace opengm{
template<class T,class I>
class Parameters{
public:
typedef T ValueType;
typedef I IndexType;
Parameters(const IndexType numberOfParameters=0)
: params_(numberOfParameters){
}
ValueType getParameter(const size_t pi)const{
OPENGM_ASSERT_OP(pi,<,params_.size());
return params_[pi];
}
void setParameter(const size_t pi,const ValueType value){
OPENGM_ASSERT_OP(pi,<,params_.size());
params_[pi]=value;
}
ValueType operator[](const size_t pi)const{
return getParameter(pi);
}
size_t numberOfParameters()const{
return params_.size();
}
private:
std::vector<ValueType> params_;
};
}
#endif /* OPENGM_PARAMETERS */
|