Node tf = std::get<0>(sp);
unsigned d = std::get<1>(sp);
Node c = std::get<2>(sp);
- d_tstate.d_secant_points[tf][d].push_back(c);
+ // we have a CDList within the maps, creating it requires some care
+ auto& secant_points = d_tstate.d_secant_points[tf];
+ auto it = secant_points.find(d);
+ if (it == secant_points.end())
+ {
+ it = secant_points.emplace(d, d_tstate.d_env.getUserContext()).first;
+ }
+ it->second.push_back(c);
}
}
if (mvaa != mvaaa)
{
std::vector<Node> exp;
- for (unsigned j = 0, size = a.getNumChildren(); j < size; j++)
+ for (uint64_t j = 0, size = a.getNumChildren(); j < size; j++)
{
exp.push_back(a[j].eqNode(aa[j]));
}
TNode center,
unsigned d)
{
+ auto spit = d_secant_points[e].find(d);
+ if (spit == d_secant_points[e].end())
+ {
+ spit = d_secant_points[e].emplace(d, d_env.getUserContext()).first;
+ }
// bounds are the minimum and maximum previous secant points
// should not repeat secant points: secant lemmas should suffice to
// rule out previous assignment
- Assert(std::find(
- d_secant_points[e][d].begin(), d_secant_points[e][d].end(), center)
- == d_secant_points[e][d].end());
+ Assert(std::find(spit->second.begin(), spit->second.end(), center)
+ == spit->second.end());
// Insert into the (temporary) vector. We do not update this vector
// until we are sure this secant plane lemma has been processed. We do
// this by mapping the lemma to a side effect below.
- std::vector<Node> spoints = d_secant_points[e][d];
+ std::vector<Node> spoints{spit->second.begin(), spit->second.end()};
spoints.push_back(center);
// sort
* each transcendental function application. We store this set for each
* Taylor degree.
*/
- std::unordered_map<Node, std::map<unsigned, std::vector<Node>>>
+ std::unordered_map<Node, std::map<uint64_t, context::CDList<Node>>>
d_secant_points;
/** PI