コード例 #1
0
 public void TestRenderFunction()
 {
     EncogProgram expression = new EncogProgram("(sin(x)+cos(x))/2");
     RenderEPL render = new RenderEPL();
     String result = render.Render(expression);
     Assert.AreEqual("[#var:0:0][sin:1][#var:0:0][cos:1][+:2][#const:0:2][/:2]", result);
 }
コード例 #2
0
 public void TestRenderComplex()
 {
     EncogProgram expression = new EncogProgram("((a+25)^3/25)-((a*3)^4/250)");
     RenderEPL render = new RenderEPL();
     String result = render.Render(expression);
     Assert.AreEqual("[#var:0:0][#const:0:25][+:2][#const:0:3][^:2][#const:0:25][/:2][#var:0:0][#const:0:3][*:2][#const:0:4][^:2][#const:0:250][/:2][-:2]", result);
 }
コード例 #3
0
 public void TestRenderBasic()
 {
     EncogProgram expression = new EncogProgram("(2+6)");
     RenderEPL render = new RenderEPL();
     String result = render.Render(expression);
     Assert.AreEqual("[#const:0:2][#const:0:6][+:2]", result);
 }
コード例 #4
0
        public void TestRenderFunction()
        {
            EncogProgram expression = new EncogProgram("(sin(x)+cos(x))/2");
            RenderEPL    render     = new RenderEPL();
            String       result     = render.Render(expression);

            Assert.AreEqual("[#var:0:0][sin:1][#var:0:0][cos:1][+:2][#const:0:2][/:2]", result);
        }
コード例 #5
0
        public void TestRenderComplex()
        {
            EncogProgram expression = new EncogProgram("((a+25)^3/25)-((a*3)^4/250)");
            RenderEPL    render     = new RenderEPL();
            String       result     = render.Render(expression);

            Assert.AreEqual("[#var:0:0][#const:0:25][+:2][#const:0:3][^:2][#const:0:25][/:2][#var:0:0][#const:0:3][*:2][#const:0:4][^:2][#const:0:250][/:2][-:2]", result);
        }
コード例 #6
0
        public void TestRenderBasic()
        {
            EncogProgram expression = new EncogProgram("(2+6)");
            RenderEPL    render     = new RenderEPL();
            String       result     = render.Render(expression);

            Assert.AreEqual("[#const:0:2][#const:0:6][+:2]", result);
        }
コード例 #7
0
 /// <summary>
 ///     The string as an EPL expression. EPL is the format that
 ///     EncogPrograms are usually persisted as.
 /// </summary>
 /// <returns>EPL code.</returns>
 public String GenerateEPL()
 {
     var render = new RenderEPL();
     return render.Render(this);
 }