예제 #1
0
        private static int[] ComputeBasisBladesSignatures(int[] frameSigList)
        {
            var vSpaceDim = frameSigList.Length;
            var bbsList   = new int[FrameUtils.GaSpaceDimension(vSpaceDim)];

            bbsList[0] = 1;

            for (var m = 0; m < vSpaceDim; m++)
            {
                bbsList[1 << m] = frameSigList[m];
            }

            var idsSeq = FrameUtils.BasisBladeIDsSortedByGrade(vSpaceDim, 2);

            foreach (var id in idsSeq)
            {
                int id1, id2;

                id.SplitBySmallestBasisVectorId(out id1, out id2);

                bbsList[id] = bbsList[id1] * bbsList[id2];
            }

            return(bbsList);
        }
예제 #2
0
        private static MathematicaScalar[] ComputeBasisBladesSignatures(MathematicaScalar[] basisVectorsSignaturesList)
        {
            var vspacedim = basisVectorsSignaturesList.Length;
            var bbsList   = new MathematicaScalar[FrameUtils.GaSpaceDimension(vspacedim)];

            bbsList[0] = SymbolicUtils.Constants.One;

            for (var m = 0; m < vspacedim; m++)
            {
                bbsList[1 << m] = basisVectorsSignaturesList[m];
            }

            var idsSeq = FrameUtils.BasisBladeIDsSortedByGrade(vspacedim, 2);

            foreach (var id in idsSeq)
            {
                int id1, id2;

                id.SplitBySmallestBasisVectorId(out id1, out id2);

                bbsList[id] = bbsList[id1] * bbsList[id2];
            }

            return(bbsList);
        }
예제 #3
0
        public static GaOuterMorphismFull Create(ISymbolicMatrix vectorTransformMatrix)
        {
            var domainGaSpaceDim   = FrameUtils.GaSpaceDimension(vectorTransformMatrix.Columns);
            var codomainGaSpaceDim = FrameUtils.GaSpaceDimension(vectorTransformMatrix.Rows);

            var transformedBasisBlades = new GaMultivector[domainGaSpaceDim];

            transformedBasisBlades[0] = GaMultivector.CreateScalar(codomainGaSpaceDim, MathematicaScalar.Create(vectorTransformMatrix.CasInterface, 1));

            for (var id = 1; id <= domainGaSpaceDim - 1; id++)
            {
                if (id.IsValidBasisVectorId())
                {
                    transformedBasisBlades[id] = CreateFromMatrixColumn(vectorTransformMatrix, id.BasisBladeIndex());
                }
                else
                {
                    int id1, id2;
                    id.SplitBySmallestBasicPattern(out id1, out id2);

                    transformedBasisBlades[id] = transformedBasisBlades[id1].OuterProduct(transformedBasisBlades[id2]);
                }
            }

            return(new GaOuterMorphismFull(transformedBasisBlades));
        }
예제 #4
0
        private static GaMultivector CreateFromMatrixColumn(ISymbolicMatrix matrix, int col)
        {
            var gaSpaceDim = FrameUtils.GaSpaceDimension(matrix.Rows);

            var mv = GaMultivector.CreateZero(gaSpaceDim);

            for (var index = 0; index < matrix.Rows; index++)
            {
                mv[1, index] = matrix[index, col];
            }

            return(mv);
        }