本文整理汇总了C#中G25.GetOption方法的典型用法代码示例。如果您正苦于以下问题:C# G25.GetOption方法的具体用法?C# G25.GetOption怎么用?C# G25.GetOption使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类G25
的用法示例。
在下文中一共展示了G25.GetOption方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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 == "log") && (F.MatchNbArguments(1)))) return false;
string type = F.GetOption("type");
if (type == null) return false;
return type.ToLower().Equals("euclidean");
}
示例2: GetOrigin
/// <returns>the RefGA.Multivector which represents the origin ("no" by default, but can be set by <c>optionOrigin="..."</c>).</returns>
public RefGA.Multivector GetOrigin(Specification S, G25.fgs F)
{
String originName = "no";
if (F.GetOption("origin") != null)
originName = F.GetOption("origin");
int bvIdx = S.GetBasisVectorIndex(originName);
if (bvIdx < 0)
throw new G25.UserException("Unknown basis vector specified for origin: " + originName,
XML.FunctionToXmlString(S, F));
else return new RefGA.Multivector(new RefGA.BasisBlade((uint)(1 << bvIdx)));
}