Example usage for java.lang Double doubleToLongBits

List of usage examples for java.lang Double doubleToLongBits

Introduction

In this page you can find the example usage for java.lang Double doubleToLongBits.

Prototype

@HotSpotIntrinsicCandidate
public static long doubleToLongBits(double value) 

Source Link

Document

Returns a representation of the specified floating-point value according to the IEEE 754 floating-point "double format" bit layout.

Usage

From source file:com.opengamma.analytics.math.statistics.distribution.GammaDistribution.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//ww w .ja  va2s  .  c  o  m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final GammaDistribution other = (GammaDistribution) obj;
    if (Double.doubleToLongBits(_k) != Double.doubleToLongBits(other._k)) {
        return false;
    }
    return Double.doubleToLongBits(_theta) == Double.doubleToLongBits(other._theta);
}

From source file:com.opengamma.analytics.financial.equity.future.derivative.CashSettledFuture.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    result = prime * result + _currency.hashCode();
    long temp;//  ww w.  j a  v  a  2 s  .  c  o  m
    temp = Double.doubleToLongBits(_unitAmount);
    result = prime * result + (int) (temp ^ temp >>> 32);
    temp = Double.doubleToLongBits(_referencePrice);
    result = prime * result + (int) (temp ^ temp >>> 32);
    temp = Double.doubleToLongBits(_timeToSettlement);
    result = prime * result + (int) (temp ^ temp >>> 32);
    temp = Double.doubleToLongBits(_timeToExpiry);
    result = prime * result + (int) (temp ^ temp >>> 32);
    return result;
}

From source file:com.opengamma.analytics.math.statistics.leastsquare.LeastSquareResults.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*from  w  ww.  ja v  a  2s. c o  m*/
    temp = Double.doubleToLongBits(_chiSq);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    result = prime * result + _covariance.hashCode();
    result = prime * result + _parameters.hashCode();
    result = prime * result + (_inverseJacobian == null ? 0 : _inverseJacobian.hashCode());
    return result;
}

From source file:com.opengamma.analytics.financial.model.option.pricing.fourier.GaussianCharacteristicExponent.java

@Override
public int hashCode() {
    final int prime = 31;
    int result = 1;
    long temp;/*from w ww .  j  av a2  s . c  om*/
    temp = Double.doubleToLongBits(_mu);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    temp = Double.doubleToLongBits(_sigma);
    result = prime * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.financial.interestrate.future.derivative.FederalFundsFutureTransaction.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }/*  www  .j av a 2  s.com*/
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final FederalFundsFutureTransaction other = (FederalFundsFutureTransaction) obj;
    if (_quantity != other._quantity) {
        return false;
    }
    if (Double.doubleToLongBits(_referencePrice) != Double.doubleToLongBits(other._referencePrice)) {
        return false;
    }
    if (!ObjectUtils.equals(_underlyingFuture, other._underlyingFuture)) {
        return false;
    }
    return true;
}

From source file:io.seldon.client.beans.DemographicBean.java

@Override
public int hashCode() {
    int result;//from  www  .j av a 2s . co  m
    long temp;
    result = demoId;
    result = 31 * result + (attr != null ? attr.hashCode() : 0);
    result = 31 * result + (val != null ? val.hashCode() : 0);
    result = 31 * result + (attrName != null ? attrName.hashCode() : 0);
    result = 31 * result + (valName != null ? valName.hashCode() : 0);
    temp = amount != +0.0d ? Double.doubleToLongBits(amount) : 0L;
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    return result;
}

From source file:com.opengamma.analytics.math.minimization.DoubleRangeLimitTransform.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }//from w w w.j  ava2 s .co m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final DoubleRangeLimitTransform other = (DoubleRangeLimitTransform) obj;
    if (Double.doubleToLongBits(_lower) != Double.doubleToLongBits(other._lower)) {
        return false;
    }
    return Double.doubleToLongBits(_upper) == Double.doubleToLongBits(other._upper);
}

From source file:com.crossover.trial.weather.domain.DataPoint.java

@Override
public int hashCode() {
    int result;//w  w w  .j a  v a  2 s  .c o m
    long temp;
    result = id != null ? id.hashCode() : 0;
    temp = Double.doubleToLongBits(mean);
    result = 31 * result + (int) (temp ^ (temp >>> 32));
    result = 31 * result + first;
    result = 31 * result + second;
    result = 31 * result + third;
    result = 31 * result + count;
    result = 31 * result + type.hashCode();
    return result;
}

From source file:com.hpcloud.mon.common.model.metric.Metric.java

@Override
public boolean equals(Object obj) {
    if (this == obj)
        return true;
    if (obj == null)
        return false;
    if (getClass() != obj.getClass())
        return false;
    Metric other = (Metric) obj;//from  w w w.j a v  a  2 s.com
    if (dimensions == null) {
        if (other.dimensions != null)
            return false;
    } else if (!dimensions.equals(other.dimensions))
        return false;
    if (name == null) {
        if (other.name != null)
            return false;
    } else if (!name.equals(other.name))
        return false;
    // Note - Deep Equals is used here
    if (!Arrays.deepEquals(timeValues, other.timeValues))
        return false;
    if (timestamp != other.timestamp)
        return false;
    if (Double.doubleToLongBits(value) != Double.doubleToLongBits(other.value))
        return false;
    return true;
}

From source file:com.opengamma.analytics.financial.model.interestrate.curve.YieldAndDiscountAddZeroFixedCurve.java

@Override
public boolean equals(final Object obj) {
    if (this == obj) {
        return true;
    }// w ww . j a  v a2s .  c o m
    if (obj == null) {
        return false;
    }
    if (getClass() != obj.getClass()) {
        return false;
    }
    final YieldAndDiscountAddZeroFixedCurve other = (YieldAndDiscountAddZeroFixedCurve) obj;
    if (!ObjectUtils.equals(_curve, other._curve)) {
        return false;
    }
    if (!ObjectUtils.equals(_curveFixed, other._curveFixed)) {
        return false;
    }
    if (Double.doubleToLongBits(_sign) != Double.doubleToLongBits(other._sign)) {
        return false;
    }
    return true;
}