25class ASTResetter :
public AcyclicVisitor,
public Visitor<ASTNode>,
public Visitor<VariableNode> {
29 void visit(ASTNode& n)
override {
30 for (
auto const& c : n.args)
35 void visit(VariableNode& n)
override {
36 n.isCached = n.isScalar =
false;
37 n.cachedScalar =
nullptr;
38 n.cachedVector =
nullptr;
39 visit(
static_cast<ASTNode&
>(n));
resets cached values in ast
void reset(const ASTNodePtr root)
QuantLib::ext::shared_ptr< ASTNode > ASTNodePtr
Serializable Credit Default Swap.