Examples of calculate()


Examples of org.jquantlib.model.volatility.SimpleLocalEstimator.calculate()

    }

    @Test
    public void testCECalculate() {
        final SimpleLocalEstimator       sle = new SimpleLocalEstimator(1/360.0);
        final TimeSeries<Double>      locale = sle.calculate(ts);
        final VolatilityCompositor        ce = new ConstantEstimator(1);
        final TimeSeries<Double>       value = ce.calculate(locale);
        assertNotNull(value) ;
    }
View Full Code Here

Examples of org.jquantlib.model.volatility.VolatilityCompositor.calculate()

    @Test
    public void testCECalculate() {
        final SimpleLocalEstimator       sle = new SimpleLocalEstimator(1/360.0);
        final TimeSeries<Double>      locale = sle.calculate(ts);
        final VolatilityCompositor        ce = new ConstantEstimator(1);
        final TimeSeries<Double>       value = ce.calculate(locale);
        assertNotNull(value) ;
    }

}
View Full Code Here

Examples of org.jquantlib.pricingengines.AnalyticEuropeanEngine.calculate()

            r = riskFreeRate - process.jumpIntensity().currentLink().value() * k + i * muPlusHalfSquareVol / t;
            riskFreeTS.linkTo(new FlatForward(rateRefDate, r, voldc));
            volTS.linkTo(new BlackConstantVol(rateRefDate, volcal, v, voldc));

            baseArguments.validate();
            baseEngine.calculate();

            weight = p.op(i);
            R.value += weight * baseResults.value;
            greeks.delta += weight * baseResults.greeks().delta;
            greeks.gamma += weight * baseResults.greeks().gamma;
 
View Full Code Here

Examples of org.lealone.expression.Expression.calculate()

        while (result.next()) {
            calculator = new Calculator(result.currentRow());
            for (int i = 0; i < columnCount; i++) {
                Expression expr = expressions.get(i);
                index = calculator.getIndex();
                expr.calculate(calculator);
                if (calculator.getIndex() == index) {
                    calculator.addResultValue(calculator.getValue(index));
                    calculator.addIndex();
                }
            }
View Full Code Here

Examples of org.neuroph.core.NeuralNetwork.calculate()

        TrainingSet testSet = new TrainingSet();
        testSet.addElement(new TrainingElement(new double[]{4223.0D / daxmax, 4259.0D / daxmax, 4203.0D / daxmax, 3989.0D / daxmax}));

        for (TrainingElement testElement : testSet.trainingElements()) {
            neuralNet.setInput(testElement.getInput());
            neuralNet.calculate();
            double[] networkOutput = neuralNet.getOutput();
            System.out.print("Input: " + Arrays.toString(testElement.getInput()) );
            System.out.println(" Output: " + Arrays.toString(networkOutput) );
        }
View Full Code Here

Examples of org.neuroph.core.Neuron.calculate()

  @Test
  public void testOnRandomConnections() {
    // arrange
    Neuron Fromneuron = new Neuron();
    Fromneuron.setInput(.9d);
    Fromneuron.calculate();
    Neuron toneuron1 = new Neuron(), toneuron2 = new Neuron(), toneuron3 = new Neuron();
    List<Connection> inputConnections = new ArrayList<Connection>();
    {
      {
        Connection connection = new Connection(Fromneuron, toneuron1,
View Full Code Here

Examples of org.neuroph.nnet.Hopfield.calculate()


        // print network output for the each element from the specified training set.
        for(TrainingElement trainingElement : trainingSet.trainingElements()) {
            myHopfield.setInput(trainingElement.getInput());
            myHopfield.calculate();
            myHopfield.calculate();  
            double[] networkOutput = myHopfield.getOutput();

            System.out.print("Input: " + Arrays.toString(trainingElement.getInput()) );
            System.out.println(" Output: " + Arrays.toString(networkOutput) );
View Full Code Here

Examples of org.neuroph.nnet.Hopfield.calculate()

        // print network output for the each element from the specified training set.
        for(TrainingElement trainingElement : trainingSet.trainingElements()) {
            myHopfield.setInput(trainingElement.getInput());
            myHopfield.calculate();
            myHopfield.calculate();  
            double[] networkOutput = myHopfield.getOutput();

            System.out.print("Input: " + Arrays.toString(trainingElement.getInput()) );
            System.out.println(" Output: " + Arrays.toString(networkOutput) );
        }
View Full Code Here

Examples of org.neuroph.nnet.MultiLayerPerceptron.calculate()

        TrainingSet testSet = new TrainingSet();
        testSet.addElement(new TrainingElement(new double[]{4223.0D / daxmax, 4259.0D / daxmax, 4203.0D / daxmax, 3989.0D / daxmax}));

        for (TrainingElement testElement : testSet.trainingElements()) {
            neuralNet.setInput(testElement.getInput());
            neuralNet.calculate();
            double[] networkOutput = neuralNet.getOutput();
            System.out.print("Input: " + Arrays.toString(testElement.getInput()) );
            System.out.println(" Output: " + Arrays.toString(networkOutput) );
        }
View Full Code Here

Examples of org.nutz.el.Operator.calculate()

   * 计算
   */
  private Object calculate(Deque<Object> el2){
    if(el2.peek() instanceof Operator){
      Operator obj = (Operator) el2.peek();
      return obj.calculate();
    }
    if(el2.peek() instanceof IdentifierObj){
      return ((IdentifierObj) el2.peek()).fetchVal();
    }
    return el2.peek();
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.