ComplexDoubleArray

class ComplexDoubleArray(val size: Int = 0)

Constructors

Link copied to clipboard
fun ComplexDoubleArray(size: Int, init: (Int) -> ComplexDouble)
Link copied to clipboard
fun ComplexDoubleArray(size: Int = 0)

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
operator fun get(index: Int): ComplexDouble
Link copied to clipboard
fun getFlatArray(): DoubleArray
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
operator fun iterator(): ComplexDoubleIterator

Creates an iterator over the elements of the array.

Link copied to clipboard
operator fun set(index: Int, value: ComplexDouble)
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val size: Int = 0

Extensions

Link copied to clipboard
inline fun ComplexDoubleArray.all(predicate: (ComplexDouble) -> Boolean): Boolean

Returns true if all elements match the given predicate.

Link copied to clipboard
fun ComplexDoubleArray.any(): Boolean

Returns true if array has at least one element.

inline fun ComplexDoubleArray.any(predicate: (ComplexDouble) -> Boolean): Boolean

Returns true if at least one element matches the given predicate.

Link copied to clipboard
fun ComplexDoubleArray.asIterable(): Iterable<ComplexDouble>

Creates an Iterable instance that wraps the original array returning its elements when being iterated.

Link copied to clipboard
fun ComplexDoubleArray.asList(): List<ComplexDouble>

Returns a List that wraps the original array.

Link copied to clipboard
fun ComplexDoubleArray.asSequence(): Sequence<ComplexDouble>

Creates a Sequence instance that wraps the original array returning its elements when being iterated.

Link copied to clipboard
inline fun <K, V> ComplexDoubleArray.associate(transform: (ComplexDouble) -> Pair<K, V>): Map<K, V>

Returns a Map containing key-value pairs provided by transform function applied to elements of the given array.

Link copied to clipboard
inline fun <K> ComplexDoubleArray.associateBy(keySelector: (ComplexDouble) -> K): Map<K, ComplexDouble>

Returns a Map containing the elements from the given array indexed by the key returned from keySelector function applied to each element.

inline fun <K, V> ComplexDoubleArray.associateBy(keySelector: (ComplexDouble) -> K, valueTransform: (ComplexDouble) -> V): Map<K, V>

Returns a Map containing the values provided by valueTransform and indexed by keySelector functions applied to elements of the given array.

Link copied to clipboard
inline fun <K, M : MutableMap<in K, in ComplexDouble>> ComplexDoubleArray.associateByTo(destination: M, keySelector: (ComplexDouble) -> K): M

Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function applied to each element of the given array and value is the element itself.

inline fun <K, V, M : MutableMap<in K, in V>> ComplexDoubleArray.associateByTo(    destination: M,     keySelector: (ComplexDouble) -> K,     valueTransform: (ComplexDouble) -> V): M

Populates and returns the destination mutable map with key-value pairs, where key is provided by the keySelector function and and value is provided by the valueTransform function applied to elements of the given array.

Link copied to clipboard
inline fun <K, V, M : MutableMap<in K, in V>> ComplexDoubleArray.associateTo(destination: M, transform: (ComplexDouble) -> Pair<K, V>): M

Populates and returns the destination mutable map with key-value pairs provided by transform function applied to each element of the given array.

Link copied to clipboard
inline fun <V> ComplexDoubleArray.associateWith(valueSelector: (ComplexDouble) -> V): Map<ComplexDouble, V>

Returns a Map where keys are elements from the given array and values are produced by the valueSelector function applied to each element.

Link copied to clipboard
inline fun <V, M : MutableMap<in ComplexDouble, in V>> ComplexDoubleArray.associateWithTo(destination: M, valueSelector: (ComplexDouble) -> V): M

Populates and returns the destination mutable map with key-value pairs for each element of the given array, where key is the element itself and value is provided by the valueSelector function applied to that key.

Link copied to clipboard
inline operator fun ComplexDoubleArray.component1(): ComplexDouble

Returns 1st element from the array.

Link copied to clipboard
inline operator fun ComplexDoubleArray.component2(): ComplexDouble

Returns 2nd element from the array.

Link copied to clipboard
inline operator fun ComplexDoubleArray.component3(): ComplexDouble

Returns 3rd element from the array.

Link copied to clipboard
inline operator fun ComplexDoubleArray.component4(): ComplexDouble

Returns 4th element from the array.

Link copied to clipboard
inline operator fun ComplexDoubleArray.component5(): ComplexDouble

Returns 5th element from the array.

Link copied to clipboard
operator fun ComplexDoubleArray.contains(element: ComplexDouble): Boolean

Returns true if element is found in the array.

Link copied to clipboard
infix fun ComplexDoubleArray?.contentEquals(other: ComplexDoubleArray?): Boolean

Returns true if the two specified arrays are structurally equal to one another, i.e. contain the same number of the same elements in the same order.

Link copied to clipboard
fun ComplexDoubleArray?.contentHashCode(): Int

Returns a hash code based on the contents of this array as if it is List.

Link copied to clipboard
fun ComplexDoubleArray.copyInto(    destination: ComplexDoubleArray,     destinationOffset: Int = 0,     startIndex: Int = 0,     endIndex: Int = size): ComplexDoubleArray

Copies this array or its subrange into the destination array and returns that array.

Link copied to clipboard
inline fun ComplexDoubleArray.copyOf(): ComplexDoubleArray

Returns new array which is a copy of the original array.

inline fun ComplexDoubleArray.copyOf(newSize: Int): ComplexDoubleArray

Returns new array which is a copy of the original array, resized to the given newSize. The copy is either truncated or padded at the end with zero values if necessary.

Link copied to clipboard
inline fun ComplexDoubleArray.copyOfRange(fromIndex: Int, toIndex: Int): ComplexDoubleArray

Returns a new array which is a copy of the specified range of the original array.

Link copied to clipboard
inline fun ComplexDoubleArray.count(): Int

Returns the number of elements in this array.

inline fun ComplexDoubleArray.count(predicate: (ComplexDouble) -> Boolean): Int

Returns the number of elements matching the given predicate.

Link copied to clipboard
fun ComplexDoubleArray.distinct(): List<ComplexDouble>

Returns a list containing only distinct elements from the given array.

Link copied to clipboard
inline fun <K> ComplexDoubleArray.distinctBy(selector: (ComplexDouble) -> K): List<ComplexDouble>

Returns a list containing only elements from the given array having distinct keys returned by the given selector function.

Link copied to clipboard
fun ComplexDoubleArray.drop(n: Int): List<ComplexDouble>

Returns a list containing all elements except first n elements.

Link copied to clipboard
fun ComplexDoubleArray.dropLast(n: Int): List<ComplexDouble>

Returns a list containing all elements except last n elements.

Link copied to clipboard
inline fun ComplexDoubleArray.dropLastWhile(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing all elements except last elements that satisfy the given predicate.

Link copied to clipboard
inline fun ComplexDoubleArray.dropWhile(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing all elements except first elements that satisfy the given predicate.

Link copied to clipboard
fun ComplexDoubleArray.elementAt(index: Int): ComplexDouble

Returns an element at the given index or throws an IndexOutOfBoundsException if the index is out of bounds of this array.

Link copied to clipboard
inline fun ComplexDoubleArray.elementAtOrElse(index: Int, defaultValue: (Int) -> ComplexDouble): ComplexDouble

Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.

Link copied to clipboard
inline fun ComplexDoubleArray.elementAtOrNull(index: Int): ComplexDouble?

Returns an element at the given index or null if the index is out of bounds of this array.

Link copied to clipboard
fun ComplexDoubleArray.fill(    element: ComplexDouble,     fromIndex: Int = 0,     toIndex: Int = size)

Fills this array or its subrange with the specified element value.

Link copied to clipboard
inline fun ComplexDoubleArray.filter(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing only elements matching the given predicate.

Link copied to clipboard
inline fun ComplexDoubleArray.filterIndexed(predicate: (index: Int, ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing only elements matching the given predicate.

Link copied to clipboard
inline fun <C : MutableCollection<in ComplexDouble>> ComplexDoubleArray.filterIndexedTo(destination: C, predicate: (index: Int, ComplexDouble) -> Boolean): C

Appends all elements matching the given predicate to the given destination.

Link copied to clipboard
inline fun ComplexDoubleArray.filterNot(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing all elements not matching the given predicate.

Link copied to clipboard
inline fun <C : MutableCollection<in ComplexDouble>> ComplexDoubleArray.filterNotTo(destination: C, predicate: (ComplexDouble) -> Boolean): C

Appends all elements not matching the given predicate to the given destination.

Link copied to clipboard
inline fun <C : MutableCollection<in ComplexDouble>> ComplexDoubleArray.filterTo(destination: C, predicate: (ComplexDouble) -> Boolean): C

Appends all elements matching the given predicate to the given destination.

Link copied to clipboard
inline fun ComplexDoubleArray.find(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the first element matching the given predicate, or null if no such element was found.

Link copied to clipboard
inline fun ComplexDoubleArray.findLast(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the last element matching the given predicate, or null if no such element was found.

Link copied to clipboard
fun ComplexDoubleArray.first(): ComplexDouble

Returns first element.

inline fun ComplexDoubleArray.first(predicate: (ComplexDouble) -> Boolean): ComplexDouble

Returns the first element matching the given predicate.

Link copied to clipboard
fun ComplexDoubleArray.firstOrNull(): ComplexDouble?

Returns the first element, or null if the array is empty.

inline fun ComplexDoubleArray.firstOrNull(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the first element matching the given predicate, or null if element was not found.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.flatMap(transform: (ComplexDouble) -> Iterable<R>): List<R>

Returns a single list of all elements yielded from results of transform function being invoked on each element of original array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.flatMapIndexed(transform: (index: Int, ComplexDouble) -> Iterable<R>): List<R>

Returns a single list of all elements yielded from results of transform function being invoked on each element and its index in the original array.

Link copied to clipboard
inline fun <R, C : MutableCollection<in R>> ComplexDoubleArray.flatMapIndexedTo(destination: C, transform: (index: Int, ComplexDouble) -> Iterable<R>): C

Appends all elements yielded from results of transform function being invoked on each element and its index in the original array, to the given destination.

Link copied to clipboard
inline fun <R, C : MutableCollection<in R>> ComplexDoubleArray.flatMapTo(destination: C, transform: (ComplexDouble) -> Iterable<R>): C

Appends all elements yielded from results of transform function being invoked on each element of original array, to the given destination.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.fold(initial: R, operation: (acc: R, ComplexDouble) -> R): R

Accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.foldIndexed(initial: R, operation: (index: Int, acc: R, ComplexDouble) -> R): R

Accumulates value starting with initial value and applying operation from left to right to current accumulator value and each element with its index in the original array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.foldRight(initial: R, operation: (ComplexDouble, acc: R) -> R): R

Accumulates value starting with initial value and applying operation from right to left to each element and current accumulator value.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.foldRightIndexed(initial: R, operation: (index: Int, ComplexDouble, acc: R) -> R): R

Accumulates value starting with initial value and applying operation from right to left to each element with its index in the original array and current accumulator value.

Link copied to clipboard
inline fun ComplexDoubleArray.forEach(action: (ComplexDouble) -> Unit)

Performs the given action on each element.

Link copied to clipboard
inline fun ComplexDoubleArray.forEachIndexed(action: (index: Int, ComplexDouble) -> Unit)

Performs the given action on each element, providing sequential index with the element.

Link copied to clipboard
inline fun ComplexDoubleArray.getOrElse(index: Int, defaultValue: (Int) -> ComplexDouble): ComplexDouble

Returns an element at the given index or the result of calling the defaultValue function if the index is out of bounds of this array.

Link copied to clipboard
fun ComplexDoubleArray.getOrNull(index: Int): ComplexDouble?

Returns an element at the given index or null if the index is out of bounds of this array.

Link copied to clipboard
inline fun <K> ComplexDoubleArray.groupBy(keySelector: (ComplexDouble) -> K): Map<K, List<ComplexDouble>>

Groups elements of the original array by the key returned by the given keySelector function applied to each element and returns a map where each group key is associated with a list of corresponding elements.

inline fun <K, V> ComplexDoubleArray.groupBy(keySelector: (ComplexDouble) -> K, valueTransform: (ComplexDouble) -> V): Map<K, List<V>>

Groups values returned by the valueTransform function applied to each element of the original array by the key returned by the given keySelector function applied to the element and returns a map where each group key is associated with a list of corresponding values.

Link copied to clipboard
inline fun <K, M : MutableMap<in K, MutableList<ComplexDouble>>> ComplexDoubleArray.groupByTo(destination: M, keySelector: (ComplexDouble) -> K): M

Groups elements of the original array by the key returned by the given keySelector function applied to each element and puts to the destination map each group key associated with a list of corresponding elements.

inline fun <K, V, M : MutableMap<in K, MutableList<V>>> ComplexDoubleArray.groupByTo(    destination: M,     keySelector: (ComplexDouble) -> K,     valueTransform: (ComplexDouble) -> V): M

Groups values returned by the valueTransform function applied to each element of the original array by the key returned by the given keySelector function applied to the element and puts to the destination map each group key associated with a list of corresponding values.

Link copied to clipboard
fun ComplexDoubleArray.indexOf(element: ComplexDouble): Int

Returns first index of element, or -1 if the array does not contain element.

Link copied to clipboard
inline fun ComplexDoubleArray.indexOfFirst(predicate: (ComplexDouble) -> Boolean): Int

Returns index of the first element matching the given predicate, or -1 if the array does not contain such element.

Link copied to clipboard
inline fun ComplexDoubleArray.indexOfLast(predicate: (ComplexDouble) -> Boolean): Int

Returns index of the last element matching the given predicate, or -1 if the array does not contain such element.

Link copied to clipboard
val ComplexDoubleArray.indices: IntRange

Returns the range of valid indices for the array.

Link copied to clipboard
infix fun ComplexDoubleArray.intersect(other: Iterable<ComplexDouble>): Set<ComplexDouble>

Returns a set containing all elements that are contained by both this array and the specified collection.

Link copied to clipboard
inline fun ComplexDoubleArray.isEmpty(): Boolean

Returns true if the array is empty.

Link copied to clipboard
inline fun ComplexDoubleArray.isNotEmpty(): Boolean

Returns true if the array is not empty.

Link copied to clipboard
fun <A : Appendable> ComplexDoubleArray.joinTo(    buffer: A,     separator: CharSequence = ", ",     prefix: CharSequence = "",     postfix: CharSequence = "",     limit: Int = -1,     truncated: CharSequence = "...",     transform: (ComplexDouble) -> CharSequence? = null): A

Appends the string from all the elements separated using separator and using the given prefix and postfix if supplied.

Link copied to clipboard
fun ComplexDoubleArray.joinToString(    separator: CharSequence = ", ",     prefix: CharSequence = "",     postfix: CharSequence = "",     limit: Int = -1,     truncated: CharSequence = "...",     transform: (ComplexDouble) -> CharSequence? = null): String

Creates a string from all the elements separated using separator and using the given prefix and postfix if supplied.

Link copied to clipboard
fun ComplexDoubleArray.last(): ComplexDouble

Returns the last element.

inline fun ComplexDoubleArray.last(predicate: (ComplexDouble) -> Boolean): ComplexDouble

Returns the last element matching the given predicate.

Link copied to clipboard
val ComplexDoubleArray.lastIndex: Int

Returns the last valid index for the array.

Link copied to clipboard
fun ComplexDoubleArray.lastIndexOf(element: ComplexDouble): Int

Returns last index of element, or -1 if the array does not contain element.

Link copied to clipboard
fun ComplexDoubleArray.lastOrNull(): ComplexDouble?

Returns the last element, or null if the array is empty.

inline fun ComplexDoubleArray.lastOrNull(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the last element matching the given predicate, or null if no such element was found.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.map(transform: (ComplexDouble) -> R): List<R>

Returns a list containing the results of applying the given transform function to each element in the original array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.mapIndexed(transform: (index: Int, ComplexDouble) -> R): List<R>

Returns a list containing the results of applying the given transform function to each element and its index in the original array.

Link copied to clipboard
inline fun <R, C : MutableCollection<in R>> ComplexDoubleArray.mapIndexedTo(destination: C, transform: (index: Int, ComplexDouble) -> R): C

Applies the given transform function to each element and its index in the original array and appends the results to the given destination.

Link copied to clipboard
inline fun <R, C : MutableCollection<in R>> ComplexDoubleArray.mapTo(destination: C, transform: (ComplexDouble) -> R): C

Applies the given transform function to each element of the original array and appends the results to the given destination.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.maxBy(selector: (ComplexDouble) -> R): ComplexDouble
Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.maxByOrNull(selector: (ComplexDouble) -> R): ComplexDouble?

Returns the first element yielding the largest value of the given function or null if there are no elements.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.maxOf(selector: (ComplexDouble) -> R): R

Returns the largest value among all values produced by selector function applied to each element in the array.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.maxOfOrNull(selector: (ComplexDouble) -> R): R?

Returns the largest value among all values produced by selector function applied to each element in the array or null if there are no elements.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.maxOfWith(comparator: Comparator<in R>, selector: (ComplexDouble) -> R): R

Returns the largest value according to the provided comparator among all values produced by selector function applied to each element in the array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.maxOfWithOrNull(comparator: Comparator<in R>, selector: (ComplexDouble) -> R): R?

Returns the largest value according to the provided comparator among all values produced by selector function applied to each element in the array or null if there are no elements.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.minBy(selector: (ComplexDouble) -> R): ComplexDouble
Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.minByOrNull(selector: (ComplexDouble) -> R): ComplexDouble?

Returns the first element yielding the smallest value of the given function or null if there are no elements.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.minOf(selector: (ComplexDouble) -> R): R

Returns the smallest value among all values produced by selector function applied to each element in the array.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.minOfOrNull(selector: (ComplexDouble) -> R): R?

Returns the smallest value among all values produced by selector function applied to each element in the array or null if there are no elements.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.minOfWith(comparator: Comparator<in R>, selector: (ComplexDouble) -> R): R

Returns the smallest value according to the provided comparator among all values produced by selector function applied to each element in the array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.minOfWithOrNull(comparator: Comparator<in R>, selector: (ComplexDouble) -> R): R?

Returns the smallest value according to the provided comparator among all values produced by selector function applied to each element in the array or null if there are no elements.

Link copied to clipboard
fun ComplexDoubleArray.none(): Boolean

Returns true if the array has no elements.

inline fun ComplexDoubleArray.none(predicate: (ComplexDouble) -> Boolean): Boolean

Returns true if no elements match the given predicate.

Link copied to clipboard
inline fun ComplexDoubleArray.onEach(action: (ComplexDouble) -> Unit): ComplexDoubleArray

Performs the given action on each element and returns the array itself afterwards.

Link copied to clipboard
inline fun ComplexDoubleArray.onEachIndexed(action: (index: Int, ComplexDouble) -> Unit): ComplexDoubleArray

Performs the given action on each element, providing sequential index with the element, and returns the array itself afterwards.

Link copied to clipboard
inline fun ComplexDoubleArray.partition(predicate: (ComplexDouble) -> Boolean): Pair<List<ComplexDouble>, List<ComplexDouble>>

Splits the original array into pair of lists, where first list contains elements for which predicate yielded true, while second list contains elements for which predicate yielded false.

Link copied to clipboard
operator fun ComplexDoubleArray.plus(element: ComplexDouble): ComplexDoubleArray

Returns an array containing all elements of the original array and then the given element.

operator fun ComplexDoubleArray.plus(elements: Collection<ComplexDouble>): ComplexDoubleArray

Returns an array containing all elements of the original array and then all elements of the given elements collection.

operator fun ComplexDoubleArray.plus(elements: ComplexDoubleArray): ComplexDoubleArray

Returns an array containing all elements of the original array and then all elements of the given elements array.

Link copied to clipboard
inline fun ComplexDoubleArray.random(): ComplexDouble

Returns a random element from this array.

fun ComplexDoubleArray.random(random: Random): ComplexDouble

Returns a random element from this array using the specified source of randomness.

Link copied to clipboard
inline fun ComplexDoubleArray.randomOrNull(): ComplexDouble?

Returns a random element from this array, or null if this array is empty.

fun ComplexDoubleArray.randomOrNull(random: Random): ComplexDouble?

Returns a random element from this array using the specified source of randomness, or null if this array is empty.

Link copied to clipboard
inline fun ComplexDoubleArray.reduce(operation: (acc: ComplexDouble, ComplexDouble) -> ComplexDouble): ComplexDouble

Accumulates value starting with the first element and applying operation from left to right to current accumulator value and each element.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceIndexed(operation: (index: Int, acc: ComplexDouble, ComplexDouble) -> ComplexDouble): ComplexDouble

Accumulates value starting with the first element and applying operation from left to right to current accumulator value and each element with its index in the original array.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceIndexedOrNull(operation: (index: Int, acc: ComplexDouble, ComplexDouble) -> ComplexDouble): ComplexDouble?

Accumulates value starting with the first element and applying operation from left to right to current accumulator value and each element with its index in the original array.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceOrNull(operation: (acc: ComplexDouble, ComplexDouble) -> ComplexDouble): ComplexDouble?

Accumulates value starting with the first element and applying operation from left to right to current accumulator value and each element.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceRight(operation: (ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble

Accumulates value starting with the last element and applying operation from right to left to each element and current accumulator value.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceRightIndexed(operation: (index: Int, ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble

Accumulates value starting with the last element and applying operation from right to left to each element with its index in the original array and current accumulator value.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceRightIndexedOrNull(operation: (index: Int, ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble?

Accumulates value starting with the last element and applying operation from right to left to each element with its index in the original array and current accumulator value.

Link copied to clipboard
inline fun ComplexDoubleArray.reduceRightOrNull(operation: (ComplexDouble, acc: ComplexDouble) -> ComplexDouble): ComplexDouble?

Accumulates value starting with the last element and applying operation from right to left to each element and current accumulator value.

Link copied to clipboard
fun ComplexDoubleArray.reverse()

Reverses elements in the array in-place.

fun ComplexDoubleArray.reverse(fromIndex: Int, toIndex: Int)

Reverses elements of the array in the specified range in-place.

Link copied to clipboard
fun ComplexDoubleArray.reversed(): List<ComplexDouble>

Returns a list with elements in reversed order.

Link copied to clipboard
fun ComplexDoubleArray.reversedArray(): ComplexDoubleArray

Returns an array with elements of this array in reversed order.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.runningFold(initial: R, operation: (acc: R, ComplexDouble) -> R): List<R>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element and current accumulator value that starts with initial value.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.runningFoldIndexed(initial: R, operation: (index: Int, acc: R, ComplexDouble) -> R): List<R>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element, its index in the original array and current accumulator value that starts with initial value.

Link copied to clipboard
inline fun ComplexDoubleArray.runningReduce(operation: (acc: ComplexDouble, ComplexDouble) -> ComplexDouble): List<ComplexDouble>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element and current accumulator value that starts with the first element of this array.

Link copied to clipboard
inline fun ComplexDoubleArray.runningReduceIndexed(operation: (index: Int, acc: ComplexDouble, ComplexDouble) -> ComplexDouble): List<ComplexDouble>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element, its index in the original array and current accumulator value that starts with the first element of this array.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.scan(initial: R, operation: (acc: R, ComplexDouble) -> R): List<R>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element and current accumulator value that starts with initial value.

Link copied to clipboard
inline fun <R> ComplexDoubleArray.scanIndexed(initial: R, operation: (index: Int, acc: R, ComplexDouble) -> R): List<R>

Returns a list containing successive accumulation values generated by applying operation from left to right to each element, its index in the original array and current accumulator value that starts with initial value.

Link copied to clipboard
fun ComplexDoubleArray.shuffle()

Randomly shuffles elements in this array in-place.

fun ComplexDoubleArray.shuffle(random: Random)

Randomly shuffles elements in this array in-place using the specified random instance as the source of randomness.

Link copied to clipboard
fun ComplexDoubleArray.single(): ComplexDouble

Returns the single element, or throws an exception if the array is empty or has more than one element.

inline fun ComplexDoubleArray.single(predicate: (ComplexDouble) -> Boolean): ComplexDouble

Returns the single element matching the given predicate, or throws exception if there is no or more than one matching element.

Link copied to clipboard
fun ComplexDoubleArray.singleOrNull(): ComplexDouble?

Returns single element, or null if the array is empty or has more than one element.

inline fun ComplexDoubleArray.singleOrNull(predicate: (ComplexDouble) -> Boolean): ComplexDouble?

Returns the single element matching the given predicate, or null if element was not found or more than one element was found.

Link copied to clipboard
fun ComplexDoubleArray.slice(indices: IntRange): List<ComplexDouble>

Returns a list containing elements at indices in the specified indices range.

fun ComplexDoubleArray.slice(indices: Iterable<Int>): List<ComplexDouble>

Returns a list containing elements at specified indices.

Link copied to clipboard
fun ComplexDoubleArray.sliceArray(indices: Collection<Int>): ComplexDoubleArray

Returns an array containing elements of this array at specified indices.

fun ComplexDoubleArray.sliceArray(indices: IntRange): ComplexDoubleArray

Returns an array containing elements at indices in the specified indices range.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.sortedBy(crossinline selector: (ComplexDouble) -> R?): List<ComplexDouble>

Returns a list of all elements sorted according to natural sort order of the value returned by specified selector function.

Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.sortedByDescending(crossinline selector: (ComplexDouble) -> R?): List<ComplexDouble>

Returns a list of all elements sorted descending according to natural sort order of the value returned by specified selector function.

Link copied to clipboard
fun ComplexDoubleArray.sortedWith(comparator: Comparator<in ComplexDouble>): List<ComplexDouble>

Returns a list of all elements sorted according to the specified comparator.

Link copied to clipboard
infix fun ComplexDoubleArray.subtract(other: Iterable<ComplexDouble>): Set<ComplexDouble>

Returns a set containing all elements that are contained by this array and not contained by the specified collection.

Link copied to clipboard
fun ComplexDoubleArray.sum(): ComplexDouble

Returns the sum of all elements in the array.

Link copied to clipboard
fun ComplexDoubleArray.take(n: Int): List<ComplexDouble>

Returns a list containing first n elements.

Link copied to clipboard
fun ComplexDoubleArray.takeLast(n: Int): List<ComplexDouble>

Returns a list containing last n elements.

Link copied to clipboard
inline fun ComplexDoubleArray.takeLastWhile(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing last elements satisfying the given predicate.

Link copied to clipboard
inline fun ComplexDoubleArray.takeWhile(predicate: (ComplexDouble) -> Boolean): List<ComplexDouble>

Returns a list containing first elements satisfying the given predicate.

Link copied to clipboard
fun <C : MutableCollection<in ComplexDouble>> ComplexDoubleArray.toCollection(destination: C): C

Appends all elements to the given destination collection.

Link copied to clipboard
fun ComplexDoubleArray.toHashSet(): HashSet<ComplexDouble>

Returns a new HashSet of all elements.

Link copied to clipboard
fun ComplexDoubleArray.toList(): List<ComplexDouble>

Returns a List containing all elements.

Link copied to clipboard
fun ComplexDoubleArray.toMutableList(): MutableList<ComplexDouble>

Returns a new MutableList filled with all elements of this array.

Link copied to clipboard
fun ComplexDoubleArray.toMutableSet(): MutableSet<ComplexDouble>

Returns a new MutableSet containing all distinct elements from the given array.

Link copied to clipboard
fun ComplexDoubleArray.toSet(): Set<ComplexDouble>

Returns a Set of all elements.

Link copied to clipboard
fun ComplexDoubleArray.toTypedArray(): Array<ComplexDouble>

Returns a typed object array containing all of the elements of this primitive array.

Link copied to clipboard
infix fun ComplexDoubleArray.union(other: Iterable<ComplexDouble>): Set<ComplexDouble>

Returns a set containing all distinct elements from both collections.

Link copied to clipboard
fun ComplexDoubleArray.withIndex(): Iterable<IndexedValue<ComplexDouble>>

Returns a lazy Iterable that wraps each element of the original array into an IndexedValue containing the index of that element and the element itself.

Link copied to clipboard
infix fun <R> ComplexDoubleArray.zip(other: Array<out R>): List<Pair<ComplexDouble, R>>
infix fun ComplexDoubleArray.zip(other: ComplexDoubleArray): List<Pair<ComplexDouble, ComplexDouble>>

Returns a list of pairs built from the elements of this array and the other array with the same index. The returned list has length of the shortest collection.

inline fun <R, V> ComplexDoubleArray.zip(other: Array<out R>, transform: (a: ComplexDouble, b: R) -> V): List<V>

Returns a list of values built from the elements of this array and the other array with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest collection.

infix fun <R> ComplexDoubleArray.zip(other: Iterable<R>): List<Pair<ComplexDouble, R>>

Returns a list of pairs built from the elements of this collection and other array with the same index. The returned list has length of the shortest collection.

inline fun <R, V> ComplexDoubleArray.zip(other: Iterable<R>, transform: (a: ComplexDouble, b: R) -> V): List<V>

Returns a list of values built from the elements of this array and the other collection with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest collection.

inline fun <V> ComplexDoubleArray.zip(other: ComplexDoubleArray, transform: (a: ComplexDouble, b: ComplexDouble) -> V): List<V>

Returns a list of values built from the elements of this array and the other array with the same index using the provided transform function applied to each pair of elements. The returned list has length of the shortest array.