本文整理汇总了C#中Specification.IsSpecializedMultivectorName方法的典型用法代码示例。如果您正苦于以下问题:C# Specification.IsSpecializedMultivectorName方法的具体用法?C# Specification.IsSpecializedMultivectorName怎么用?C# Specification.IsSpecializedMultivectorName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Specification
的用法示例。
在下文中一共展示了Specification.IsSpecializedMultivectorName方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: value
protected RefGA.Multivector m_returnValue; ///< returned value (symbolic multivector)
#endregion Fields
#region Methods
/// <summary>
/// Checks if this FunctionGenerator can implement a certain function.
/// </summary>
/// <param name="S">The specification of the algebra.</param>
/// <param name="F">The function to be implemented.</param>
/// <returns>true if 'F' can be implemented</returns>
public override bool CanImplement(Specification S, G25.fgs F)
{
String arg1Type = F.GetArgumentTypeName(0, S.m_GMV.Name);
return ((F.Name == "sas") && (F.MatchNbArguments(3) &&
(S.IsSpecializedMultivectorName(arg1Type) || (arg1Type == S.m_GMV.Name)) &&
S.IsFloatType(F.GetArgumentTypeName(1, S.m_GMV.Name)) &&
S.IsFloatType(F.GetArgumentTypeName(2, S.m_GMV.Name))));
}
示例2: CanImplement
/// <summary>
/// Checks if this FunctionGenerator can implement a certain function.
/// </summary>
/// <param name="S">The specification of the algebra.</param>
/// <param name="F">The function to be implemented.</param>
/// <returns>true if 'F' can be implemented</returns>
public override bool CanImplement(Specification S, G25.fgs F)
{
string arg1Type = F.GetArgumentTypeName(0, S.m_GMV.Name);
return ((IsIncrement(F) || IsDecrement(F)) && (F.MatchNbArguments(1) &&
(S.IsSpecializedMultivectorName(arg1Type) || (arg1Type == S.m_GMV.Name))));
}
示例3: NotMixSmvGmv
/// <summary>
/// Return true if 'F' does not mix arguments of type SMV and GMV
/// </summary>
/// <param name="S">Specification of algebra</param>
/// <param name="F">Function specification</param>
/// <param name="defaultArgType">Default argument type for all arguments (todo: allow for per-argument type)</param>
/// <param name="nbArgs">Number of arguments.</param>
/// <returns>true if 'F' does not mix arguments of type SMV and GMV</returns>
public static bool NotMixSmvGmv(Specification S, G25.fgs F, int nbArgs, String defaultArgType)
{
bool useSMV = false;
bool useGMV = false;
for (int a = 0; a < nbArgs; a++)
{
String typeName = F.GetArgumentTypeName(a, defaultArgType);
useSMV |= S.IsSpecializedMultivectorName(typeName);
useGMV |= S.m_GMV.Name == typeName;
}
return (!(useSMV && useGMV));
}
示例4: IsSmv
/// <summary>
/// Return true if argument 'argIdx' in 'F' is a multivector type.
/// </summary>
/// <param name="S">Specification of algebra</param>
/// <param name="F">Function specification</param>
/// <param name="argIdx">Index of argument. If out of range, false is returned.</param>
/// <returns>true if argument 'argIdx' in 'F' is an multivector type.</returns>
public static bool IsSmv(Specification S, G25.fgs F, int argIdx)
{
if (argIdx >= F.NbArguments) return false;
return (S.IsSpecializedMultivectorName(F.GetArgumentTypeName(argIdx, "")));
}
示例5: CanImplement
/// <summary>
/// Checks if this FunctionGenerator can implement a certain function.
/// </summary>
/// <param name="S">The specification of the algebra.</param>
/// <param name="F">The function to be implemented.</param>
/// <returns>true if 'F' can be implemented</returns>
public override bool CanImplement(Specification S, G25.fgs F)
{
if (!(F.Name.StartsWith(RandomScalar.RANDOM) &&
S.IsSpecializedMultivectorName(getSMVnameFromFGS(F)))) return false;
if (F.NbArguments > 1) return false;
return true;
}