@Override public Object visitSetVector(GAPPSetVector gappSetVector, Object arg) { curLine++; for (SetVectorArgument curArg: gappSetVector.getEntries()) if (!curArg.isConstant()) { PairSetOfVariablesAndIndices p = (PairSetOfVariablesAndIndices) curArg; access(p.getSetOfVariable()); } return null; }
/** * Prints a SetVectorArgument instance * @param arg The argument */ private void printArgument(SetVectorArgument arg) { if (arg.isConstant()) result.append(((ConstantSetVectorArgument) arg).getValue()); else { PairSetOfVariablesAndIndices pair = (PairSetOfVariablesAndIndices) arg; result.append(pair.getSetOfVariable().prettyPrint()); printSelectors(pair.getSelectors()); } }
if(setVectorArg.isConstant()) ++wholeVectorSize; else final SetVectorArgument setVectorArg = itSetVectorArg.next(); if(setVectorArg.isConstant()) entries.add(String.valueOf(((ConstantSetVectorArgument)setVectorArg).getValue())); else {
@Override public Object visitSetVector(GAPPSetVector gappSetVector, Object arg) { LinkedList<SetVectorArgument> entries = gappSetVector.getEntries(); for (SetVectorArgument entry: entries) { if (!entry.isConstant()) { PairSetOfVariablesAndIndices pair = (PairSetOfVariablesAndIndices) entry; String name = pair.getSetOfVariable().getName(); if (multivectors.contains(name)) { pair.setSetOfVariable(new GAPPMultivector(name)); } else { if (vectors.contains(name)) { pair.setSetOfVariable(new GAPPVector(name)); } else { System.err.println("Multivector/Vector "+name+" is not declared!"); } } } } vectors.add(gappSetVector.getDestination().getName()); return null; }
/** * Copies a SetVectorArgument instance * @param arg The argument * @return The copied argument */ private SetVectorArgument copyArgument(SetVectorArgument arg) { if (arg.isConstant()) { ConstantSetVectorArgument c = (ConstantSetVectorArgument) arg; return new ConstantSetVectorArgument(c.getValue()); } else { PairSetOfVariablesAndIndices pair = (PairSetOfVariablesAndIndices) arg; return new PairSetOfVariablesAndIndices((GAPPSetOfVariables) GAPPValueHolderCopier.copyValueHolder(pair.getSetOfVariable()), copySelectorset(pair.getSelectors())); } }
if (curArg.isConstant()) { int i = 0; for (SetVectorArgument curArg: gappSetVector.getEntries()) { if (curArg.isConstant()) { ConstantSetVectorArgument c = (ConstantSetVectorArgument) curArg; destination.setEntry(i, c.getValue());
MultivectorComponent mvC = ((MvComponent) object).getMultivectorComponent(); Selector sel = new Selector(mvC.getBladeIndex(), object.isNegated() ? (byte) -1 : (byte) 1, algebra.getBlade(mvC.getBladeIndex()).toString()); if (last != null && !last.isConstant()) { PairSetOfVariablesAndIndices pair = (PairSetOfVariablesAndIndices) last;