/* void Dstar::updateCell(int x, int y, double val) * -------------------------- * As per [S. Koenig, 2002] */ void Dstar::updateCell(int x, int y, double val) { state u; u.x = x; u.y = y; if ((u == s_start) || (u == s_goal)) return; makeNewCell(u); cellHash[u].cost = val; updateVertex(u); }
/* void Dstar::updateCell(int x, int y, double val) * -------------------------- * As per [S. Koenig, 2002] */ void Dstar::updateCell(int x, int y, double val) { state u; u.x = x; u.y = y; if ((u == s_start) || (u == s_goal)) return; // if the value is still the same, don't need to do anything ds_ch::iterator cur = cellHash.find(u); if ((cur != cellHash.end()) && (near(cur->second.cost,val))) return; makeNewCell(u); cellHash[u].cost = val; updateVertex(u); }
/* void Dstar::setRHS(state u, double rhs) * -------------------------- * Sets the rhs value for state u */ double Dstar::setRHS(state u, double rhs) { makeNewCell(u); cellHash[u].rhs = rhs; }
/* void Dstar::setG(state u, double g) * -------------------------- * Sets the G value for state u */ void Dstar::setG(state u, double g) { makeNewCell(u); cellHash[u].g = g; }
/* void Dstar::setRHS(state u, double rhs) * -------------------------- * Sets the rhs value for state u */ void Dstar::setRHS(const state &u, double rhs) { makeNewCell(u); // makes a cell if one doesn't exist here yet cellHash[u].rhs = rhs; }
/* void Dstar::setG(state u, double g) * -------------------------- * Sets the G value for state u */ void Dstar::setG(const state &u, double g) { makeNewCell(u); // makes a cell if one doesn't exist here yet cellHash[u].g = g; }