Examples of compute()


Examples of gov.nist.microanalysis.EPQLibrary.FluorescenceYield.compute()

            if (comp.containsElement(element)) {
                shell = xrt.getDestination();
                corrAlg.initialize(comp, shell, props);
                q = icx.computeShell(shell, energy);
                wf = comp.weightFraction(element, false);
                yield = fy.compute(shell);
                atomicWeight = element.getAtomicWeight();
                lineWeight = xrt.getWeight(XRayTransition.NormalizeFamily);

                factor =
                        (q * yield * lineWeight)
 
View Full Code Here

Examples of gov.nist.microanalysis.EPQLibrary.MassAbsorptionCoefficient.compute()

        MassAbsorptionCoefficient mac =
                (MassAbsorptionCoefficient) strategy
                        .getAlgorithm(MassAbsorptionCoefficient.class);
        assertTrue(mac instanceof MassAbsorptionCoefficient.UserSpecifiedCoefficient);
        assertEquals(200.0,
                mac.compute(gov.nist.microanalysis.EPQLibrary.Element.Cu,
                        ToSI.eV(8904.0)), 1e-4);
    }
}
View Full Code Here

Examples of hu.u_szeged.nbo.server.NBOServerIF.compute()

         
          return;
        }
       
        if (!this.raProblem.isSentToServer()) {
          server.compute(this.user, this.raProblem.getName(), inputFiles, Model.RES_ALLOC);
          this.raProblem.setState(Model.SENT_TO_SERVER);
        }
       
        while (resultObject == null) {
          if (this.stop) {
View Full Code Here

Examples of kiss.lang.Expression.compute()

  @Test public void testDef() {
    Expression x=Def.create(Symbol.intern("foo"),Constant.create(1));
    Environment e=Environment.EMPTY;
   
    Environment e2=x.compute(e);
    assertEquals(1,e2.get(Symbol.intern("foo")));
    assertEquals(1,e2.getResult());
  }
 
  @Test public void testValidity() {
View Full Code Here

Examples of name.abuchen.portfolio.math.NPVFunction.compute()

        NPVFunction f = new NPVFunction(Arrays.asList( //
                        Dates.date(2010, Calendar.JANUARY, 1), //
                        Dates.date(2010, Calendar.DECEMBER, 31)), //
                        Arrays.asList(-200d, 210d));

        assertThat(f.compute(0.05d), is(3965.669635841685d));
    }

}
View Full Code Here

Examples of name.abuchen.portfolio.math.PseudoDerivativeFunction.compute()

            }
        };

        PseudoDerivativeFunction p = new PseudoDerivativeFunction(f);

        double result = p.compute(1d);

        assertThat(new BigDecimal(result).setScale(5, BigDecimal.ROUND_HALF_UP).doubleValue(), is(1d));
    }
}
View Full Code Here

Examples of org.apache.commons.math3.ml.distance.DistanceMeasure.compute()

        final double[] features = new double[] { 0.3 };
        final double[] distancesBefore = new double[netSize];
        int count = 0;
        for (Neuron n : net) {
            distancesBefore[count++] = dist.compute(n.getFeatures(), features);
        }
        final Neuron bestBefore = MapUtils.findBest(features, net, dist);

        // Initial distance from the best match is larger than zero.
        Assert.assertTrue(dist.compute(bestBefore.getFeatures(), features) >= 0.2);
View Full Code Here

Examples of org.apache.commons.math3.ml.distance.DistanceMeasure.compute()

            distancesBefore[count++] = dist.compute(n.getFeatures(), features);
        }
        final Neuron bestBefore = MapUtils.findBest(features, net, dist);

        // Initial distance from the best match is larger than zero.
        Assert.assertTrue(dist.compute(bestBefore.getFeatures(), features) >= 0.2);

        update.update(net, features);

        final double[] distancesAfter = new double[netSize];
        count = 0;
View Full Code Here

Examples of org.apache.commons.math3.ml.distance.DistanceMeasure.compute()

        update.update(net, features);

        final double[] distancesAfter = new double[netSize];
        count = 0;
        for (Neuron n : net) {
            distancesAfter[count++] = dist.compute(n.getFeatures(), features);
        }
        final Neuron bestAfter = MapUtils.findBest(features, net, dist);

        Assert.assertEquals(bestBefore, bestAfter);
        // Distance is now zero.
View Full Code Here

Examples of org.apache.commons.math3.ml.distance.DistanceMeasure.compute()

        }
        final Neuron bestAfter = MapUtils.findBest(features, net, dist);

        Assert.assertEquals(bestBefore, bestAfter);
        // Distance is now zero.
        Assert.assertEquals(0, dist.compute(bestAfter.getFeatures(), features), 0d);

        for (int i = 0; i < netSize; i++) {
            // All distances have decreased.
            Assert.assertTrue(distancesAfter[i] < distancesBefore[i]);
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.