Examples of update()


Examples of org.jquantlib.math.interpolations.ForwardFlatInterpolation.update()

        final Array x = new Array(new double[] { 0.0, 1.0, 2.0, 3.0, 4.0 });
        final Array y = new Array(new double[] { 5.0, 4.0, 3.0, 2.0, 1.0 });

        final Interpolation f = new ForwardFlatInterpolation(x, y);
        f.update();

        final int N = x.size();
        final double tolerance = 1.0e-12;

        // at original points
View Full Code Here

Examples of org.jquantlib.math.interpolations.Interpolation.update()

        final Array x = new Array(new double[] { 0.0, 1.0, 2.0, 3.0, 4.0 });
        final Array y = new Array(new double[] { 5.0, 4.0, 3.0, 2.0, 1.0 });

        final Interpolation f = new LinearInterpolation(x, y);
        f.update();

        final Array x2 = new Array(new double[] { -2.0, -1.0, 0.0, 1.0, 3.0, 4.0, 5.0, 6.0, 7.0 });
        final int N = x2.size();

        final double tolerance = 1.0e-12;
View Full Code Here

Examples of org.jquantlib.math.interpolations.LinearInterpolation.update()

        final Array x = new Array(new double[] { 0.0, 1.0, 2.0, 3.0, 4.0 });
        final Array y = new Array(new double[] { 5.0, 4.0, 3.0, 2.0, 1.0 });

        final Interpolation f = new LinearInterpolation(x, y);
        f.update();

        final Array x2 = new Array(new double[] { -2.0, -1.0, 0.0, 1.0, 3.0, 4.0, 5.0, 6.0, 7.0 });
        final int N = x2.size();

        final double tolerance = 1.0e-12;
View Full Code Here

Examples of org.jquantlib.math.interpolations.NaturalCubicInterpolation.update()

            newValues = newGrid.clone().transform(f);
        }

        final CubicInterpolation priceSpline = new NaturalCubicInterpolation(transformed, values);

        priceSpline.update();
        for (int i=0; i<newValues.size(); i++) {
            newValues.set(i, priceSpline.op(newValues.get(i), true) );
        }

        this.grid.swap(newGrid);
View Full Code Here

Examples of org.jquantlib.math.interpolations.SABRInterpolation.update()

                            alphaGuess, betaGuess, nuGuess, rhoGuess,
                            isAlphaFixed[k_a], isBetaFixed[k_b],
                            isNuFixed[k_n], isRhoFixed[k_r],
                            vegaWeighted[i],
                            endCriteria, methods[j]);
                    sabrInterpolation.update();

                    // Recover SABR calibration parameters
                    final boolean failed = false;
                    final double calibratedAlpha = sabrInterpolation.alpha();
                    final double calibratedBeta  = sabrInterpolation.beta();
View Full Code Here

Examples of org.jrobin.core.Sample.update()

      long totalMemory = __runtime.totalMemory();
      sample.setValue("maxMemory", __runtime.maxMemory());
      sample.setValue("totalMemory", totalMemory);
      sample.setValue("usedMemory", totalMemory - __runtime.freeMemory());
      // No values are set for incomingMessages, outgoingMessages to reset these counters.
      sample.update();
      _rrdPool.release(rrdDb);
    }
    catch (Exception e)
    {
      _logger.warn("Unable to set statistics", e);
View Full Code Here

Examples of org.jruby.util.Adler32Ext.update()

        if (!args[0].isNil()) bytes = args[0].convertToString().getByteList();
        if (!args[1].isNil()) adler = RubyNumeric.fix2int(args[1]);

        Adler32Ext ext = new Adler32Ext(adler);
        if (bytes != null) {
            ext.update(bytes.unsafeBytes(), bytes.begin(), bytes.length()); // it's safe since adler.update doesn't modify the array
        }
        return recv.getRuntime().newFixnum(ext.getValue());
    }

    private final static long[] crctab = new long[]{
View Full Code Here

Examples of org.jruby.util.CRC32Ext.update()

        if (!args[0].isNil()) bytes = args[0].convertToString().getByteList();
        if (!args[1].isNil()) crc = RubyNumeric.num2long(args[1]);

        CRC32Ext ext = new CRC32Ext((int)crc);
        if (bytes != null) {
            ext.update(bytes.unsafeBytes(), bytes.begin(), bytes.length());
        }
       
        return recv.getRuntime().newFixnum(ext.getValue());
    }
View Full Code Here

Examples of org.jscsi.parser.datasegment.SettingsMap.update()

            if (sm == null) {
                sm = new SettingsMap();
                connectionConfiguration.put(connectionID, sm);
            }

            sm.update(textKey, textValue, resultFunction);
        }

        // /**
        // * Returns the value of a key-value pair with the given key for this
        // * session.
 
View Full Code Here

Examples of org.jugile.util.DBConnection.update()

    if (v) a = "1";
    String sql = "update " + table() + " set archived="+a+" where id_f="+getId();
    DBPool db = DBPool.getPool();
    DBConnection c = db.getConnection();
    try {
      c.update(sql);
      c.commit();
    } catch (Exception e) {
      log.error("dbread failed",e);
      try { c.rollback(); } catch (Exception e2) { fail(e2);}
    } finally {
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.