/// <returns>true when input to function has one argument which is a SMV of grade 2.</returns> public bool IsFlatPointBased(Specification S, G25.fgs F, FloatType FT) { if (!(F.ArgumentTypeNames.Length == 1) && (!IsCoordBased(S, F, FT))) { return(false); } G25.SMV smv = S.GetSMV(F.ArgumentTypeNames[0]); if (smv == null) { return(false); } return((smv.LowestGrade() == 2) && (smv.HighestGrade() == 2)); }
/// <summary> /// Return true if <c>smv</c> can be initialized with random values for each coordinate: /// - scalar types /// - vector types /// - dual vector types /// - pseudoscalar types /// - G25.SMV.MULTIVECTOR_TYPE.MULTIVECTOR types /// </summary> /// <param name="S"></param> /// <param name="smv"></param> /// <returns>true if <c>smv</c> can be initialized with random values for each coordinate.</returns> public static bool InitWithRandomCoordinates(Specification S, G25.SMV smv) { if (smv.MvType == G25.SMV.MULTIVECTOR_TYPE.MULTIVECTOR) { return(true); } int lg = smv.LowestGrade(); int hg = smv.HighestGrade(); if (lg != hg) { return(false); } return((lg == 0) || (lg == 1) || (lg == (S.m_dimension - 1)) || (lg == S.m_dimension)); }