Codota Logo
TDoubleHashSet
Code IndexAdd Codota to your IDE (free)

How to use
TDoubleHashSet
in
gnu.trove

Best Java code snippets using gnu.trove.TDoubleHashSet (Showing top 15 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Adds all of the elements in <tt>array</tt> to the set.
 *
 * @param array an <code>array</code> of double primitives.
 * @return true if the set was modified by the add all operation.
 */
public boolean addAll(double[] array) {
  boolean changed = false;
  for (int i = array.length; i-- > 0;) {
    if (add(array[i])) {
      changed = true;
    }
  }
  return changed;
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Creates a new <code>TDoubleHashSet</code> instance containing the
 * elements of <tt>array</tt>.
 *
 * @param array an array of <code>double</code> primitives
 */
public TDoubleHashSet(double[] array) {
  this(array.length);
  addAll(array);
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Creates an iterator over the values of the set.
 *
 * @return an iterator with support for removals in the underlying set
 */
public Iterator iterator() {
return new Iterator() {
  private final TDoubleIterator it = _set.iterator();
      
  public Object next() {
    return wrap(it.next());
  }
  public boolean hasNext() {
    return it.hasNext();
  }
  public void remove() {
    it.remove();
  }
  };
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Removes <tt>val</tt> from the set.
 *
 * @param val an <code>double</code> value
 * @return true if the set was modified by the remove operation.
 */
public boolean remove(double val) {
  int index = index(val);
  if (index >= 0) {
    removeAt(index);
    return true;
  }
  return false;
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Compares this set with another set for equality of their stored
 * entries.
 *
 * @param other an <code>Object</code> value
 * @return a <code>boolean</code> value
 */
public boolean equals(Object other) {
  if (! (other instanceof TDoubleHashSet)) {
    return false;
  }
  final TDoubleHashSet that = (TDoubleHashSet)other;
  if (that.size() != this.size()) {
    return false;
  }
  return forEach(new TDoubleProcedure() {
    public final boolean execute(double value) {
      return that.contains(value);
    }
  });
}
origin: jatecs/jatecs

while (categories.hasNext()) {
  short category = categories.next();
  scores.put(category, new TDoubleHashSet());
    short category = categories.next();
    double score = docScores.get(category).score;
    scores.get(category).add(score);
while (categories.hasNext()) {
  short category = categories.next();
  TDoubleIterator scoreIterator = scores.get(category).iterator();
  double maxDelta = Double.NEGATIVE_INFINITY;
  while (scoreIterator.hasNext()) {
origin: de.julielab/jcore-mallet-0.4

  private void readObject(ObjectInputStream stream)
    throws IOException, ClassNotFoundException {
    stream.defaultReadObject();

    int size = stream.readInt();
    setUp(size);
    while (size-- > 0) {
      double val = stream.readDouble();
      add(val);
    }
  }
} // TDoubleHashSet
origin: de.julielab/jcore-mallet-0.4

if (_set.equals(other)) {
  return true;	// comparing two trove sets
} else if (other instanceof Set) {
  Set that = (Set)other;
  if (that.size() != _set.size()) {
  return false;	// different sizes, no need to compare
  } else {		// now we have to do it the hard way
    if (val instanceof Double) {
    double v = unwrap(val);
    if (_set.contains(v)) {
origin: org.fudaa.framework.dodico/dodico-common

/**
 * Compare les X de cette evolution avec <code>_toCompare</code>. Si les x sont diffrents renvoie false et stocke
 * dans <code>_commonX</code> l'union des valeurs des x.
 * 
 * @param _toCompare l'evolution a comparer
 * @param _commonX la liste a remplir avec l'union des x des 2 evolutions si differentes
 * @return true si identique
 */
public boolean isEvolutionWithSameX(final EvolutionReguliere _toCompare, final TDoubleHashSet _commonX) {
 if (_toCompare == null) {
  return false;
 }
 if (t_.equals(_toCompare.t_)) {
  return true;
 }
 if (_commonX != null) {
  _commonX.ensureCapacity(t_.size() + _toCompare.t_.size());
  _commonX.addAll(t_.toNativeArray());
  _commonX.addAll(_toCompare.t_.toNativeArray());
 }
 return false;
}
origin: de.julielab/jcore-mallet-0.4

  public final boolean execute(double value) {
    return that.contains(value);
  }
});
origin: de.julielab/jcore-mallet-0.4

/**
 * Empties the set.
 */
public void clear() {
this._set.clear();
}
origin: de.julielab/jcore-mallet-0.4

private void writeObject(ObjectOutputStream stream)
  throws IOException {
  stream.defaultWriteObject();
  // number of entries
  stream.writeInt(_size);
  SerializationProcedure writeProcedure = new SerializationProcedure(stream);
  if (! forEach(writeProcedure)) {
    throw writeProcedure.exception;
  }
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Tests the set to determine if all of the elements in
 * <tt>array</tt> are present.
 *
 * @param array an <code>array</code> of double primitives.
 * @return true if all elements were present in the set.
 */
public boolean containsAll(double[] array) {
 for (int i = array.length; i-- > 0;) {
    if (! contains(array[i])) {
      return false;
    }
  }
  return true;
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Inserts a value into the set.
 *
 * @param true if the set was modified by the insertion
 */
public boolean add(Object value) {
return _set.add(unwrap(value));
}
origin: de.julielab/jcore-mallet-0.4

/**
 * Creates a new <code>TDoubleHashSet</code> instance containing the
 * elements of <tt>array</tt>.
 *
 * @param array an array of <code>double</code> primitives
 * @param strategy used to compute hash codes and to compare keys.
 */
public TDoubleHashSet(double[] array, TDoubleHashingStrategy strategy) {
  this(array.length, strategy);
  addAll(array);
}
gnu.troveTDoubleHashSet

Javadoc

An open addressed set implementation for double primitives. Created: Sat Nov 3 10:38:17 2001

Most used methods

  • add
    Inserts a value into the set.
  • addAll
    Adds all of the elements in array to the set.
  • iterator
  • <init>
    Creates a new TDoubleHashSet instance containing the elements of array.
  • clear
    Empties the set.
  • contains
  • ensureCapacity
  • equals
    Compares this set with another set for equality of their stored entries.
  • forEach
  • index
  • insertionIndex
  • postInsertHook
  • insertionIndex,
  • postInsertHook,
  • remove,
  • removeAt,
  • setUp,
  • size

Popular in Java

  • Creating JSON documents from java classes using gson
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
    Schedules the specified task for repeated fixed-rate execution, beginning after the specified delay.
  • getContentResolver (Context)
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • DataSource (javax.sql)
    A factory for connections to the physical data source that this DataSource object represents. An alt
  • JFileChooser (javax.swing)
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now