26 Enhanced3BConc(
size_t n,
const std::map<size_t, doublereal>& enhanced,
27 doublereal deflt = 1.0) {
28 std::map<size_t, doublereal>::const_iterator iter;
29 for (iter = enhanced.begin(); iter != enhanced.end(); ++iter) {
30 m_index.push_back(iter->first);
31 m_eff.push_back(iter->second - deflt);
38 const vector_fp& efficiencies, doublereal deflt = 1.0)
39 : m_index(e_index), m_eff(efficiencies) {
42 for (
size_t i = 0; i < m_n; i++) {
47 doublereal update(
const vector_fp& c, doublereal ctot)
const {
49 for (
size_t i = 0; i < m_n; i++) {
50 sum += m_eff[i] * c[m_index[i]];
52 return m_deflt * ctot + sum;
55 void getEfficiencies(
vector_fp& eff)
const {
56 for (
size_t i = 0; i < m_n; i++) {
57 eff[m_index[i]] = m_eff[i] + m_deflt;
63 std::vector<size_t> m_index;