Esempio n. 1
0
        /// <summary>
        ///     Define a const.
        /// </summary>
        /// <param name="type">The type of const.</param>
        /// <param name="name">The name of the const.</param>
        /// <param name="value">The value of the const.</param>
        public void DefineConst(EncogArgType type, string name,
                                string value)
        {
            var node = new EncogProgramNode(Program, this,
                                            NodeType.Const, name);

            node.AddArg(value);
            node.AddArg(type.ToString());
            Children.Add(node);
        }
Esempio n. 2
0
        /// <summary>
        ///     Create a function call.
        /// </summary>
        /// <param name="name">The name of the function to call.</param>
        /// <param name="returnType">The return type.</param>
        /// <param name="returnVariable">The variable to assign the function to.</param>
        /// <returns>The newly created function call.</returns>
        public EncogProgramNode CreateFunctionCall(string name,
                                                   string returnType, string returnVariable)
        {
            var node = new EncogProgramNode(Program, this,
                                            NodeType.FunctionCall, name);

            node.AddArg(returnType);
            node.AddArg(returnVariable);
            Children.Add(node);
            return(node);
        }
Esempio n. 3
0
        /// <summary>
        ///     Load the training data.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <returns>The newly created data load.</returns>
        public EncogProgramNode GenerateLoadTraining(FileInfo data)
        {
            var node = new EncogProgramNode(Program, this,
                                            NodeType.LoadTraining, "");

            node.AddArg(data);
            Children.Add(node);
            return(node);
        }
Esempio n. 4
0
        /// <summary>
        ///     Create an array.
        /// </summary>
        /// <param name="name">THe name of the array.</param>
        /// <param name="a">The value to init the array to.</param>
        /// <returns>The newly creatred array.</returns>
        public EncogProgramNode CreateArray(string name, double[] a)
        {
            var node = new EncogProgramNode(Program, this,
                                            NodeType.InitArray, name);

            node.AddArg(a);
            Children.Add(node);
            return(node);
        }
Esempio n. 5
0
        /// <summary>
        ///     Create a new network function.
        /// </summary>
        /// <param name="name">The name of the network function.</param>
        /// <param name="method">The method to call.</param>
        /// <returns>The newly created network function.</returns>
        public EncogProgramNode CreateNetworkFunction(string name,
                                                      FileInfo method)
        {
            var node = new EncogProgramNode(Program, this,
                                            NodeType.CreateNetwork, name);

            node.AddArg(method);
            Children.Add(node);
            return(node);
        }
 /// <summary>
 ///     Load the training data.
 /// </summary>
 /// <param name="data">The data.</param>
 /// <returns>The newly created data load.</returns>
 public EncogProgramNode GenerateLoadTraining(FileInfo data)
 {
     var node = new EncogProgramNode(Program, this,
                                     NodeType.LoadTraining, "");
     node.AddArg(data);
     Children.Add(node);
     return node;
 }
 /// <summary>
 ///     Define a const.
 /// </summary>
 /// <param name="type">The type of const.</param>
 /// <param name="name">The name of the const.</param>
 /// <param name="value">The value of the const.</param>
 public void DefineConst(EncogArgType type, string name,
                         string value)
 {
     var node = new EncogProgramNode(Program, this,
                                     NodeType.Const, name);
     node.AddArg(value);
     node.AddArg(type.ToString());
     Children.Add(node);
 }
 /// <summary>
 ///     Create a new network function.
 /// </summary>
 /// <param name="name">The name of the network function.</param>
 /// <param name="method">The method to call.</param>
 /// <returns>The newly created network function.</returns>
 public EncogProgramNode CreateNetworkFunction(string name,
                                               FileInfo method)
 {
     var node = new EncogProgramNode(Program, this,
                                     NodeType.CreateNetwork, name);
     node.AddArg(method);
     Children.Add(node);
     return node;
 }
 /// <summary>
 ///     Create a function call.
 /// </summary>
 /// <param name="name">The name of the function to call.</param>
 /// <param name="returnType">The return type.</param>
 /// <param name="returnVariable">The variable to assign the function to.</param>
 /// <returns>The newly created function call.</returns>
 public EncogProgramNode CreateFunctionCall(string name,
                                            string returnType, string returnVariable)
 {
     var node = new EncogProgramNode(Program, this,
                                     NodeType.FunctionCall, name);
     node.AddArg(returnType);
     node.AddArg(returnVariable);
     Children.Add(node);
     return node;
 }
 /// <summary>
 ///     Create an array.
 /// </summary>
 /// <param name="name">THe name of the array.</param>
 /// <param name="a">The value to init the array to.</param>
 /// <returns>The newly creatred array.</returns>
 public EncogProgramNode CreateArray(string name, double[] a)
 {
     var node = new EncogProgramNode(Program, this,
                                     NodeType.InitArray, name);
     node.AddArg(a);
     Children.Add(node);
     return node;
 }