List of usage examples for java.lang Double doubleToLongBits
@HotSpotIntrinsicCandidate public static long doubleToLongBits(double value)
From source file:com.opengamma.analytics.financial.instrument.payment.CouponDefinition.java
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + _accrualEndDate.hashCode(); result = prime * result + _accrualStartDate.hashCode(); long temp;// ww w . j ava 2s . co m temp = Double.doubleToLongBits(_notional); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_paymentYearFraction); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.model.option.pricing.fourier.CGMYCharacteristicExponent.java
@Override public int hashCode() { final int prime = 31; int result = 1; long temp;//from www. j a v a 2s. c o m temp = Double.doubleToLongBits(_c); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_g); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_m); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_y); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.kinesisboard.amazonaws.model.StockTrade.java
@Override public boolean equals(Object obj) { if (this == obj) { return true; }// w w w. j a v a 2s.c o m if (obj == null) { return false; } if (!(obj instanceof StockTrade)) { return false; } StockTrade other = (StockTrade) obj; if (id != other.id) { return false; } if (Double.doubleToLongBits(price) != Double.doubleToLongBits(other.price)) { return false; } if (quantity != other.quantity) { return false; } if (tickerSymbol == null) { if (other.tickerSymbol != null) { return false; } } else if (!tickerSymbol.equals(other.tickerSymbol)) { return false; } if (timeInMillis == null) { if (other.timeInMillis != null) { return false; } } else if (!timeInMillis.equals(other.timeInMillis)) { return false; } if (tradeType != other.tradeType) { return false; } return true; }
From source file:com.opengamma.analytics.math.statistics.leastsquare.LeastSquareResults.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }// w ww . j av a 2 s . c om if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final LeastSquareResults other = (LeastSquareResults) obj; if (Double.doubleToLongBits(_chiSq) != Double.doubleToLongBits(other._chiSq)) { return false; } if (!ObjectUtils.equals(_covariance, other._covariance)) { return false; } if (!ObjectUtils.equals(_inverseJacobian, other._inverseJacobian)) { return false; } return ObjectUtils.equals(_parameters, other._parameters); }
From source file:com.opengamma.maths.lowlevelapi.datatypes.primitive.CompressedSparseColumnFormatMatrix.java
/** * Construct from SparseCoordinateFormatMatrix type * @param m is a SparseCoordinateFormatMatrix *//*from w ww . j a v a 2 s . c o m*/ public CompressedSparseColumnFormatMatrix(SparseCoordinateFormatMatrix m) { Validate.notNull(m); _els = m.getNumberOfElements(); int[] colPtrTmp = new int[_els]; int[] rowIdxTmp = new int[_els]; double[] valuesTmp = new double[_els]; double val; int ptr = 0, i; int localMaxEntrisInACol; _maxEntriesInAColumn = -1; for (i = 0; i < m.getNumberOfColumns(); i++) { colPtrTmp[i] = ptr; localMaxEntrisInACol = 0; for (int j = 0; j < m.getNumberOfRows(); j++) { val = m.getEntry(j, i); if (Double.doubleToLongBits(val) != 0L) { valuesTmp[ptr] = val; rowIdxTmp[ptr] = j; ptr++; localMaxEntrisInACol++; } } if (localMaxEntrisInACol > _maxEntriesInAColumn) { _maxEntriesInAColumn = localMaxEntrisInACol; } } colPtrTmp[i] = ptr; // adds in last entry to close access fields _values = Arrays.copyOfRange(valuesTmp, 0, ptr); _rowIdx = Arrays.copyOfRange(rowIdxTmp, 0, ptr); _colPtr = Arrays.copyOfRange(colPtrTmp, 0, i + 1); // yes, the +1 is correct! _rows = m.getNumberOfRows(); _cols = m.getNumberOfColumns(); }
From source file:com.opengamma.analytics.financial.interestrate.bond.definition.BondTransaction.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _bondPurchased.hashCode(); result = prime * result + _bondStandard.hashCode(); long temp;//from w ww .j a v a 2 s . c o m temp = Double.doubleToLongBits(_notionalStandard); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_quantity); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.math.statistics.distribution.GeneralizedExtremeValueDistribution.java
@Override public int hashCode() { final int prime = 31; int result = 1; long temp;/* ww w . j av a2s . c om*/ temp = Double.doubleToLongBits(_ksi); result = prime * result + (int) (temp ^ (temp >>> 32)); 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.equity.future.definition.IndexFutureDefinition.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _currency.hashCode(); result = prime * result + _expiryDate.hashCode(); result = prime * result + _settlementDate.hashCode(); long temp;/*from w w w. jav a2s .co m*/ temp = Double.doubleToLongBits(_referencePrice); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_unitAmount); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }
From source file:com.opengamma.analytics.financial.model.option.pricing.fourier.EuropeanPriceIntegrand.java
@Override public boolean equals(final Object obj) { if (this == obj) { return true; }//from w w w .ja v a 2 s . co m if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } final EuropeanPriceIntegrand other = (EuropeanPriceIntegrand) obj; if (Double.doubleToLongBits(_alpha) != Double.doubleToLongBits(other._alpha)) { return false; } if (!ObjectUtils.equals(_ce, other._ce)) { return false; } return _useVarianceReduction == other._useVarianceReduction; }
From source file:com.opengamma.analytics.financial.equity.option.EquityIndexFutureOption.java
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + _exerciseType.hashCode(); long temp;// www . ja v a2 s.co m temp = Double.doubleToLongBits(_expiry); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + (_isCall ? 1231 : 1237); temp = Double.doubleToLongBits(_strike); result = prime * result + (int) (temp ^ (temp >>> 32)); result = prime * result + _underlying.hashCode(); temp = Double.doubleToLongBits(_pointValue); result = prime * result + (int) (temp ^ (temp >>> 32)); temp = Double.doubleToLongBits(_referencePrice); result = prime * result + (int) (temp ^ (temp >>> 32)); return result; }