@Override public void visit(AssignmentNode node) { node.getValue().accept(dfgReplacer); if (dfgReplacer.result != null) { node.setValue(dfgReplacer.result); dfgReplacer.result = null; } if (replaceMap.containsKey(node.getVariable().getName())) node.setVariable((Variable) replaceMap.get(node.getVariable().getName()).copy()); }
node.setVariable((Variable) visitor.replace(node.getVariable())); node.setValue(visitor.replace(node.getValue())); String newName = renderingExpressions.get(name).toString(); AssignmentNode nodeCpy = node.copyElements(); nodeCpy.setVariable(new MultivectorComponent(newName, ((MultivectorComponent) nodeCpy.getVariable()).getBladeIndex())); sb.append(nodeCpy.toString()); sb.append("\n");
@Override public void visit(AssignmentNode node) { node.setVariable((Variable) visitor.replace(node.getVariable())); node.setValue(visitor.replace(node.getValue())); super.visit(node); }
/** * Differentiate the codepieces with respect to ox,oy,z * @param codePieces */ private void diffentiateCodePieces(LinkedList<CodePiece> codePieces) { //differentiate each item of codePieces with respect to t with the help of maxima to _V_PRODUCT_SD for (CodePiece cp: codePieces) { LinkedList<AssignmentNode> derived; derived = differentiater.differentiate(cp, new MultivectorComponent("_V_t",0)); if (derived != null) for (AssignmentNode d: derived) { d.setVariable(new MultivectorComponent(d.getVariable().getName()+"D", 0)); cp.add(d); } } }
node.setVariable((Variable) visitor.replace(node.getVariable())); node.setValue(visitor.replace(node.getValue()));
node.setVariable((Variable) visitor.replace(node.getVariable())); node.setValue(visitor.replace(node.getValue()));
if (derived != null) for (AssignmentNode d: derived) { d.setVariable(new MultivectorComponent(d.getVariable().getName()+"Dx", 0)); cp.add(d); if (derived != null) for (AssignmentNode d: derived) { d.setVariable(new MultivectorComponent(d.getVariable().getName()+"Dy", 0)); cp.add(d); if (derived != null) for (AssignmentNode d: derived) { d.setVariable(new MultivectorComponent(d.getVariable().getName()+"Dz", 0)); cp.add(d);