Klasse DoubleRBTreeSet

Alle implementierten Schnittstellen:
Iterable<Double>, Collection<Double>, NavigableSet<Double>, Set<Double>, SortedSet<Double>, DoubleCollection, DoubleIterable, DoubleNavigableSet, DoubleSet, DoubleSortedSet, ISizeProvider

public class DoubleRBTreeSet extends AbstractDoubleSet implements DoubleNavigableSet
A Simple Type Specific RB TreeSet implementation that reduces boxing/unboxing. It is using a bit more memory then FastUtil, but it saves a lot of Performance on the Optimized removal and iteration logic. Which makes the implementation actually useable and does not get outperformed by Javas default implementation.
  • Konstruktordetails

    • DoubleRBTreeSet

      public DoubleRBTreeSet()
      Default Constructor
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleComparator comp)
      Constructor that allows to define the sorter
      Parameter:
      comp - the function that decides how the tree is sorted, can be null
    • DoubleRBTreeSet

      public DoubleRBTreeSet(double[] array)
      Helper constructor that allow to create a set from an array
      Parameter:
      array - the elements that should be used
    • DoubleRBTreeSet

      public DoubleRBTreeSet(double[] array, int offset, int length)
      Helper constructor that allow to create a set from an array
      Parameter:
      array - the elements that should be used
      offset - the starting index within the array
      length - the amount of elements that are within the array
      Löst aus:
      IllegalStateException - if offset and length causes to step outside of the arrays range
    • DoubleRBTreeSet

      public DoubleRBTreeSet(double[] array, DoubleComparator comp)
      Helper constructor that allow to create a set from an array
      Parameter:
      array - the elements that should be used
      comp - the sorter of the tree, can be null
    • DoubleRBTreeSet

      public DoubleRBTreeSet(double[] array, int offset, int length, DoubleComparator comp)
      Helper constructor that allow to create a set from an array
      Parameter:
      array - the elements that should be used
      offset - the starting index within the array
      length - the amount of elements that are within the array
      comp - the sorter of the tree, can be null
      Löst aus:
      IllegalStateException - if offset and length causes to step outside of the arrays range
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleSortedSet sortedSet)
      A Helper constructor that allows to create a Set with exactly the same values as the provided SortedSet.
      Parameter:
      sortedSet - the set the elements should be added to the TreeSet
      Note:
      this also includes the Comparator if present
    • DoubleRBTreeSet

      @Deprecated public DoubleRBTreeSet(Collection<? extends Double> collection)
      Veraltet.
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the TreeSet
    • DoubleRBTreeSet

      @Deprecated public DoubleRBTreeSet(Collection<? extends Double> collection, DoubleComparator comp)
      Veraltet.
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the TreeSet
      comp - the sorter of the tree, can be null
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleCollection collection)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the TreeSet
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleCollection collection, DoubleComparator comp)
      A Helper constructor that allows to create a Set with exactly the same values as the provided collection.
      Parameter:
      collection - the set the elements should be added to the TreeSet
      comp - the sorter of the tree, can be null
    • DoubleRBTreeSet

      public DoubleRBTreeSet(Iterator<Double> iterator)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
    • DoubleRBTreeSet

      public DoubleRBTreeSet(Iterator<Double> iterator, DoubleComparator comp)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
      comp - the sorter of the tree, can be null
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleIterator iterator)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
    • DoubleRBTreeSet

      public DoubleRBTreeSet(DoubleIterator iterator, DoubleComparator comp)
      A Helper constructor that allows to create a set from a iterator of an unknown size
      Parameter:
      iterator - the elements that should be added to the set
      comp - the sorter of the tree, can be null
  • Methodendetails