private void CreateNode(int Type, Vector2 position) { Node node = NodeRules.CreateNode(Type); node.position = new Rect(ViewportService.FromScreenPoint(position), new Vector2(100, 100)); configuration?.AddNode(node); }
public Node ToNode(Neuron value) { if (value is EntryNeuron) { return(NodeRules.CreateNode(0)); } else if (value is OutputNeuron) { return(NodeRules.CreateNode(1)); } else if (value is SigmoidNeuron) { return(NodeRules.CreateNode(2)); } else { throw new System.NotImplementedException(); } }