本文整理汇总了C#中MathNet.Symbolics.Core.Signal.AskForProperty方法的典型用法代码示例。如果您正苦于以下问题:C# Signal.AskForProperty方法的具体用法?C# Signal.AskForProperty怎么用?C# Signal.AskForProperty使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MathNet.Symbolics.Core.Signal
的用法示例。
在下文中一共展示了Signal.AskForProperty方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: IsAlwaysReal
public static bool IsAlwaysReal(Signal signal)
{
return signal.AskForProperty("RealSet", "Std")
|| IsConstant(signal) && RealValue.Converter.CanConvertLosslessFrom(signal.Value)
|| IsAlwaysRational(signal);
}
示例2: IsAlwaysInteger
/// <summary>
/// Whether the signal is restricted to be an integer, that is one of ...,-3,-2,-1,0,1,2,3,...
/// </summary>
public static bool IsAlwaysInteger(Signal signal)
{
return signal.AskForProperty("IntegerSet", "Std")
|| IsConstant(signal) && IntegerValue.Converter.CanConvertLosslessFrom(signal.Value)
|| IsAlwaysNonnegativeInteger(signal);
}
示例3: IsConstant
//public static Signal Constant(Context context, ValueStructure value)
//{
// Signal s = new Signal(context, value);
// s.Label = "Constant_" + value.ToString();
// s.Properties.AddProperty(Properties.ConstantSignalProperty.Instance);
// return s;
//}
public static bool IsConstant(Signal signal)
{
return signal.AskForProperty("Constant", "Std");
}
示例4: IsConstant
//public static Signal Constant(Context context, ValueStructure value)
//{
// Signal s = new Signal(context, value);
// s.Label = "Constant_" + value.ToString();
// s.AddConstraint(Properties.ConstantSignalProperty.Instance);
// return s;
//}
public static bool IsConstant(Signal signal)
{
if(signal == null)
throw new ArgumentNullException("signal");
return signal.AskForProperty("Constant", "Std");
}
示例5: IsAlwaysReal
public static bool IsAlwaysReal(Signal signal)
{
if(signal == null)
throw new ArgumentNullException("signal");
return signal.AskForProperty("RealSet", "Std")
|| IsConstant(signal) && RealValue.Converter.CanConvertLosslessFrom(signal.Value)
|| IsAlwaysRational(signal);
}
示例6: IsAlwaysPositiveInteger
//public static bool IsConstantZero(Signal signal)
//{
// return IsConstant(signal) && (signal.Value.ToString() == "0");
//}
//public static bool IsConstantOne(Signal signal)
//{
// return IsConstant(signal) && (signal.Value.ToString() == "1");
//}
/// <summary>
/// Whether the signal is restricted to be an integer > 0, that is one of 1,2,3,...
/// </summary>
public static bool IsAlwaysPositiveInteger(Signal signal)
{
if(signal == null)
throw new ArgumentNullException("signal");
return signal.AskForProperty("PositiveIntegerSet", "Std")
|| IsConstant(signal) && IntegerValue.Converter.CanConvertLosslessFrom(signal.Value) && IntegerValue.ConvertFrom(signal.Value).Value > 0;
}