public static MathematicaMatrix CreateRowVector(ISymbolicVector vector, bool asFullMatrix = true) { var mathExpr = asFullMatrix ? vector.CasInterface[Mfs.List[vector.ToMathematicaFullVector().MathExpr]] : vector.CasInterface[Mfs.SparseArray[Mfs.List[vector.ToMathematicaFullVector().MathExpr]]]; return(new MathematicaMatrix(vector.CasInterface, mathExpr)); }
public static MathematicaMatrix CreateDiagonal(ISymbolicVector vector, bool asFullMatrix = true) { var mathExpr = asFullMatrix ? vector.CasInterface[Mfs.DiagonalMatrix[vector.ToMathematicaVector().Expression]] : vector.CasInterface[Mfs.SparseArray[Mfs.DiagonalMatrix[vector.ToMathematicaVector().Expression]]]; return(new MathematicaMatrix(vector.CasInterface, mathExpr)); }
public static GaSymMultivector SetTerms(this GaSymMultivector mv, ISymbolicVector termsMv) { for (var id = 0; id < termsMv.Size; id++) { var coef = termsMv[id].Expression; if (!coef.IsNullOrZero()) { mv.SetTermCoef(id, coef); } } return(mv); }
public ISymbolicVector Times(ISymbolicVector v) { return(v); }
public static IGaSymMultivectorTemp CreateCopyTemp(ISymbolicVector v) { return(CreateZeroTemp(v.Size).SetTerms(v)); }
public static GaSymMultivector CreateCopy(ISymbolicVector v) { return(CreateZero(v.Size).SetTerms(v)); }
public ISymbolicVector Times(ISymbolicVector v) { var e = CasInterface[Mfs.Dot[MathExpr, v.ToMathematicaVector().MathExpr]]; return(MathematicaVector.Create(CasInterface, e)); }