本文整理汇总了C#中MathNet.Symbolics.Core.Signal.BehavesAsBeingDriven方法的典型用法代码示例。如果您正苦于以下问题:C# Signal.BehavesAsBeingDriven方法的具体用法?C# Signal.BehavesAsBeingDriven怎么用?C# Signal.BehavesAsBeingDriven使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MathNet.Symbolics.Core.Signal
的用法示例。
在下文中一共展示了Signal.BehavesAsBeingDriven方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DoTraverse
protected override void DoTraverse(Signal rootSignal, IScanVisitor visitor, bool ignoreHold)
{
if(rootSignal.BehavesAsBeingDriven(ignoreHold))
{
List<Guid> ports = new List<Guid>();
TraversePort(ports, rootSignal.DrivenByPort, rootSignal, ignoreHold, visitor);
}
}
示例2: TraverseSignal
private bool TraverseSignal(List<Guid> signals, Signal signal, Port target, bool ignoreHold, IScanVisitor visitor)
{
if(signal == null || signals.Contains(signal.InstanceId))
return true;
signals.Add(signal.InstanceId);
if(visitor.EnterSignal(signal, target, false, target == null))
{
if(signal.BehavesAsBeingDriven(ignoreHold))
{
Port port = signal.DrivenByPort;
foreach(Signal input in port.InputSignals)
if(!TraverseSignal(signals, input, port, ignoreHold, visitor))
return false; // finished
}
}
return visitor.LeaveSignal(signal, target, false, target == null);
}
示例3: TraverseSignal
private bool TraverseSignal(List<Guid> signals, List<Guid> ports, List<Guid> buses, Signal signal, Port target, bool ignoreHold, IScanVisitor visitor)
{
if(signal == null || signals.Contains(signal.InstanceId))
return true;
signals.Add(signal.InstanceId);
if(visitor.EnterSignal(signal, target, false, target == null))
{
// LEAF SIGNAL?
if(!signal.BehavesAsBeingDriven(ignoreHold))
{
if(!visitor.VisitLeaf(signal, false))
return false; // finished
}
else // HANDLE PORT
{
TraversePort(signals, ports, buses, signal.DrivenByPort, signal, ignoreHold, visitor);
}
}
return visitor.LeaveSignal(signal, target, false, target == null);
}