Examples of currentValue()


Examples of org.apache.phoenix.schema.Sequence.currentValue()

            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        }
        sequence.getLock().lock();
        try {
            return sequence.currentValue(timestamp);
        } catch (EmptySequenceCacheException e) {
            throw new SQLExceptionInfo.Builder(SQLExceptionCode.CANNOT_CALL_CURRENT_BEFORE_NEXT_VALUE)
            .setSchemaName(sequenceKey.getSchemaName()).setTableName(sequenceKey.getSequenceName())
            .build().buildException();
        } finally {
View Full Code Here

Examples of org.jquantlib.math.optimization.Problem.currentValue()

        for (int i=0; i<costFunctions_.size(); ++i) {
            final Problem problem = new Problem(costFunctions_.get(i), constraints_.get(i), initialValues_.get(i));
            for (int j=0; j<(optimizationMethods_.get(i)).size(); ++j) {
                final EndCriteria.Type endCriteriaResult = optimizationMethods_.get(i).get(j).minimize(problem, endCriterias_.get(i));
            final Array xMinCalculated = problem.currentValue();
            final Array yMinCalculated = problem.values(xMinCalculated);
            // Check optimizatin results vs known solution
            for (int k=0; k < xMinCalculated.size(); ++k) {
                //if(Math.abs(yMinExpected_.get(k)- yMinCalculated.get(k))> functionEpsilons_.get(i)){
                //if (std::fabs(yMinExpected_[k]- yMinCalculated[k]) > functionEpsilons_[i]) {
View Full Code Here

Examples of org.jquantlib.math.optimization.Problem.currentValue()

        final Array projectedGuess = new Array(constrainedSABRError.project(inversedTransformatedGuess));

        final NoConstraint constraint = new NoConstraint();
        final Problem problem = new Problem(constrainedSABRError, constraint, projectedGuess);
        itsCoeffs.SABREndCriteria_ = optMethod_.minimize(problem, endCriteria_);
        final Array projectedResult = new Array(problem.currentValue());
        final Array transfResult = new Array(constrainedSABRError.include(projectedResult));

        final Array result = transformation_.direct(transfResult);
        itsCoeffs.alpha_ = result.get(0);
        itsCoeffs.beta_ = result.get(1);
View Full Code Here

Examples of org.jquantlib.math.optimization.Problem.currentValue()

        final CalibrationFunction f = new CalibrationFunction(this, instruments, w);

        final Problem prob = new Problem(f, c, params());
        shortRateEndCriteria_ = method.minimize(prob, endCriteria);
        final Array result = new Array(prob.currentValue());
        setParams(result);
        final Array shortRateProblemValues_ = prob.values(result);

        notifyObservers();
    }
View Full Code Here

Examples of org.jquantlib.math.optimization.Problem.currentValue()

        for (int i=0; i<costFunctions_.size(); ++i) {
            final Problem problem = new Problem(costFunctions_.get(i), constraints_.get(i), initialValues_.get(i));
            for (int j=0; j<(optimizationMethods_.get(i)).size(); ++j) {
                final EndCriteria.Type endCriteriaResult = optimizationMethods_.get(i).get(j).minimize(problem, endCriterias_.get(i));
            final Array xMinCalculated = problem.currentValue();
            final Array yMinCalculated = problem.values(xMinCalculated);
            // Check optimizatin results vs known solution
            for (int k=0; k < xMinCalculated.size(); ++k) {
                //if(Math.abs(yMinExpected_.get(k)- yMinCalculated.get(k))> functionEpsilons_.get(i)){
                //if (std::fabs(yMinExpected_[k]- yMinCalculated[k]) > functionEpsilons_[i]) {
View Full Code Here

Examples of org.jquantlib.math.optimization.Problem.currentValue()

        final Array projectedGuess = new Array(constrainedSABRError.project(inversedTransformatedGuess));

        final NoConstraint constraint = new NoConstraint();
        final Problem problem = new Problem(constrainedSABRError, constraint, projectedGuess);
        itsCoeffs.SABREndCriteria_ = optMethod_.minimize(problem, endCriteria_);
        final Array projectedResult = new Array(problem.currentValue());
        final Array transfResult = new Array(constrainedSABRError.include(projectedResult));

        final Array result = transformation_.direct(transfResult);
        itsCoeffs.alpha_ = result.get(0);
        itsCoeffs.beta_ = result.get(1);
View Full Code Here

Examples of org.nasutekds.server.replication.server.DraftCNDB.DraftCNDBCursor.currentValue()

      assertEquals(handler.getLastKey(), sn3);

      DraftCNDBCursor dbc = handler.getReadCursor(firstkey);
      assertEquals(dbc.currentChangeNumber(), changeNumber1);
      assertEquals(dbc.currentServiceID(), serviceID1);
      assertEquals(dbc.currentValue(), value1);
      assertTrue(dbc.toString().length() != 0);

      assertTrue(dbc.next());

      assertEquals(dbc.currentChangeNumber(), changeNumber2);
View Full Code Here

Examples of org.nasutekds.server.replication.server.DraftCNDB.DraftCNDBCursor.currentValue()

      assertTrue(dbc.next());

      assertEquals(dbc.currentChangeNumber(), changeNumber2);
      assertEquals(dbc.currentServiceID(), serviceID2);
      assertEquals(dbc.currentValue(), value2);

      assertTrue(dbc.next());

      assertEquals(dbc.currentChangeNumber(), changeNumber3);
      assertEquals(dbc.currentServiceID(), serviceID3);
View Full Code Here

Examples of org.nasutekds.server.replication.server.DraftCNDB.DraftCNDBCursor.currentValue()

      assertTrue(dbc.next());

      assertEquals(dbc.currentChangeNumber(), changeNumber3);
      assertEquals(dbc.currentServiceID(), serviceID3);
      assertEquals(dbc.currentValue(), value3);

      assertFalse(dbc.next());

      handler.releaseReadCursor(dbc);
View Full Code Here

Examples of org.nasutekds.server.replication.server.DraftCNDB.DraftCNDBCursor.currentValue()

    String value = null;
    DraftCNDBCursor draftCNDBCursor = null;
    try
    {
      draftCNDBCursor = db.openReadCursor(key);
      value = draftCNDBCursor.currentValue();
    }
    catch(Exception e)
    {
      if (debugEnabled())
        TRACER.debugInfo("In DraftCNDbHandler.getValue, read: " +
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.