Examples of precision()


Examples of de.lmu.ifi.dbs.elki.evaluation.clustering.BCubed.precision()

    ypos = addHeader(svgp, parent, ypos, "BCubed-based measures");

    BCubed bcubed = cont.getBCubed();
    ypos = addBarChart(svgp, parent, ypos, "F1-Measure", 1, bcubed.f1Measure());
    ypos = addBarChart(svgp, parent, ypos, "Recall", 1, bcubed.recall());
    ypos = addBarChart(svgp, parent, ypos, "Precision", 1, bcubed.precision());

    ypos = addHeader(svgp, parent, ypos, "Set-Matching-based measures");

    SetMatchingPurity setm = cont.getSetMatching();
    ypos = addBarChart(svgp, parent, ypos, "F1-Measure", 1, setm.f1Measure());
View Full Code Here

Examples of de.lmu.ifi.dbs.elki.evaluation.clustering.PairCounting.precision()

    ypos = addHeader(svgp, parent, ypos, "Pair counting measures");

    PairCounting paircount = cont.getPaircount();
    ypos = addBarChart(svgp, parent, ypos, "Jaccard", 1, paircount.jaccard());
    ypos = addBarChart(svgp, parent, ypos, "F1-Measure", 1, paircount.f1Measure());
    ypos = addBarChart(svgp, parent, ypos, "Precision", 1, paircount.precision());
    ypos = addBarChart(svgp, parent, ypos, "Recall", 1, paircount.recall());
    ypos = addBarChart(svgp, parent, ypos, "Rand", 1, paircount.randIndex());
    ypos = addBarChart(svgp, parent, ypos, "ARI", 1, paircount.adjustedRandIndex());
    ypos = addBarChart(svgp, parent, ypos, "FowlkesMallows", 1, paircount.fowlkesMallows());
View Full Code Here

Examples of java.math.BigDecimal.precision()

   * @throws TransformationException if value is an incorrect input type or
   * the transformation fails
   */
  public Object transformDirect(Object value) throws TransformationException {
    BigDecimal result = BigDecimal.valueOf(((Number)value).doubleValue());
    result = result.setScale(Math.max(result.scale(), (value instanceof Double ? 16 : 8) - result.precision()));
    return result;
  }

  /**
   * Type of the incoming value.
View Full Code Here

Examples of java.math.BigDecimal.precision()

            int sign2 = val.isInfinity() ? val.infinitySign : val.value.signum();
            return newInfinity(runtime, sign1 * sign2);
        }

        BigDecimal res = value.multiply(val.value);
        if (res.precision() > digits) {
            // TODO: rounding mode should not be hard-coded. See #mode.
            res = res.round(new MathContext(digits,  RoundingMode.HALF_UP));
        }
        return new RubyBigDecimal(runtime, res).setResult();
    }
View Full Code Here

Examples of java.math.BigDecimal.precision()

        // TODO: no need to calculate every time.
        if (isZero()) {
            return 0;
        }
        BigDecimal val = value.abs().stripTrailingZeros();
        return val.precision() - val.scale();
    }

    @JRubyMethod(name = "sqrt", required = 1)
    public IRubyObject sqrt(IRubyObject arg) {
        Ruby runtime = getRuntime();
View Full Code Here

Examples of java.math.BigDecimal.precision()

            bigDecimal = (BigDecimal) num;
        } else {
            bigDecimal = new BigDecimal(num.toString()).stripTrailingZeros();
        }

        int intLength = bigDecimal.precision() - bigDecimal.scale();
        if (integral >= intLength) {
            int factionLength = bigDecimal.scale() < 0 ? 0 : bigDecimal.scale();
            return fractional >= factionLength;
        } else {
            return false;
View Full Code Here

Examples of java.math.BigDecimal.precision()

        }
        // Check overall
        if (type==DataType.DECIMAL)
        {   // Convert to Decimal
            BigDecimal dv = ObjectUtils.toDecimal(n);
            int prec = dv.precision();
            int scale = dv.scale();
            // check precision and scale
            double size = getSize();
            int reqPrec = (int)size;
            int reqScale =((int)(size*10)-(reqPrec*10));
 
View Full Code Here

Examples of java.math.BigDecimal.precision()

            val = buffer.toString();
         }
         fixed_value = new BigDecimal( val );

         org.omg.CORBA.TypeCode type = orb.create_fixed_tc
             ((short) fixed_value.precision(), (short)fixed_value.scale());

         if ( type.fixed_digits() > type().fixed_digits() )
         {
            throw new InvalidValue();
         }
View Full Code Here

Examples of java.math.BigDecimal.precision()

             val = sb.toString();
          }
          BigDecimal tmp = new BigDecimal( val );

          org.omg.CORBA.TypeCode tc = ORB.init().create_fixed_tc
              ((short)tmp.precision(), (short)tmp.scale());

          if ( tc.fixed_digits() > type.fixed_digits() )
          {
             throw new org.omg.CORBA.BAD_TYPECODE();
          }
View Full Code Here

Examples of java.math.BigDecimal.precision()

    BigDecimal bigNum = getBigDecimalValue( str );
    if ( bigNum == null ) {
      return false;
    }

    int integerPartLength = bigNum.precision() - bigNum.scale();
    int fractionPartLength = bigNum.scale() < 0 ? 0 : bigNum.scale();

    return ( maxIntegerLength >= integerPartLength && maxFractionLength >= fractionPartLength );
  }
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.