Examples of Precision


Examples of org.opengis.geometry.Precision

    container.registerComponentImplementation(PrimitiveFactoryImpl.class);
    container.registerComponentImplementation(Geo2DFactory.class);
   
    // Teach Container about other dependacies needed
    container.registerComponentInstance( crs );
    Precision pr = new PrecisionModel();
    container.registerComponentInstance( pr );
   
    return container;   
  }
View Full Code Here

Examples of ptolemy.math.Precision

     *  fractional part.
     */
    public FixMatrixToken() {
        _rowCount = 1;
        _columnCount = 1;
        _precision = new Precision(32, 32);
        _value = new FixPoint[1][1];
        _value[0][0] = Quantizer.round(0.0, _precision);
    }
View Full Code Here

Examples of ptolemy.math.Precision

     *   is invalid.
     */
    public FixToken(double value, int numberOfBits, int integerBits)
            throws IllegalArgumentException {
        try {
            Precision precision = new Precision(numberOfBits, integerBits);
            FixPointQuantization q = new FixPointQuantization(precision,
                    Overflow.SATURATE, Rounding.NEAREST);
            _value = new FixPoint(value, q);
        } catch (NumberFormatException e) {
            throw new IllegalArgumentException(e.getMessage());
View Full Code Here

Examples of ptolemy.math.Precision

        if (!_isUnitless()) {
            unitString = " * " + unitsString();
        }

        Precision precision = _value.getPrecision();
        return "fix(" + _value.toString() + "," + precision.getNumberOfBits()
                + "," + precision.getIntegerBitLength() + ")" + unitString;
    }
View Full Code Here

Examples of ptolemy.math.Precision

    /** Construct a new fix type, with no integer bits and no
     * fractional bits.  This (rather useless) type represents the
     * bottom of the FixPoint type lattice.
     */
    public FixType() {
        _precision = new Precision(0, 0);
    }
View Full Code Here

Examples of ptolemy.math.Precision

     @return A new type, or BaseType.GENERAL, if the operation does
     *  not make sense for the given types.
     */
    public Type add(Type rightArgumentType) {
        if (rightArgumentType instanceof FixType) {
            Precision rPrecision = ((FixType) rightArgumentType).getPrecision();
            Precision newPrecision = FixPoint.addPrecision(rPrecision,
                    _precision);
            FixType returnType = new FixType(newPrecision);
            return returnType;
        } else {
            return TypeLattice.leastUpperBound(this, rightArgumentType);
View Full Code Here

Examples of ptolemy.math.Precision

     *  not make sense for the given types.
     */
    public Type divide(Type rightArgumentType) {
        if (rightArgumentType instanceof FixType) {
            if (rightArgumentType instanceof FixType) {
                Precision rPrecision = ((FixType) rightArgumentType)
                        .getPrecision();
                Precision newPrecision = FixPoint.dividePrecision(rPrecision,
                        _precision);
                FixType returnType = new FixType(newPrecision);
                return returnType;
            } else {
                return TypeLattice.leastUpperBound(this, rightArgumentType);
View Full Code Here

Examples of ptolemy.math.Precision

     */
    public boolean equals(Object object) {
        if (!(object instanceof FixType)) {
            return false;
        }
        Precision precision = ((FixType) object).getPrecision();
        if (!(precision.equals(_precision))) {
            return false;
        }

        return true;
    }
View Full Code Here

Examples of ptolemy.math.Precision

     @return A new type, or BaseType.GENERAL, if the operation does
     *  not make sense for the given types.
     */
    public Type multiply(Type rightArgumentType) {
        if (rightArgumentType instanceof FixType) {
            Precision rPrecision = ((FixType) rightArgumentType).getPrecision();
            Precision newPrecision = FixPoint.multiplyPrecision(rPrecision,
                    _precision);
            FixType returnType = new FixType(newPrecision);
            return returnType;
        } else {
            return TypeLattice.leastUpperBound(this, rightArgumentType);
View Full Code Here

Examples of ptolemy.math.Precision

     @return A new type, or BaseType.GENERAL, if the operation does
     *  not make sense for the given types.
     */
    public Type subtract(Type rightArgumentType) {
        if (rightArgumentType instanceof FixType) {
            Precision rPrecision = ((FixType) rightArgumentType).getPrecision();
            Precision newPrecision = FixPoint.subtractPrecision(rPrecision,
                    _precision);
            FixType returnType = new FixType(newPrecision);
            return returnType;
        } else {
            return TypeLattice.leastUpperBound(this, rightArgumentType);
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.