public static G25.VariableType CreateSyntheticSMVtype(Specification S, CGdata cgd, FloatType FT, RefGA.Multivector value) { // make up list of basis blades rsbbp.BasisBlade[] L = new rsbbp.BasisBlade[value.BasisBlades.Length]; for (int i = 0; i < value.BasisBlades.Length; i++) { RefGA.BasisBlade B = value.BasisBlades[i]; if (B.symScale == null) { L[i] = new rsbbp.BasisBlade(new RefGA.BasisBlade(B.bitmap), B.scale); // constant value } else { L[i] = new rsbbp.BasisBlade(new RefGA.BasisBlade(B.bitmap)); // non-const value } } // get other required info String name = "nameOfType"; SMV.MULTIVECTOR_TYPE mvType = SMV.MULTIVECTOR_TYPE.MULTIVECTOR; String comment = "MISSING; PLEASE ADD TO SPECIFICATION"; //String constantName = null; // create the type G25.SMV synSMV = new G25.SMV(name, L, mvType, comment); // throw exception throw new G25.UserException("Missing specialized multivector type.\n" + "Please add the following XML to the specification to fix the dependency:\n" + XML.SMVtoXmlString(S, synSMV)); }
public static G25.VariableType CreateSyntheticSMVtype(Specification S, CGdata cgd, FloatType FT, RefGA.Multivector value) { // make up list of basis blades rsbbp.BasisBlade[] L = new rsbbp.BasisBlade[value.BasisBlades.Length]; for (int i = 0 ; i < value.BasisBlades.Length; i++) { RefGA.BasisBlade B = value.BasisBlades[i]; if (B.symScale == null) L[i] = new rsbbp.BasisBlade(new RefGA.BasisBlade(B.bitmap), B.scale); // constant value else L[i] = new rsbbp.BasisBlade(new RefGA.BasisBlade(B.bitmap)); // non-const value } // get other required info String name = "nameOfType"; SMV.MULTIVECTOR_TYPE mvType = SMV.MULTIVECTOR_TYPE.MULTIVECTOR; String comment = "MISSING; PLEASE ADD TO SPECIFICATION"; //String constantName = null; // create the type G25.SMV synSMV = new G25.SMV(name, L, mvType, comment); // throw exception throw new G25.UserException("Missing specialized multivector type.\n" + "Please add the following XML to the specification to fix the dependency:\n" + XML.SMVtoXmlString(S, synSMV)); }