internal GaFrameNonOrthogonal(GaFrame baseOrthoFrame, ISymbolicMatrix ipm, GaOuterMorphism derivedToBaseOm, GaOuterMorphism baseToDerivedOm) { if (baseOrthoFrame.IsOrthogonal == false) { throw new GMacSymbolicException("Base frame must be orthogonal"); } if (ipm.IsSymmetric() == false || ipm.IsDiagonal()) { throw new GMacSymbolicException("Inner product matrix must be symmetric and non-diagonal"); } InnerProductMatrix = ipm.ToMathematicaMatrix(); Dfs = new DerivedFrameSystem(baseOrthoFrame, this, derivedToBaseOm, baseToDerivedOm); }
public static GaSymFrame CreateFromIpm(ISymbolicMatrix ipm) { if (ipm.IsSymmetric() == false) { throw new GMacSymbolicException("Inner product matrix must be symmetric"); } if (ipm.IsIdentity()) { return(CreateEuclidean(ipm.RowCount)); } return (ipm.IsDiagonal() ? CreateOrthogonal(ipm.GetDiagonal()) : CreateNonOrthogonalFromIpm(ipm.ToMathematicaMatrix())); }
internal GaSymFrameNonOrthogonal(GaSymFrame baseOrthoFrame, ISymbolicMatrix ipm, GaSymOutermorphism derivedToBaseOm, GaSymOutermorphism baseToDerivedOm) { if (baseOrthoFrame.IsOrthogonal == false) { throw new GMacSymbolicException("Base frame must be orthogonal"); } if (ipm.IsSymmetric() == false || ipm.IsDiagonal()) { throw new GMacSymbolicException("Inner product matrix must be symmetric and non-diagonal"); } InnerProductMatrix = ipm.ToMathematicaMatrix(); NonOrthogonalMetric = new GaSymMetricNonOrthogonal( baseOrthoFrame, this, derivedToBaseOm, baseToDerivedOm ); Op = ComputedOp = new GaSymOp(VSpaceDimension); Gp = ComputedGp = GaSymBilinearProductCba.CreateGp(NonOrthogonalMetric); Sp = ComputedSp = GaSymBilinearProductCba.CreateSp(NonOrthogonalMetric); Lcp = ComputedLcp = GaSymBilinearProductCba.CreateLcp(NonOrthogonalMetric); Rcp = ComputedRcp = GaSymBilinearProductCba.CreateRcp(NonOrthogonalMetric); Fdp = ComputedFdp = GaSymBilinearProductCba.CreateFdp(NonOrthogonalMetric); Hip = ComputedHip = GaSymBilinearProductCba.CreateHip(NonOrthogonalMetric); Acp = ComputedAcp = GaSymBilinearProductCba.CreateAcp(NonOrthogonalMetric); Cp = ComputedCp = GaSymBilinearProductCba.CreateCp(NonOrthogonalMetric); UnitPseudoScalarCoef = MaxBasisBladeId.BasisBladeIdHasNegativeReverse() ? CasConstants.MinusOne / BasisBladeSignature(MaxBasisBladeId)[0].ToMathematicaScalar() : CasConstants.One / BasisBladeSignature(MaxBasisBladeId)[0].ToMathematicaScalar(); }
public ISymbolicVector Times(ISymbolicMatrix m) { var e = CasInterface[Mfs.Dot[Expression, m.ToMathematicaMatrix().Expression]]; return(Create(CasInterface, e)); }