Example #1
0
  @Before
  public void setUp() throws Exception {

    HyperbolicModel bm = new HyperbolicModel();
    double[] bparams = {1221, 29.8, 62.2};
    bm.setBradleyModelParams(bparams);

    IMR imr1 = new IMR();
    imr1.setImRName("imr1");
    imr1.setModel(bm);

    ArrayList<IMR> iMR = new ArrayList<IMR>();
    iMR.add(imr1);

    im = new IM();
    im.setName("happiness");
    im.setiMR(iMR);

    pm1 = new PowerModel();
    double[] pparams1 = {0.1, 1.5};
    pm1.setPowerModelParams(pparams1);

    pm2 = new PowerModel();
    double[] pparams2 = {0.5, 0.0};
    pm2.setPowerModelParams(pparams2);

    lgnmdl = new LogNormalModel();
    lgnmdl.setMeanModel(pm1);
    lgnmdl.setStddModel(pm2);

    edpIm = new EDPIM();
    edpIm.setDistributionFunction(lgnmdl);

    edp = new EDP();
    edp.setEdpIM(new ArrayList<EDPIM>());
    edp.addEdpIM(edpIm);
  }
Example #2
0
 @Test
 public final void testEdpIm() {
   LogNormalDistribution lgnd =
       (LogNormalDistribution) edp.retrieveEdpIM().getDistributionFunction().distribution(1);
 }
Example #3
0
 @Test
 public final void testintegrandWithoutPc() {
   EDPR edpr = new EDPR();
   double val = 0.001;
   UnivariateFunction function = edpr.integrandWithoutPc(edp.retrieveEdpIM(), im, val);
 }