private void translate_BasisBladesSet_List_Item_GASpan(ParseTreeNode node) { var nodeIdentifierList = node.ChildNodes[0]; //Create the set of unique spanning vectors for the GA subspace var basisVectorsList = new List <int>(nodeIdentifierList.ChildNodes.Count); foreach (var nodeIdentifier in nodeIdentifierList.ChildNodes) { GMacFrameBasisVector basisVector; var basisVectorName = GenUtils.Translate_Identifier(nodeIdentifier); if (_frame.LookupBasisVector(basisVectorName, out basisVector) == false) { CompilationLog.RaiseGeneratorError <int>("Basis vector not recognized", nodeIdentifier); } //Only add unique basis vectors to the spanning set if (basisVectorsList.Exists(x => x == basisVector.BasisVectorId) == false) { basisVectorsList.Add(basisVector.BasisVectorId); } } //Compute the dimension of the GA spanned by the basis vectors var subspaceDimension = 1 << basisVectorsList.Count; //Scalars are always part of the GA subspace based on any given set of basis vectors AddBasisBladeId(0); //Add the remaining basis blades to the GA subspace for (var idIndex = 1; idIndex <= subspaceDimension - 1; idIndex++) { var id = GMacMathUtils.ComposeGaSubspaceBasisBladeId(basisVectorsList, idIndex); AddBasisBladeId(id); } }