public void SetConditionCount(int count) { if (inlets.Length == count || count <= 1) return; else if (inlets.Length < count) { var missing = new ValueInlet<bool>[count - inlets.Length]; missing.Fill(i => new ValueInlet<bool>()); inlets = inlets.Joined(missing); } else if (inlets.Length > count) Array.Resize(ref inlets, count); Array.Resize(ref nextNodes, count + 1); }
public void SetConditionCount(int count) { if (inlets.Length == count || count <= 1) { return; } else if (inlets.Length < count) { var missing = new ValueInlet <bool> [count - inlets.Length]; missing.Fill(i => new ValueInlet <bool>()); inlets = inlets.Joined(missing); } else if (inlets.Length > count) { Array.Resize(ref inlets, count); } Array.Resize(ref nextNodes, count + 1); }
public EqualityNode() { inlet1 = new ValueInlet <TValue>(); inlet2 = new ValueInlet <TValue>(); outlet = new PullValueOutlet <bool>(() => PEqualityComparer <TValue> .Default.Equals(inlet1.PullValue(), inlet2.PullValue())); }