/** * Fills buffer with specified town name * @param buff buffer start * @param par town name parameters * @param townnameparts 'encoded' town name * @param last end of buffer * @return pointer to terminating '\0' */ char *GetTownName(char *buff, const TownNameParams *par, uint32 townnameparts, const char *last) { if (par->grfid == 0) { int64 args_array[1] = { townnameparts }; StringParameters tmp_params(args_array); return GetStringWithArgs(buff, par->type, &tmp_params, last); } return GRFTownNameGenerate(buff, par->grfid, par->type, townnameparts, last); }
void Hamiltonian::set_params(boost::python::list params_) { /** Set the parameters of the Hamiltonian So far, the model Hamiltonians are implied \param[in] params_ The Python list of double-valued parameters to feed into the Hamiltonian */ int sz = boost::python::len(params_); vector<double> tmp_params(sz, 0.0); // Now copy input params: for(int i=0; i<sz; i++) { tmp_params[i] = boost::python::extract<double>(params_[i]); } set_params(tmp_params); }