/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleHashMap( TObjectDoubleMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
public void merge(TObjectDoubleHashMap<MolecularFormula> map) { this.commonLosses.putAll(map); recombinatedList = null; }
public void merge(Map<MolecularFormula, Double> map) { this.commonLosses.putAll(map); recombinatedList = null; }
public FreeRadicalEdgeScorer(Map<MolecularFormula, Double> freeRadicals, double generalRadicalScore, double normalization) { this.freeRadicals = new TObjectDoubleHashMap<MolecularFormula>(freeRadicals.size() * 2, 0.75f, Double.NEGATIVE_INFINITY); this.freeRadicals.putAll(freeRadicals); this.generalRadicalScore = generalRadicalScore; this.normalization = normalization; }
/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleHashMap( TObjectDoubleMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ @SuppressWarnings("rawtypes") public TObjectDoubleHashMap( TObjectDoubleMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleHashMap( TObjectDoubleMap<K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = hashmap._loadFactor; this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( (int) Math.ceil( DEFAULT_CAPACITY / _loadFactor ) ); } putAll( map ); }
/** * Creates a new <code>TObjectDoubleHashMap</code> that contains the entries * in the map passed to it. * * @param map the <tt>TObjectDoubleMap</tt> to be copied. */ public TObjectDoubleHashMap( TObjectDoubleMap<? extends K> map ) { this( map.size(), 0.5f, map.getNoEntryValue() ); if ( map instanceof TObjectDoubleHashMap ) { TObjectDoubleHashMap hashmap = ( TObjectDoubleHashMap ) map; this._loadFactor = Math.abs( hashmap._loadFactor ); this.no_entry_value = hashmap.no_entry_value; //noinspection RedundantCast if ( this.no_entry_value != ( double ) 0 ) { Arrays.fill( _values, this.no_entry_value ); } setUp( saturatedCast( fastCeil( DEFAULT_CAPACITY / (double) _loadFactor ) ) ); } putAll( map ); }