Пример #1
0
 // Output to Debug
 public static void dout(string text, params object[] values)
 {
     if (values.Length == 0)
     {
         Debug.WriteLine(text);
         DOutput?.Invoke(new MessageArgs(text));
     }
     else
     {
         Debug.WriteLine(string.Format(text, values));
         DOutput?.Invoke(new MessageArgs(string.Format(text, values)));
     }
 }
                public DecisionNet express(T p_controller)
                {
                    DInput[] inputs = new DInput[m_inputs.Length];

                    for (int i = 0; i < m_inputs.Length; i++)
                    {
                        inputs[i] = m_inputs[i](p_controller);
                    }

                    DOutput[] outputs = new DOutput[m_outputs.Length];

                    for (int i = 0; i < outputs.Length; i++)
                    {
                        outputs[i] = m_outputs[i](p_controller);
                    }

                    return(new DecisionNet(inputs, outputs, m_weights));
                }