Package gnu.trove.list.linked
Class TDoubleLinkedList
java.lang.Object
gnu.trove.list.linked.TDoubleLinkedList
- All Implemented Interfaces:
gnu.trove.list.TDoubleList,gnu.trove.TDoubleCollection,Externalizable,Serializable
A resizable, double linked list of double primitives.
- See Also:
-
Field Summary
Fields inherited from interface gnu.trove.TDoubleCollection
serialVersionUID -
Constructor Summary
ConstructorsConstructorDescriptionTDoubleLinkedList(double no_entry_value) TDoubleLinkedList(gnu.trove.list.TDoubleList list) -
Method Summary
Modifier and TypeMethodDescriptionbooleanadd(double val) voidadd(double[] vals) voidadd(double[] vals, int offset, int length) booleanaddAll(double[] array) booleanaddAll(gnu.trove.TDoubleCollection collection) booleanaddAll(Collection<? extends Double> collection) intbinarySearch(double value) intbinarySearch(double value, int fromIndex, int toIndex) voidclear()booleancontains(double value) booleancontainsAll(double[] array) booleancontainsAll(gnu.trove.TDoubleCollection collection) booleancontainsAll(Collection<?> collection) booleanvoidfill(double val) voidfill(int fromIndex, int toIndex, double val) booleanforEach(gnu.trove.procedure.TDoubleProcedure procedure) booleanforEachDescending(gnu.trove.procedure.TDoubleProcedure procedure) doubleget(int offset) gnu.trove.list.linked.TDoubleLinkedList.TDoubleLinkgetLinkAt(int offset) Returns the link at the given offset.doublegnu.trove.list.TDoubleListgrep(gnu.trove.procedure.TDoubleProcedure condition) inthashCode()intindexOf(double value) intindexOf(int offset, double value) voidinsert(int offset, double value) voidinsert(int offset, double[] values) voidinsert(int offset, double[] values, int valOffset, int len) gnu.trove.list.TDoubleListinverseGrep(gnu.trove.procedure.TDoubleProcedure condition) booleanisEmpty()gnu.trove.iterator.TDoubleIteratoriterator()intlastIndexOf(double value) intlastIndexOf(int offset, double value) doublemax()doublemin()voidbooleanremove(double value) voidremove(int offset, int length) booleanremoveAll(double[] array) booleanremoveAll(gnu.trove.TDoubleCollection collection) booleanremoveAll(Collection<?> collection) doubleremoveAt(int offset) doublereplace(int offset, double val) booleanretainAll(double[] array) booleanretainAll(gnu.trove.TDoubleCollection collection) booleanretainAll(Collection<?> collection) voidreverse()voidreverse(int from, int to) doubleset(int offset, double val) voidset(int offset, double[] values) voidset(int offset, double[] values, int valOffset, int length) voidintsize()voidsort()voidsort(int fromIndex, int toIndex) gnu.trove.list.TDoubleListsubList(int begin, int end) doublesum()double[]toArray()double[]toArray(double[] dest) double[]toArray(double[] dest, int offset, int len) double[]toArray(double[] dest, int source_pos, int dest_pos, int len) double[]toArray(int offset, int len) toString()voidtransformValues(gnu.trove.function.TDoubleFunction function) void
-
Constructor Details
-
TDoubleLinkedList
public TDoubleLinkedList() -
TDoubleLinkedList
public TDoubleLinkedList(double no_entry_value) -
TDoubleLinkedList
public TDoubleLinkedList(gnu.trove.list.TDoubleList list)
-
-
Method Details
-
getNoEntryValue
public double getNoEntryValue()- Specified by:
getNoEntryValuein interfacegnu.trove.TDoubleCollection- Specified by:
getNoEntryValuein interfacegnu.trove.list.TDoubleList
-
size
public int size()- Specified by:
sizein interfacegnu.trove.TDoubleCollection- Specified by:
sizein interfacegnu.trove.list.TDoubleList
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfacegnu.trove.TDoubleCollection- Specified by:
isEmptyin interfacegnu.trove.list.TDoubleList
-
add
public boolean add(double val) - Specified by:
addin interfacegnu.trove.TDoubleCollection- Specified by:
addin interfacegnu.trove.list.TDoubleList
-
add
public void add(double[] vals) - Specified by:
addin interfacegnu.trove.list.TDoubleList
-
add
public void add(double[] vals, int offset, int length) - Specified by:
addin interfacegnu.trove.list.TDoubleList
-
insert
public void insert(int offset, double value) - Specified by:
insertin interfacegnu.trove.list.TDoubleList
-
insert
public void insert(int offset, double[] values) - Specified by:
insertin interfacegnu.trove.list.TDoubleList
-
insert
public void insert(int offset, double[] values, int valOffset, int len) - Specified by:
insertin interfacegnu.trove.list.TDoubleList
-
get
public double get(int offset) - Specified by:
getin interfacegnu.trove.list.TDoubleList
-
getLinkAt
public gnu.trove.list.linked.TDoubleLinkedList.TDoubleLink getLinkAt(int offset) Returns the link at the given offset.
A simple bisection criteria is used to keep the worst case complexity equal to O(n/2) where n = size(). Simply start from head of list or tail depending on offset and list size.
- Parameters:
offset- of the link- Returns:
- link or null if non-existent
-
set
public double set(int offset, double val) - Specified by:
setin interfacegnu.trove.list.TDoubleList
-
set
public void set(int offset, double[] values) - Specified by:
setin interfacegnu.trove.list.TDoubleList
-
set
public void set(int offset, double[] values, int valOffset, int length) - Specified by:
setin interfacegnu.trove.list.TDoubleList
-
replace
public double replace(int offset, double val) - Specified by:
replacein interfacegnu.trove.list.TDoubleList
-
clear
public void clear()- Specified by:
clearin interfacegnu.trove.TDoubleCollection- Specified by:
clearin interfacegnu.trove.list.TDoubleList
-
remove
public boolean remove(double value) - Specified by:
removein interfacegnu.trove.TDoubleCollection- Specified by:
removein interfacegnu.trove.list.TDoubleList
-
containsAll
- Specified by:
containsAllin interfacegnu.trove.TDoubleCollection
-
containsAll
public boolean containsAll(gnu.trove.TDoubleCollection collection) - Specified by:
containsAllin interfacegnu.trove.TDoubleCollection
-
containsAll
public boolean containsAll(double[] array) - Specified by:
containsAllin interfacegnu.trove.TDoubleCollection
-
addAll
- Specified by:
addAllin interfacegnu.trove.TDoubleCollection
-
addAll
public boolean addAll(gnu.trove.TDoubleCollection collection) - Specified by:
addAllin interfacegnu.trove.TDoubleCollection
-
addAll
public boolean addAll(double[] array) - Specified by:
addAllin interfacegnu.trove.TDoubleCollection
-
retainAll
- Specified by:
retainAllin interfacegnu.trove.TDoubleCollection
-
retainAll
public boolean retainAll(gnu.trove.TDoubleCollection collection) - Specified by:
retainAllin interfacegnu.trove.TDoubleCollection
-
retainAll
public boolean retainAll(double[] array) - Specified by:
retainAllin interfacegnu.trove.TDoubleCollection
-
removeAll
- Specified by:
removeAllin interfacegnu.trove.TDoubleCollection
-
removeAll
public boolean removeAll(gnu.trove.TDoubleCollection collection) - Specified by:
removeAllin interfacegnu.trove.TDoubleCollection
-
removeAll
public boolean removeAll(double[] array) - Specified by:
removeAllin interfacegnu.trove.TDoubleCollection
-
removeAt
public double removeAt(int offset) - Specified by:
removeAtin interfacegnu.trove.list.TDoubleList
-
remove
public void remove(int offset, int length) - Specified by:
removein interfacegnu.trove.list.TDoubleList
-
transformValues
public void transformValues(gnu.trove.function.TDoubleFunction function) - Specified by:
transformValuesin interfacegnu.trove.list.TDoubleList
-
reverse
public void reverse()- Specified by:
reversein interfacegnu.trove.list.TDoubleList
-
reverse
public void reverse(int from, int to) - Specified by:
reversein interfacegnu.trove.list.TDoubleList
-
shuffle
- Specified by:
shufflein interfacegnu.trove.list.TDoubleList
-
subList
public gnu.trove.list.TDoubleList subList(int begin, int end) - Specified by:
subListin interfacegnu.trove.list.TDoubleList
-
toArray
public double[] toArray()- Specified by:
toArrayin interfacegnu.trove.TDoubleCollection- Specified by:
toArrayin interfacegnu.trove.list.TDoubleList
-
toArray
public double[] toArray(int offset, int len) - Specified by:
toArrayin interfacegnu.trove.list.TDoubleList
-
toArray
public double[] toArray(double[] dest) - Specified by:
toArrayin interfacegnu.trove.TDoubleCollection- Specified by:
toArrayin interfacegnu.trove.list.TDoubleList
-
toArray
public double[] toArray(double[] dest, int offset, int len) - Specified by:
toArrayin interfacegnu.trove.list.TDoubleList
-
toArray
public double[] toArray(double[] dest, int source_pos, int dest_pos, int len) - Specified by:
toArrayin interfacegnu.trove.list.TDoubleList
-
forEach
public boolean forEach(gnu.trove.procedure.TDoubleProcedure procedure) - Specified by:
forEachin interfacegnu.trove.TDoubleCollection- Specified by:
forEachin interfacegnu.trove.list.TDoubleList
-
forEachDescending
public boolean forEachDescending(gnu.trove.procedure.TDoubleProcedure procedure) - Specified by:
forEachDescendingin interfacegnu.trove.list.TDoubleList
-
sort
public void sort()- Specified by:
sortin interfacegnu.trove.list.TDoubleList
-
sort
public void sort(int fromIndex, int toIndex) - Specified by:
sortin interfacegnu.trove.list.TDoubleList
-
fill
public void fill(double val) - Specified by:
fillin interfacegnu.trove.list.TDoubleList
-
fill
public void fill(int fromIndex, int toIndex, double val) - Specified by:
fillin interfacegnu.trove.list.TDoubleList
-
binarySearch
public int binarySearch(double value) - Specified by:
binarySearchin interfacegnu.trove.list.TDoubleList
-
binarySearch
public int binarySearch(double value, int fromIndex, int toIndex) - Specified by:
binarySearchin interfacegnu.trove.list.TDoubleList
-
indexOf
public int indexOf(double value) - Specified by:
indexOfin interfacegnu.trove.list.TDoubleList
-
indexOf
public int indexOf(int offset, double value) - Specified by:
indexOfin interfacegnu.trove.list.TDoubleList
-
lastIndexOf
public int lastIndexOf(double value) - Specified by:
lastIndexOfin interfacegnu.trove.list.TDoubleList
-
lastIndexOf
public int lastIndexOf(int offset, double value) - Specified by:
lastIndexOfin interfacegnu.trove.list.TDoubleList
-
contains
public boolean contains(double value) - Specified by:
containsin interfacegnu.trove.TDoubleCollection- Specified by:
containsin interfacegnu.trove.list.TDoubleList
-
iterator
public gnu.trove.iterator.TDoubleIterator iterator()- Specified by:
iteratorin interfacegnu.trove.TDoubleCollection
-
grep
public gnu.trove.list.TDoubleList grep(gnu.trove.procedure.TDoubleProcedure condition) - Specified by:
grepin interfacegnu.trove.list.TDoubleList
-
inverseGrep
public gnu.trove.list.TDoubleList inverseGrep(gnu.trove.procedure.TDoubleProcedure condition) - Specified by:
inverseGrepin interfacegnu.trove.list.TDoubleList
-
max
public double max()- Specified by:
maxin interfacegnu.trove.list.TDoubleList
-
min
public double min()- Specified by:
minin interfacegnu.trove.list.TDoubleList
-
sum
public double sum()- Specified by:
sumin interfacegnu.trove.list.TDoubleList
-
writeExternal
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
readExternal
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
equals
-
hashCode
public int hashCode() -
toString
-