Package org.jfree.data.function

Examples of org.jfree.data.function.Function2D


   
    public XYDataset createDataset() {
      String title = rbf.getClass().getSimpleName();
        XYSeriesCollection dataset = new XYSeriesCollection();

        Function2D n1 = new RBFFunction2D(this.rbf);// //new NormalDistributionFunction2D(0.0, 1.0);
        XYSeries s1 = DatasetUtilities.sampleFunction2DToSeries(n1, -5.1, 5.1,
                121, title);
        dataset.addSeries(s1);

        return dataset;
View Full Code Here


    public static XYDataset createDataset(ActivationFunction activation, boolean normal) {
        XYSeriesCollection dataset = new XYSeriesCollection();

        if( normal )
        {
        Function2D n1 = new ActivationFunction2D(activation);// //new NormalDistributionFunction2D(0.0, 1.0);
        XYSeries s1 = DatasetUtilities.sampleFunction2DToSeries(n1, -5.1, 5.1,
                121, "Activation Function");
        dataset.addSeries(s1);
        }
        else
        {
          if( activation.hasDerivative())
          {
        Function2D n2 = new DerivativeFunction2D(activation);
        XYSeries s2 = DatasetUtilities.sampleFunction2DToSeries(n2, -5.1, 5.1,
                121, "Derivative Function");
        dataset.addSeries(s2);
          }
        }
View Full Code Here

    /**
     * Some checks for the sampleFunction2D() method.
     */
    public void testSampleFunction2D() {
        Function2D f = new LineFunction2D(0, 1);
        XYDataset dataset = DatasetUtilities.sampleFunction2D(f, 0.0, 1.0, 2,
                "S1");
        assertEquals(1, dataset.getSeriesCount());
        assertEquals("S1", dataset.getSeriesKey(0));
        assertEquals(2, dataset.getItemCount(0));
View Full Code Here

    /**
     * Some checks for the sampleFunction2D() method.
     */
    public void testSampleFunction2D() {
        Function2D f = new LineFunction2D(0, 1);
        XYDataset dataset = DatasetUtilities.sampleFunction2D(f, 0.0, 1.0, 2,
                "S1");
        assertEquals(1, dataset.getSeriesCount());
        assertEquals("S1", dataset.getSeriesKey(0));
        assertEquals(2, dataset.getItemCount(0));
View Full Code Here

    /**
     * Some checks for the sampleFunction2D() method.
     */
    public void testSampleFunction2D() {
        Function2D f = new LineFunction2D(0, 1);
        XYDataset dataset = DatasetUtilities.sampleFunction2D(f, 0.0, 1.0, 2,
                "S1");
        assertEquals(1, dataset.getSeriesCount());
        assertEquals("S1", dataset.getSeriesKey(0));
        assertEquals(2, dataset.getItemCount(0));
View Full Code Here

    /**
     * Some checks for the sampleFunction2D() method.
     */
    @Test
    public void testSampleFunction2D() {
        Function2D f = new LineFunction2D(0, 1);
        XYDataset dataset = DatasetUtilities.sampleFunction2D(f, 0.0, 1.0, 2,
                "S1");
        assertEquals(1, dataset.getSeriesCount());
        assertEquals("S1", dataset.getSeriesKey(0));
        assertEquals(2, dataset.getItemCount(0));
View Full Code Here

TOP

Related Classes of org.jfree.data.function.Function2D

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.