예제 #1
0
        public OutputPlug CreateOutputPlug(OutputPlug plug)
        {
            if (!Outputs.Any(p => p.Name == plug.Name))
            {
                plug.Owner = this;
                Outputs.Add(plug);
            }
            else
            {
                OutputPlug existing = Outputs.Find(p => p.Name == plug.Name);
                if (existing.Owner == null)
                {
                    existing.Owner = this;
                }
                return(existing);
            }

            return(plug);
        }
예제 #2
0
 public PortView GetCompatibleOutputPort(PortView input)
 {
     return(Outputs.Find((port) => port.IsCompatibleWith(input)));
 }
예제 #3
0
 public PortView GetOutputPort(string name)
 {
     return(Outputs.Find((port) => port.portName == name));
 }
예제 #4
0
 public Neuron GetOutput(string tag)
 {
     return(Outputs.Find(p => p.Tag == tag));
 }