Package org.jetbrains.kotlinx.multik.ndarray.complex

Types

Link copied to clipboard
interface Complex

Superclass for complex numbers.

Link copied to clipboard
class ComplexDouble(val re: Double, val im: Double) : Complex

Represents a double-precision 128-bit complex number.

Link copied to clipboard
class ComplexDoubleArray(val size: Int = 0)
Link copied to clipboard
abstract class ComplexDoubleIterator : Iterator<ComplexDouble>
Link copied to clipboard
class ComplexFloat(val re: Float, val im: Float) : Complex

Represents a single-precision 64-bit complex number.

Link copied to clipboard
class ComplexFloatArray(val size: Int = 0)
Link copied to clipboard
abstract class ComplexFloatIterator : Iterator<ComplexFloat>

Functions

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

Returns true if all elements match the given predicate.

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

Returns true if array has at least one element.

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

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

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

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

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

Returns a List that wraps the original array.

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

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>
inline fun <K, V> ComplexFloatArray.associate(transform: (ComplexFloat) -> 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>
inline fun <K> ComplexFloatArray.associateBy(keySelector: (ComplexFloat) -> K): Map<K, ComplexFloat>

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>
inline fun <K, V> ComplexFloatArray.associateBy(keySelector: (ComplexFloat) -> K, valueTransform: (ComplexFloat) -> 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
inline fun <K, M : MutableMap<in K, in ComplexFloat>> ComplexFloatArray.associateByTo(destination: M, keySelector: (ComplexFloat) -> 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
inline fun <K, V, M : MutableMap<in K, in V>> ComplexFloatArray.associateByTo(    destination: M,     keySelector: (ComplexFloat) -> K,     valueTransform: (ComplexFloat) -> 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
inline fun <K, V, M : MutableMap<in K, in V>> ComplexFloatArray.associateTo(destination: M, transform: (ComplexFloat) -> 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>
inline fun <V> ComplexFloatArray.associateWith(valueSelector: (ComplexFloat) -> V): Map<ComplexFloat, 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
inline fun <V, M : MutableMap<in ComplexFloat, in V>> ComplexFloatArray.associateWithTo(destination: M, valueSelector: (ComplexFloat) -> 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
fun complexDoubleArrayOf(vararg elements: ComplexDouble): ComplexDoubleArray
Link copied to clipboard
fun complexFloatArrayOf(vararg elements: ComplexFloat): ComplexFloatArray
Link copied to clipboard
inline operator fun ComplexDoubleArray.component1(): ComplexDouble
inline operator fun ComplexFloatArray.component1(): ComplexFloat

Returns 1st element from the array.

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

Returns 2nd element from the array.

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

Returns 3rd element from the array.

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

Returns 4th element from the array.

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

Returns 5th element from the array.

Link copied to clipboard
@JvmName(name = "conjDouble")
fun <D : Dimension> MultiArray<ComplexDouble, D>.conj(): MultiArray<ComplexDouble, D>

Transforms this MultiArray of ComplexDouble to an NDArray of the conjugated value. Dimensions are preserved.

@JvmName(name = "conjFloat")
fun <D : Dimension> MultiArray<ComplexFloat, D>.conj(): MultiArray<ComplexFloat, D>

Transforms this MultiArray of ComplexFloat to an NDArray of the conjugated value. Dimensions are preserved.

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

Returns true if element is found in the array.

Link copied to clipboard
infix fun ComplexDoubleArray?.contentEquals(other: ComplexDoubleArray?): Boolean
infix fun ComplexFloatArray?.contentEquals(other: ComplexFloatArray?): 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
fun ComplexFloatArray?.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
fun ComplexFloatArray.copyInto(    destination: ComplexFloatArray,     destinationOffset: Int = 0,     startIndex: Int = 0,     endIndex: Int = size): ComplexFloatArray

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

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

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

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

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
inline fun ComplexFloatArray.copyOfRange(fromIndex: Int, toIndex: Int): ComplexFloatArray

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
inline fun ComplexFloatArray.count(): Int

Returns the number of elements in this array.

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

Returns the number of elements matching the given predicate.

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

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>
inline fun <K> ComplexFloatArray.distinctBy(selector: (ComplexFloat) -> K): List<ComplexFloat>

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

Link copied to clipboard
operator fun Byte.div(other: ComplexDouble): ComplexDouble
operator fun Byte.div(other: ComplexFloat): ComplexFloat
operator fun Double.div(other: ComplexDouble): ComplexDouble
operator fun Double.div(other: ComplexFloat): ComplexDouble
operator fun Float.div(other: ComplexDouble): ComplexDouble
operator fun Float.div(other: ComplexFloat): ComplexFloat
operator fun Int.div(other: ComplexDouble): ComplexDouble
operator fun Int.div(other: ComplexFloat): ComplexFloat
operator fun Long.div(other: ComplexDouble): ComplexDouble
operator fun Long.div(other: ComplexFloat): ComplexFloat
operator fun Short.div(other: ComplexDouble): ComplexDouble
operator fun Short.div(other: ComplexFloat): ComplexFloat
Link copied to clipboard
fun ComplexDoubleArray.drop(n: Int): List<ComplexDouble>
fun ComplexFloatArray.drop(n: Int): List<ComplexFloat>

Returns a list containing all elements except first n elements.

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

Returns a list containing all elements except last n elements.

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

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>
inline fun ComplexFloatArray.dropWhile(predicate: (ComplexFloat) -> Boolean): List<ComplexFloat>

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

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

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
inline fun ComplexFloatArray.elementAtOrElse(index: Int, defaultValue: (Int) -> ComplexFloat): ComplexFloat

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?
inline fun ComplexFloatArray.elementAtOrNull(index: Int): ComplexFloat?

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)
fun ComplexFloatArray.fill(    element: ComplexFloat,     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>
inline fun ComplexFloatArray.filter(predicate: (ComplexFloat) -> Boolean): List<ComplexFloat>

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>
inline fun ComplexFloatArray.filterIndexed(predicate: (index: Int, ComplexFloat) -> Boolean): List<ComplexFloat>

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
inline fun <C : MutableCollection<in ComplexFloat>> ComplexFloatArray.filterIndexedTo(destination: C, predicate: (index: Int, ComplexFloat) -> 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>
inline fun ComplexFloatArray.filterNot(predicate: (ComplexFloat) -> Boolean): List<ComplexFloat>

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
inline fun <C : MutableCollection<in ComplexFloat>> ComplexFloatArray.filterNotTo(destination: C, predicate: (ComplexFloat) -> 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
inline fun <C : MutableCollection<in ComplexFloat>> ComplexFloatArray.filterTo(destination: C, predicate: (ComplexFloat) -> 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?
inline fun ComplexFloatArray.find(predicate: (ComplexFloat) -> Boolean): ComplexFloat?

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?
inline fun ComplexFloatArray.findLast(predicate: (ComplexFloat) -> Boolean): ComplexFloat?

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

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

Returns first element.

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

Returns the first element matching the given predicate.

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

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

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

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>
inline fun <R> ComplexFloatArray.flatMap(transform: (ComplexFloat) -> 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>
inline fun <R> ComplexFloatArray.flatMapIndexed(transform: (index: Int, ComplexFloat) -> 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
inline fun <R, C : MutableCollection<in R>> ComplexFloatArray.flatMapIndexedTo(destination: C, transform: (index: Int, ComplexFloat) -> 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
inline fun <R, C : MutableCollection<in R>> ComplexFloatArray.flatMapTo(destination: C, transform: (ComplexFloat) -> 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
inline fun <R> ComplexFloatArray.fold(initial: R, operation: (acc: R, ComplexFloat) -> 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
inline fun <R> ComplexFloatArray.foldIndexed(initial: R, operation: (index: Int, acc: R, ComplexFloat) -> 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
inline fun <R> ComplexFloatArray.foldRight(initial: R, operation: (ComplexFloat, 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
inline fun <R> ComplexFloatArray.foldRightIndexed(initial: R, operation: (index: Int, ComplexFloat, 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)
inline fun ComplexFloatArray.forEach(action: (ComplexFloat) -> Unit)

Performs the given action on each element.

Link copied to clipboard
inline fun ComplexDoubleArray.forEachIndexed(action: (index: Int, ComplexDouble) -> Unit)
inline fun ComplexFloatArray.forEachIndexed(action: (index: Int, ComplexFloat) -> 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
inline fun ComplexFloatArray.getOrElse(index: Int, defaultValue: (Int) -> ComplexFloat): ComplexFloat

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?
fun ComplexFloatArray.getOrNull(index: Int): ComplexFloat?

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>>
inline fun <K> ComplexFloatArray.groupBy(keySelector: (ComplexFloat) -> K): Map<K, List<ComplexFloat>>

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>>
inline fun <K, V> ComplexFloatArray.groupBy(keySelector: (ComplexFloat) -> K, valueTransform: (ComplexFloat) -> 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
inline fun <K, M : MutableMap<in K, MutableList<ComplexFloat>>> ComplexFloatArray.groupByTo(destination: M, keySelector: (ComplexFloat) -> 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
inline fun <K, V, M : MutableMap<in K, MutableList<V>>> ComplexFloatArray.groupByTo(    destination: M,     keySelector: (ComplexFloat) -> K,     valueTransform: (ComplexFloat) -> 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
fun ComplexFloatArray.indexOf(element: ComplexFloat): 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
inline fun ComplexFloatArray.indexOfFirst(predicate: (ComplexFloat) -> 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
inline fun ComplexFloatArray.indexOfLast(predicate: (ComplexFloat) -> 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
infix fun ComplexDoubleArray.intersect(other: Iterable<ComplexDouble>): Set<ComplexDouble>
infix fun ComplexFloatArray.intersect(other: Iterable<ComplexFloat>): Set<ComplexFloat>

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
inline fun ComplexFloatArray.isEmpty(): Boolean

Returns true if the array is empty.

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

Returns true if the array is not empty.

Link copied to clipboard
fun iterator(array: ComplexDoubleArray): ComplexDoubleIterator
fun iterator(array: ComplexFloatArray): ComplexFloatIterator
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
fun <A : Appendable> ComplexFloatArray.joinTo(    buffer: A,     separator: CharSequence = ", ",     prefix: CharSequence = "",     postfix: CharSequence = "",     limit: Int = -1,     truncated: CharSequence = "...",     transform: (ComplexFloat) -> 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
fun ComplexFloatArray.joinToString(    separator: CharSequence = ", ",     prefix: CharSequence = "",     postfix: CharSequence = "",     limit: Int = -1,     truncated: CharSequence = "...",     transform: (ComplexFloat) -> 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
fun ComplexFloatArray.last(): ComplexFloat

Returns the last element.

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

Returns the last element matching the given predicate.

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

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

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

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

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

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>
inline fun <R> ComplexFloatArray.map(transform: (ComplexFloat) -> 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>
inline fun <R> ComplexFloatArray.mapIndexed(transform: (index: Int, ComplexFloat) -> 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
inline fun <R, C : MutableCollection<in R>> ComplexFloatArray.mapIndexedTo(destination: C, transform: (index: Int, ComplexFloat) -> 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
inline fun <R, C : MutableCollection<in R>> ComplexFloatArray.mapTo(destination: C, transform: (ComplexFloat) -> 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
inline fun <R : Comparable<R>> ComplexFloatArray.maxBy(selector: (ComplexFloat) -> R): ComplexFloat
Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.maxByOrNull(selector: (ComplexDouble) -> R): ComplexDouble?
inline fun <R : Comparable<R>> ComplexFloatArray.maxByOrNull(selector: (ComplexFloat) -> R): ComplexFloat?

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
inline fun <R : Comparable<R>> ComplexFloatArray.maxOf(selector: (ComplexFloat) -> 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?
inline fun <R : Comparable<R>> ComplexFloatArray.maxOfOrNull(selector: (ComplexFloat) -> 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
inline fun <R> ComplexFloatArray.maxOfWith(comparator: Comparator<in R>, selector: (ComplexFloat) -> 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?
inline fun <R> ComplexFloatArray.maxOfWithOrNull(comparator: Comparator<in R>, selector: (ComplexFloat) -> 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
inline fun <R : Comparable<R>> ComplexFloatArray.minBy(selector: (ComplexFloat) -> R): ComplexFloat
Link copied to clipboard
inline fun <R : Comparable<R>> ComplexDoubleArray.minByOrNull(selector: (ComplexDouble) -> R): ComplexDouble?
inline fun <R : Comparable<R>> ComplexFloatArray.minByOrNull(selector: (ComplexFloat) -> R): ComplexFloat?

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
inline fun <R : Comparable<R>> ComplexFloatArray.minOf(selector: (ComplexFloat) -> 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?
inline fun <R : Comparable<R>> ComplexFloatArray.minOfOrNull(selector: (ComplexFloat) -> 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
inline fun <R> ComplexFloatArray.minOfWith(comparator: Comparator<in R>, selector: (ComplexFloat) -> 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?
inline fun <R> ComplexFloatArray.minOfWithOrNull(comparator: Comparator<in R>, selector: (ComplexFloat) -> 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
operator fun Byte.minus(other: ComplexDouble): ComplexDouble
operator fun Byte.minus(other: ComplexFloat): ComplexFloat
operator fun Double.minus(other: ComplexDouble): ComplexDouble
operator fun Double.minus(other: ComplexFloat): ComplexDouble
operator fun Float.minus(other: ComplexDouble): ComplexDouble
operator fun Float.minus(other: ComplexFloat): ComplexFloat
operator fun Int.minus(other: ComplexDouble): ComplexDouble
operator fun Int.minus(other: ComplexFloat): ComplexFloat
operator fun Long.minus(other: ComplexDouble): ComplexDouble
operator fun Long.minus(other: ComplexFloat): ComplexFloat
operator fun Short.minus(other: ComplexDouble): ComplexDouble
operator fun Short.minus(other: ComplexFloat): ComplexFloat
Link copied to clipboard
fun ComplexDoubleArray.none(): Boolean
fun ComplexFloatArray.none(): Boolean

Returns true if the array has no elements.

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

Returns true if no elements match the given predicate.

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

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
inline fun ComplexFloatArray.onEachIndexed(action: (index: Int, ComplexFloat) -> Unit): ComplexFloatArray

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>>
inline fun ComplexFloatArray.partition(predicate: (ComplexFloat) -> Boolean): Pair<List<ComplexFloat>, List<ComplexFloat>>

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 Byte.plus(other: ComplexDouble): ComplexDouble
operator fun Byte.plus(other: ComplexFloat): ComplexFloat
operator fun Double.plus(other: ComplexDouble): ComplexDouble
operator fun Double.plus(other: ComplexFloat): ComplexDouble
operator fun Float.plus(other: ComplexDouble): ComplexDouble
operator fun Float.plus(other: ComplexFloat): ComplexFloat
operator fun Int.plus(other: ComplexDouble): ComplexDouble
operator fun Int.plus(other: ComplexFloat): ComplexFloat
operator fun Long.plus(other: ComplexDouble): ComplexDouble
operator fun Long.plus(other: ComplexFloat): ComplexFloat
operator fun Short.plus(other: ComplexDouble): ComplexDouble
operator fun Short.plus(other: ComplexFloat): ComplexFloat

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

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

operator fun ComplexDoubleArray.plus(element: ComplexDouble): ComplexDoubleArray
operator fun ComplexFloatArray.plus(element: ComplexFloat): ComplexFloatArray

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

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

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
inline fun ComplexFloatArray.random(): ComplexFloat

Returns a random element from this array.

fun ComplexDoubleArray.random(random: Random): ComplexDouble
fun ComplexFloatArray.random(random: Random): ComplexFloat

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

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

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

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

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
inline fun ComplexFloatArray.reduce(operation: (acc: ComplexFloat, ComplexFloat) -> ComplexFloat): ComplexFloat

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
inline fun ComplexFloatArray.reduceIndexed(operation: (index: Int, acc: ComplexFloat, ComplexFloat) -> ComplexFloat): ComplexFloat

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?
inline fun ComplexFloatArray.reduceIndexedOrNull(operation: (index: Int, acc: ComplexFloat, ComplexFloat) -> ComplexFloat): ComplexFloat?

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?
inline fun ComplexFloatArray.reduceOrNull(operation: (acc: ComplexFloat, ComplexFloat) -> ComplexFloat): ComplexFloat?

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
inline fun ComplexFloatArray.reduceRight(operation: (ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat

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
inline fun ComplexFloatArray.reduceRightIndexed(operation: (index: Int, ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat

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?
inline fun ComplexFloatArray.reduceRightIndexedOrNull(operation: (index: Int, ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat?

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?
inline fun ComplexFloatArray.reduceRightOrNull(operation: (ComplexFloat, acc: ComplexFloat) -> ComplexFloat): ComplexFloat?

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()
fun ComplexFloatArray.reverse()

Reverses elements in the array in-place.

fun ComplexDoubleArray.reverse(fromIndex: Int, toIndex: Int)
fun ComplexFloatArray.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>
fun ComplexFloatArray.reversed(): List<ComplexFloat>

Returns a list with elements in reversed order.

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

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>
inline fun <R> ComplexFloatArray.runningFold(initial: R, operation: (acc: R, ComplexFloat) -> 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>
inline fun <R> ComplexFloatArray.runningFoldIndexed(initial: R, operation: (index: Int, acc: R, ComplexFloat) -> 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>
inline fun ComplexFloatArray.runningReduce(operation: (acc: ComplexFloat, ComplexFloat) -> ComplexFloat): List<ComplexFloat>

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>
inline fun ComplexFloatArray.runningReduceIndexed(operation: (index: Int, acc: ComplexFloat, ComplexFloat) -> ComplexFloat): List<ComplexFloat>

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>
inline fun <R> ComplexFloatArray.scan(initial: R, operation: (acc: R, ComplexFloat) -> 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>
inline fun <R> ComplexFloatArray.scanIndexed(initial: R, operation: (index: Int, acc: R, ComplexFloat) -> 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()
fun ComplexFloatArray.shuffle()

Randomly shuffles elements in this array in-place.

fun ComplexDoubleArray.shuffle(random: Random)
fun ComplexFloatArray.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
fun ComplexFloatArray.single(): ComplexFloat

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
inline fun ComplexFloatArray.single(predicate: (ComplexFloat) -> Boolean): ComplexFloat

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?
fun ComplexFloatArray.singleOrNull(): ComplexFloat?

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

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

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: Iterable<Int>): List<ComplexDouble>
fun ComplexFloatArray.slice(indices: Iterable<Int>): List<ComplexFloat>

Returns a list containing elements at specified indices.

fun ComplexDoubleArray.slice(indices: IntRange): List<ComplexDouble>
fun ComplexFloatArray.slice(indices: IntRange): List<ComplexFloat>

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

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

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

fun ComplexDoubleArray.sliceArray(indices: IntRange): ComplexDoubleArray
fun ComplexFloatArray.sliceArray(indices: IntRange): ComplexFloatArray

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>
inline fun <R : Comparable<R>> ComplexFloatArray.sortedBy(crossinline selector: (ComplexFloat) -> R?): List<ComplexFloat>

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>
inline fun <R : Comparable<R>> ComplexFloatArray.sortedByDescending(crossinline selector: (ComplexFloat) -> R?): List<ComplexFloat>

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>
fun ComplexFloatArray.sortedWith(comparator: Comparator<in ComplexFloat>): List<ComplexFloat>

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>
infix fun ComplexFloatArray.subtract(other: Iterable<ComplexFloat>): Set<ComplexFloat>

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
fun ComplexFloatArray.sum(): ComplexFloat

Returns the sum of all elements in the array.

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

Returns a list containing first n elements.

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

Returns a list containing last n elements.

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

Returns a list containing last elements satisfying the given predicate.

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

Returns a list containing first elements satisfying the given predicate.

Link copied to clipboard
operator fun Byte.times(other: ComplexDouble): ComplexDouble
operator fun Byte.times(other: ComplexFloat): ComplexFloat
operator fun Double.times(other: ComplexDouble): ComplexDouble
operator fun Double.times(other: ComplexFloat): ComplexDouble
operator fun Float.times(other: ComplexDouble): ComplexDouble
operator fun Float.times(other: ComplexFloat): ComplexFloat
operator fun Int.times(other: ComplexDouble): ComplexDouble
operator fun Int.times(other: ComplexFloat): ComplexFloat
operator fun Long.times(other: ComplexDouble): ComplexDouble
operator fun Long.times(other: ComplexFloat): ComplexFloat
operator fun Short.times(other: ComplexDouble): ComplexDouble
operator fun Short.times(other: ComplexFloat): ComplexFloat
Link copied to clipboard
fun <C : MutableCollection<in ComplexDouble>> ComplexDoubleArray.toCollection(destination: C): C
fun <C : MutableCollection<in ComplexFloat>> ComplexFloatArray.toCollection(destination: C): C

Appends all elements to the given destination collection.

Link copied to clipboard
fun Number.toComplexDouble(): ComplexDouble
Link copied to clipboard
fun Array<out ComplexDouble>.toComplexDoubleArray(): ComplexDoubleArray
fun DoubleArray.toComplexDoubleArray(): ComplexDoubleArray

Returns an array of ComplexDouble containing all of the elements of this generic array.

Link copied to clipboard
fun Number.toComplexFloat(): ComplexFloat
Link copied to clipboard
fun Array<out ComplexFloat>.toComplexFloatArray(): ComplexFloatArray
fun FloatArray.toComplexFloatArray(): ComplexFloatArray

Returns an array of ComplexFloat containing all of the elements of this generic array.

Returns an array of ComplexFloat containing all of the elements of this collection.

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

Returns a new HashSet of all elements.

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

Returns a List containing all elements.

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

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

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

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

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

Returns a Set of all elements.

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

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>
infix fun ComplexFloatArray.union(other: Iterable<ComplexFloat>): Set<ComplexFloat>

Returns a set containing all distinct elements from both collections.

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

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>>
infix fun <R> ComplexFloatArray.zip(other: Array<out R>): List<Pair<ComplexFloat, R>>
infix fun ComplexFloatArray.zip(other: ComplexFloatArray): List<Pair<ComplexFloat, ComplexFloat>>

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.

infix fun <R> ComplexDoubleArray.zip(other: Iterable<R>): List<Pair<ComplexDouble, R>>
infix fun <R> ComplexFloatArray.zip(other: Iterable<R>): List<Pair<ComplexFloat, 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: Array<out R>, transform: (a: ComplexDouble, b: R) -> V): List<V>
inline fun <R, V> ComplexFloatArray.zip(other: Array<out R>, transform: (a: ComplexFloat, 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.

inline fun <R, V> ComplexDoubleArray.zip(other: Iterable<R>, transform: (a: ComplexDouble, b: R) -> V): List<V>
inline fun <R, V> ComplexFloatArray.zip(other: Iterable<R>, transform: (a: ComplexFloat, 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>
inline fun <V> ComplexFloatArray.zip(other: ComplexFloatArray, transform: (a: ComplexFloat, b: ComplexFloat) -> 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.

Properties

Link copied to clipboard
val Float.i: ComplexFloat
val Double.i: ComplexDouble
Link copied to clipboard
@get:JvmName(name = "imFloat")
val <D : Dimension> MultiArray<ComplexFloat, D>.im: NDArray<Float, D>

Transforms this NDArray of ComplexFloat to an NDArray of the imaginary part of complex numbers. Dimensions are preserved.

@get:JvmName(name = "imDouble")
val <D : Dimension> MultiArray<ComplexDouble, D>.im: NDArray<Double, D>

Transforms this NDArray of ComplexDouble to an NDArray of the imaginary part of complex numbers. Dimensions are preserved.

Link copied to clipboard
val ComplexFloatArray.indices: IntRange

Returns the range of valid indices for the array.

val ComplexDoubleArray.indices: IntRange

Returns the range of valid indices for the array.

Link copied to clipboard
val ComplexFloatArray.lastIndex: Int

Returns the last valid index for the array.

val ComplexDoubleArray.lastIndex: Int

Returns the last valid index for the array.

Link copied to clipboard
@get:JvmName(name = "reFloat")
val <D : Dimension> MultiArray<ComplexFloat, D>.re: NDArray<Float, D>

Transforms this NDArray of ComplexFloat to an NDArray of the real part of complex numbers. Dimensions are preserved.

@get:JvmName(name = "reDouble")
val <D : Dimension> MultiArray<ComplexDouble, D>.re: NDArray<Double, D>

Transforms this NDArray of ComplexDouble to an NDArray of the real part of complex numbers. Dimensions are preserved.