Package odor

Examples of odor.Odor


    odorComboBox.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent arg0)
      {
        JComboBox source = (JComboBox)arg0.getSource();
        Odor odr = (Odor)source.getSelectedItem();
       
        if (getJNetwork() != null)
        {
          getJNetwork().setOdor(odr);
          getJNetwork().repaint();
View Full Code Here


public class OdorTest {

  @Test
  public void testOdor()
  {
    Odor o = new Odor();
   
    assert(    o.getInputs() == null
        && o.getMean() == Double.NaN
        && o.getStandardDeviation() == Double.NaN
        && o.equals(new Odor()));
  }
View Full Code Here

  public void testGetMean()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
   
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
    Odor o = new Odor(zscores.length, g);
   
    assert(o.getMean() == g.getMean() && o.getMean() == Util.arrayMean(zscores));
  }
View Full Code Here

  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
   
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    Odor o = new Odor(zscores.length, g);
   
    assert(o.getStandardDeviation() == g.getStandardDeviation()
        && o.getStandardDeviation() == Util.standardDeviation(zscores));
  }
View Full Code Here

  public void testGetInputs()
  {
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    Odor o1 = new Odor(zscores.length, g);
   
    assert( Util.arrayContains(zscores,o1.getInputs()));
  }
View Full Code Here

  }

  @Test
  public void testEqualsObject()
  {
    Odor o1 = new Odor();
    Odor o2 = new Odor();
   
    assert( o1.equals(o2));
   
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    o1 = new Odor(3, g);
    o2 = new Odor(3, g);
   
    assert (o1.equals(o2));
  }
View Full Code Here

  }

  @Test
  public void testCompareTo()
  {
    Odor o1 = new Odor();
    Odor o2 = new Odor();
   
    assert( o1.compareTo(o2) == Integer.MIN_VALUE);
   
    double[] zscores = {0.1, 1.0, 1.5, 2.0, 2.5, 3.0};
    SummedGaussian g = new SummedGaussian(zscores, Util.arraySum(zscores));
   
    o1 = new Odor(3, g);
    o2 = new Odor(3, g);
   
    assert ( o1.compareTo(o2) != 0 );
  }
View Full Code Here

TOP

Related Classes of odor.Odor

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.