Esempio n. 1
0
        ///Select the signature definition method of the current frame
        private GaSymFrame translate_Frame_Signature(ParseTreeNode node)
        {
            var subnode = node.ChildNodes[0];

            switch (subnode.ToString())
            {
            case GMacParseNodeNames.FrameSignatureEuclidean:
                return(GaSymFrame.CreateEuclidean(_vSpaceDim));

            case GMacParseNodeNames.FrameSignatureIpm:
                return(translate_Frame_Signature_IPM(subnode));

            case GMacParseNodeNames.FrameSignatureCbm:
                return(translate_Frame_Signature_CBM(subnode));

            case GMacParseNodeNames.FrameSignatureOrthonormal:
                return(translate_Frame_Signature_Orthonormal(subnode));

            case GMacParseNodeNames.FrameSignatureOrthogonal:
                return(translate_Frame_Signature_Orthogonal(subnode));

            case GMacParseNodeNames.FrameSignatureReciprocal:
                return(translate_Frame_Signature_Reciprocal(subnode));

            default:
                return(CompilationLog.RaiseGeneratorError <GaSymFrame>("Illegal frame signature definition", subnode));
            }
        }
Esempio n. 2
0
 public GMacSymbolicTest4()
 {
     Frame = GaSymFrame.CreateEuclidean(3);
 }
Esempio n. 3
0
        private void EuclideanTables()
        {
            MdSparsityTable = new MarkdownTable();
            var firstColumn = MdSparsityTable.AddColumn("op", MarkdownTableColumnAlignment.Left);

            firstColumn.Add("Geometric Product - Multivectors");
            firstColumn.Add("Geometric Product - Terms");

            firstColumn.Add("Scalar Product - Multivectors");
            firstColumn.Add("Scalar Product - Terms");

            firstColumn.Add("Left Contraction Product - Multivectors");
            firstColumn.Add("Left Contraction Product - Terms");

            firstColumn.Add("Outer Product - Multivectors");
            firstColumn.Add("Outer Product - Terms");


            MdSizeTable = new MarkdownTable();
            firstColumn = MdSizeTable.AddColumn("op", MarkdownTableColumnAlignment.Left);

            firstColumn.Add("Geometric Product - Hash");
            firstColumn.Add("Geometric Product - Tree");
            firstColumn.Add("Geometric Product - Array");
            firstColumn.Add("Geometric Product - Combinations");

            firstColumn.Add("Scalar Product - Hash");
            firstColumn.Add("Scalar Product - Tree");
            firstColumn.Add("Scalar Product - Array");
            firstColumn.Add("Scalar Product - Combinations");

            firstColumn.Add("Left Contraction Product - Hash");
            firstColumn.Add("Left Contraction Product - Tree");
            firstColumn.Add("Left Contraction Product - Array");
            firstColumn.Add("Left Contraction Product - Combinations");

            firstColumn.Add("Outer Product - Hash");
            firstColumn.Add("Outer Product - Tree");
            firstColumn.Add("Outer Product - Array");
            firstColumn.Add("Outer Product - Combinations");


            for (var n = MinVSpaceDimension; n <= MaxVSpaceDimension; n++)
            {
                Console.Out.WriteLine("Euclidean Frame " + n);
                Frame = GaSymFrame.CreateEuclidean(n);

                var sparsityColumn = MdSparsityTable.AddColumn(
                    "n" + n,
                    MarkdownTableColumnAlignment.Right,
                    n.ToString()
                    );

                var sizeColumn = MdSizeTable.AddColumn(
                    "n" + n,
                    MarkdownTableColumnAlignment.Right,
                    n.ToString()
                    );

                var t = GpHashTableSize();
                sparsityColumn.Add(t.Item2.ToString(LongFmt));
                sparsityColumn.Add(t.Item3.ToString(LongFmt));
                sizeColumn.Add(t.Item1.ToString(LongFmt));
                sizeColumn.Add(GpTreeTableSize().ToString(LongFmt));
                sizeColumn.Add(GpArrayTableSize().ToString(LongFmt));
                sizeColumn.Add(GpCoefSumsTableSize().ToString(LongFmt));

                t = SpSparseTableSize();
                sparsityColumn.Add(t.Item2.ToString(LongFmt));
                sparsityColumn.Add(t.Item3.ToString(LongFmt));
                sizeColumn.Add(t.Item1.ToString(LongFmt));
                sizeColumn.Add(SpTreeTableSize().ToString(LongFmt));
                sizeColumn.Add(SpArrayTableSize().ToString(LongFmt));
                sizeColumn.Add(SpCoefSumsTableSize().ToString(LongFmt));

                t = LcpHashTableSize();
                sparsityColumn.Add(t.Item2.ToString(LongFmt));
                sparsityColumn.Add(t.Item3.ToString(LongFmt));
                sizeColumn.Add(t.Item1.ToString(LongFmt));
                sizeColumn.Add(LcpTreeTableSize().ToString(LongFmt));
                sizeColumn.Add(LcpArrayTableSize().ToString(LongFmt));
                sizeColumn.Add(LcpCoefSumsTableSize().ToString(LongFmt));

                t = OpSparseTableSize();
                sparsityColumn.Add(t.Item2.ToString(LongFmt));
                sparsityColumn.Add(t.Item3.ToString(LongFmt));
                sizeColumn.Add(t.Item1.ToString(LongFmt));
                sizeColumn.Add(OpTreeTableSize().ToString(LongFmt));
                sizeColumn.Add(OpArrayTableSize().ToString(LongFmt));
                sizeColumn.Add(OpCombinationsTableSize().ToString(LongFmt));
            }
        }