private fun ConstraintSystemCompletionContext . tryToCompleteWithPCLA ( completionMode : ConstraintSystemCompletionMode , postponedArguments : List < PostponedResolvedAtom > , analyzer : PostponedAtomAnalyzer , ) : Boolean

{ <EOL> if ( ! completionMode . allLambdasShouldBeAnalyzed ) return false <EOL> val lambdaArguments = postponedArguments . filterIsInstance < ResolvedLambdaAtom > ( ) . takeIf { it . isNotEmpty ( ) } ? : return false <EOL> var anyAnalyzed = false <EOL> for ( argument in lambdaArguments ) { <EOL> val notFixedInputTypeVariables = argument . inputTypes . flatMap { it . extractTypeVariables ( ) } . filter { it !in fixedTypeVariables } <EOL> if ( notFixedInputTypeVariables . isEmpty ( ) ) continue <EOL> analyzer . analyze ( argument , withPCLASession = true ) <EOL> anyAnalyzed = true <EOL> } <EOL> return anyAnalyzed <EOL> }

/**
 * General documentation for builder inference algorithm is located at `/docs/fir/builder_inference.md`
 *
 * This function checks if any of the postponed arguments are suitable for builder inference, and performs it for all eligible lambda arguments
 * @return true if we got new proper constraints after builder inference
 */


internal open fun shouldKeepTypeVariableBasedType ( marker : TypeVariableTypeConstructorMarker , isK2 : Boolean ) : Boolean

= false

/**
 * This function determines the approximator behavior if a type variable based type is encountered.
 *
 * @param marker type variable encountered
 * @param isK2 true for K2 compiler, false for K1 compiler
 * @return true if the type variable based type should be kept, false if it should be approximated
 */


{ <EOL> pointer = null <EOL> }

/**
 * Clears reference to an object.
 */


@ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> public fun get ( ) : T ?

= pointer ? . get ( ) as T ?

/**
 * Returns either reference to an object or null, if it was collected.
 */


private fun transformToNativeIr ( module : TestModule , inputArtifact : ClassicFrontendOutputArtifact ) : IrBackendInput

{ <EOL> val ( psiFiles , analysisResult , project , _ ) = inputArtifact <EOL> val configuration = testServices . compilerConfigurationProvider . getCompilerConfiguration ( module ) <EOL> val sourceFiles : List < KtFile > = psiFiles . values . toList ( ) <EOL> val translator = Psi2IrTranslator ( configuration . languageVersionSettings , Psi2IrConfiguration ( ignoreErrors = CodegenTestDirectives . IGNORE_ERRORS in module . directives , configuration . partialLinkageConfig . isEnabled ) , configuration . irMessageLogger :: checkNoUnboundSymbols ) <EOL> val manglerDesc = KonanManglerDesc <EOL> val konanIdSignaturerClass = kotlinNativeClass ( "<STR_LIT>" ) <EOL> val konanIdSignaturerConstructor = konanIdSignaturerClass . constructors . single ( ) <EOL> val konanIdSignaturerClassInstance = konanIdSignaturerConstructor . call ( manglerDesc ) as IdSignatureComposer <EOL> val symbolTable = SymbolTable ( konanIdSignaturerClassInstance , IrFactoryImpl ) <EOL> val generatorContext = translator . createGeneratorContext ( analysisResult . moduleDescriptor , analysisResult . bindingContext , symbolTable ) <EOL> val konanStubGeneratorExtensionsClass = kotlinNativeClass ( "<STR_LIT>" ) <EOL> val stubGenerator = DeclarationStubGeneratorImpl ( analysisResult . moduleDescriptor , symbolTable , generatorContext . irBuiltIns , DescriptorByIdSignatureFinderImpl ( analysisResult . moduleDescriptor , manglerDesc ) , konanStubGeneratorExtensionsClass . objectInstance as StubGeneratorExtensions ) . apply { <EOL> unboundSymbolGeneration = true <EOL> } <EOL> val irDeserializer = object : IrDeserializer { <EOL> override fun getDeclaration ( symbol : IrSymbol ) = stubGenerator . getDeclaration ( symbol ) <EOL> override fun resolveBySignatureInModule ( signature : IdSignature , kind : IrDeserializer . TopLevelSymbolKind , moduleName : Name ) : Nothing = shouldNotBeCalled ( ) <EOL> override fun postProcess ( inOrAfterLinkageStep : Boolean ) = Unit <EOL> } <EOL> val pluginExtensions = IrGenerationExtension . getInstances ( project ) <EOL> val moduleFragment = translator . generateModuleFragment ( generatorContext , sourceFiles , irProviders = listOf ( irDeserializer ) , linkerExtensions = pluginExtensions , ) <EOL> val pluginContext = IrPluginContextImpl ( generatorContext . moduleDescriptor , generatorContext . bindingContext , generatorContext . languageVersionSettings , generatorContext . symbolTable , generatorContext . typeTranslator , generatorContext . irBuiltIns , linker = irDeserializer , diagnosticReporter = configuration . irMessageLogger ) <EOL> return IrBackendInput . NativeBackendInput ( moduleFragment , pluginContext , diagnosticReporter = DiagnosticReporterFactory . createReporter ( ) , descriptorMangler = ( pluginContext . symbolTable as SymbolTable ) . signaturer ! ! . mangler , irMangler = KonanManglerIr , firMangler = null , metadataSerializer = null ) <EOL> }

/**
 * Mostly mimics [org.jetbrains.kotlin.backend.konan.psiToIr], since direct call is impossible due to:
 * - prohibited import of module `:kotlin-native:backend.native` here to `:native:native.tests`
 * - invocation via reflection is complicated due to moving [com.intellij.openapi.project.Project] to another subpackage during compiler
 * JAR embedding.
 *
 * It's unlikely that [org.jetbrains.kotlin.backend.konan.psiToIr] would be ever significantly changed before reaching its end-of-life,
 * so it's plausible to have a reduced copy here in the test pipeline.
 */


private fun getSinceKotlinVersionByOverridden ( descriptor : CallableMemberDescriptor ) : SinceKotlinValue ?

{ <EOL> return DescriptorUtils . getAllOverriddenDeclarations ( descriptor ) . map { it . getOwnSinceKotlinVersion ( ) ? : return null } <EOL> . minByOrNull { it . apiVersion } <EOL> }

/**
 * @return null if there are no overridden members or if there's at least one declaration in the hierarchy not annotated with [SinceKotlin],
 * or the minimal value of the version from all declarations annotated with [SinceKotlin] otherwise.
 */


private fun DeclarationDescriptor . getOwnSinceKotlinVersion ( ) : SinceKotlinValue ?

{ <EOL> var result : SinceKotlinValue ? = null <EOL> fun DeclarationDescriptor . consider ( ) { <EOL> val apiVersion = ( annotations . findAnnotation ( SINCE_KOTLIN_FQ_NAME ) ? . allValueArguments ? . values ? . singleOrNull ( ) ? . value as? String ) <EOL> ? . let ( ApiVersion . Companion :: parse ) <EOL> if ( apiVersion != null ) { <EOL> if ( result == null || apiVersion > result ! ! . apiVersion ) { <EOL> result = SinceKotlinValue ( apiVersion , loadWasExperimentalMarkerClasses ( ) ) <EOL> } <EOL> } <EOL> } <EOL> this . consider ( ) <EOL> ( this as? ConstructorDescriptor ) ? . containingDeclaration ? . consider ( ) <EOL> ( this as? PropertyAccessorDescriptor ) ? . correspondingProperty ? . consider ( ) <EOL> val typeAlias = this as? TypeAliasDescriptor <EOL> ? : ( this as? TypeAliasConstructorDescriptor ) ? . typeAliasDescriptor <EOL> ? : ( this as? FakeCallableDescriptorForTypeAliasObject ) ? . typeAliasDescriptor <EOL> typeAlias ? . consider ( ) <EOL> typeAlias ? . classDescriptor ? . consider ( ) <EOL> ( this as? TypeAliasConstructorDescriptor ) ? . underlyingConstructorDescriptor ? . consider ( ) <EOL> ( this as? FakeCallableDescriptorForTypeAliasObject ) ? . getReferencedObject ( ) ? . consider ( ) <EOL> return result <EOL> }

/**
 * @return the maximal value of API version required by the declaration or any of its "associated" declarations (class for constructor,
 * property for accessor, underlying class for type alias) along with experimental marker FQ names mentioned in the @WasExperimental
 */


public operator fun get ( index : Int ) : UShort

= storage [ index ] . toUShort ( )

/**
 * Returns the array element at the given [index]. This method can be called using the index operator.
 *
 * If the [index] is out of bounds of this array, throws an [IndexOutOfBoundsException] except in Kotlin/JS
 * where the behavior is unspecified.
 */


public operator fun set ( index : Int , value : UShort )

{ <EOL> storage [ index ] = value . toShort ( ) <EOL> }

/**
 * Sets the element at the given [index] to the given [value]. This method can be called using the index operator.
 *
 * If the [index] is out of bounds of this array, throws an [IndexOutOfBoundsException] except in Kotlin/JS
 * where the behavior is unspecified.
 */


public override operator fun iterator ( ) : kotlin . collections . Iterator < UShort >

= Iterator ( storage )

/** Creates an iterator over the elements of the array. */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UShortArray ( size : Int , init : ( Int ) -> UShort ) : UShortArray

{ <EOL> return UShortArray ( ShortArray ( size ) { index -> init ( index ) . toShort ( ) } ) <EOL> }

/**
 * Creates a new array of the specified [size], where each element is calculated by calling the specified
 * [init] function.
 *
 * The function [init] is called for each array element sequentially starting from the first one.
 * It should return the value for an array element given its index.
 */


public operator fun IntArray . rangeTo ( other : IntArray ) : MultiIndexProgression

{ <EOL> return MultiIndexProgression ( this , other ) <EOL> }

/**
 * Returns a multidimensional index based on given arrays.
 */


public infix fun MultiIndexProgression . step ( step : Int ) : MultiIndexProgression

{ <EOL> return MultiIndexProgression ( first , last , step ) <EOL> }

/**
 * Returns a multidimensional index with a given [step].
 */


public infix fun IntArray . downTo ( to : IntArray ) : MultiIndexProgression

{ <EOL> return MultiIndexProgression ( this , to , - <NUM_LIT:1> ) <EOL> }

/**
 * Returns multidimensional index from highest to lowest in the step of -1.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public actual inline fun UIntArray . elementAt ( index : Int ) : UInt

{ <EOL> return get ( index ) <EOL> }

/**
 * Returns an element at the given [index] or throws an [IndexOutOfBoundsException] if the [index] is out of bounds of this array.
 *
 * @sample samples.collections.Collections.Elements.elementAt
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public actual inline fun ULongArray . elementAt ( index : Int ) : ULong

{ <EOL> return get ( index ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public actual inline fun UByteArray . elementAt ( index : Int ) : UByte

{ <EOL> return get ( index ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public actual inline fun UShortArray . elementAt ( index : Int ) : UShort

{ <EOL> return get ( index ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public actual fun UIntArray . asList ( ) : List < UInt >

{ <EOL> return object : AbstractList < UInt > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : UInt ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : UInt = this@asList [ index ] <EOL> override fun indexOf ( element : UInt ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : UInt ) : Int = this@asList . lastIndexOf ( element ) <EOL> } <EOL> }

/**
 * Returns a [List] that wraps the original array.
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public actual fun ULongArray . asList ( ) : List < ULong >

{ <EOL> return object : AbstractList < ULong > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : ULong ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : ULong = this@asList [ index ] <EOL> override fun indexOf ( element : ULong ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : ULong ) : Int = this@asList . lastIndexOf ( element ) <EOL> } <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public actual fun UByteArray . asList ( ) : List < UByte >

{ <EOL> return object : AbstractList < UByte > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : UByte ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : UByte = this@asList [ index ] <EOL> override fun indexOf ( element : UByte ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : UByte ) : Int = this@asList . lastIndexOf ( element ) <EOL> } <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public actual fun UShortArray . asList ( ) : List < UShort >

{ <EOL> return object : AbstractList < UShort > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : UShort ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : UShort = this@asList [ index ] <EOL> override fun indexOf ( element : UShort ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : UShort ) : Int = this@asList . lastIndexOf ( element ) <EOL> } <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public fun UIntArray . binarySearch ( element : UInt , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Int

{ <EOL> AbstractList . checkRangeIndexes ( fromIndex , toIndex , size ) <EOL> val signedElement = element . toInt ( ) <EOL> var low = fromIndex <EOL> var high = toIndex - <NUM_LIT:1> <EOL> while ( low <= high ) { <EOL> val mid = ( low + high ) . ushr ( <NUM_LIT:1> ) <EOL> val midVal = storage [ mid ] <EOL> val cmp = uintCompare ( midVal , signedElement ) <EOL> if ( cmp < <NUM_LIT:0> ) <EOL> low = mid + <NUM_LIT:1> <EOL> else if ( cmp > <NUM_LIT:0> ) <EOL> high = mid - <NUM_LIT:1> <EOL> else <EOL> return mid <EOL> } <EOL> return - ( low + <NUM_LIT:1> ) <EOL> }

/**
 * Searches the array or the range of the array for the provided [element] using the binary search algorithm.
 * The array is expected to be sorted, otherwise the result is undefined.
 *
 * If the array contains multiple elements equal to the specified [element], there is no guarantee which one will be found.
 *
 * @param element the to search for.
 * @param fromIndex the start of the range (inclusive) to search in, 0 by default.
 * @param toIndex the end of the range (exclusive) to search in, size of this array by default.
 *
 * @return the index of the element, if it is contained in the array within the specified range;
 * otherwise, the inverted insertion point `(-insertion point - 1)`.
 * The insertion point is defined as the index at which the element should be inserted,
 * so that the array (or the specified subrange of array) still remains sorted.
 *
 * @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
 * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
 */


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public fun ULongArray . binarySearch ( element : ULong , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Int

{ <EOL> AbstractList . checkRangeIndexes ( fromIndex , toIndex , size ) <EOL> val signedElement = element . toLong ( ) <EOL> var low = fromIndex <EOL> var high = toIndex - <NUM_LIT:1> <EOL> while ( low <= high ) { <EOL> val mid = ( low + high ) . ushr ( <NUM_LIT:1> ) <EOL> val midVal = storage [ mid ] <EOL> val cmp = ulongCompare ( midVal , signedElement ) <EOL> if ( cmp < <NUM_LIT:0> ) <EOL> low = mid + <NUM_LIT:1> <EOL> else if ( cmp > <NUM_LIT:0> ) <EOL> high = mid - <NUM_LIT:1> <EOL> else <EOL> return mid <EOL> } <EOL> return - ( low + <NUM_LIT:1> ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public fun UByteArray . binarySearch ( element : UByte , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Int

{ <EOL> AbstractList . checkRangeIndexes ( fromIndex , toIndex , size ) <EOL> val signedElement = element . toInt ( ) <EOL> var low = fromIndex <EOL> var high = toIndex - <NUM_LIT:1> <EOL> while ( low <= high ) { <EOL> val mid = ( low + high ) . ushr ( <NUM_LIT:1> ) <EOL> val midVal = storage [ mid ] <EOL> val cmp = uintCompare ( midVal . toInt ( ) , signedElement ) <EOL> if ( cmp < <NUM_LIT:0> ) <EOL> low = mid + <NUM_LIT:1> <EOL> else if ( cmp > <NUM_LIT:0> ) <EOL> high = mid - <NUM_LIT:1> <EOL> else <EOL> return mid <EOL> } <EOL> return - ( low + <NUM_LIT:1> ) <EOL> }


@ SinceKotlin ( "<STR_LIT:1.3>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> public fun UShortArray . binarySearch ( element : UShort , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Int


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UIntArray . sumOf ( selector : ( UInt ) -> java . math . BigDecimal ) : java . math . BigDecimal

{ <EOL> var sum : java . math . BigDecimal = <NUM_LIT:0> . toBigDecimal ( ) <EOL> for ( element in this ) { <EOL> sum += selector ( element ) <EOL> } <EOL> return sum <EOL> }

/**
 * Returns the sum of all values produced by [selector] function applied to each element in the array.
 */


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun ULongArray . sumOf ( selector : ( ULong ) -> java . math . BigDecimal ) : java . math . BigDecimal


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UByteArray . sumOf ( selector : ( UByte ) -> java . math . BigDecimal ) : java . math . BigDecimal


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UShortArray . sumOf ( selector : ( UShort ) -> java . math . BigDecimal ) : java . math . BigDecimal


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UIntArray . sumOf ( selector : ( UInt ) -> java . math . BigInteger ) : java . math . BigInteger

{ <EOL> var sum : java . math . BigInteger = <NUM_LIT:0> . toBigInteger ( ) <EOL> for ( element in this ) { <EOL> sum += selector ( element ) <EOL> } <EOL> return sum <EOL> }


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun ULongArray . sumOf ( selector : ( ULong ) -> java . math . BigInteger ) : java . math . BigInteger


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UByteArray . sumOf ( selector : ( UByte ) -> java . math . BigInteger ) : java . math . BigInteger


@ SinceKotlin ( "<STR_LIT:1.4>" ) <EOL> @ OptIn ( kotlin . experimental . ExperimentalTypeInference :: class ) <EOL> @ OverloadResolutionByLambdaReturnType <EOL> @ Suppress ( "<STR_LIT:INAPPLICABLE_JVM_NAME>" ) <EOL> @ kotlin . jvm . JvmName ( "<STR_LIT>" ) <EOL> @ ExperimentalUnsignedTypes <EOL> @ kotlin . internal . InlineOnly <EOL> public inline fun UShortArray . sumOf ( selector : ( UShort ) -> java . math . BigInteger ) : java . math . BigInteger


fun formatter ( ) : FormatterStructure < Target >

/**
 * The formatter operation that formats the field.
 */


fun parser ( ) : ParserStructure < Target >

/**
 * The parser structure that parses the field.
 */


private fun testRequestSizeWithBuffer ( capacity : Int , onBufferOverflow : BufferOverflow , expectedRequestSize : Long )

= runTest { <EOL> val m = <NUM_LIT> <EOL> val publisher = Publisher < Int > { s -> <EOL> s . onSubscribe ( object : Subscription { <EOL> var lastSent = <NUM_LIT:0> <EOL> var remaining = <NUM_LIT:0L> <EOL> override fun request ( n : Long ) { <EOL> assertEquals ( expectedRequestSize , n ) <EOL> remaining += n <EOL> check ( remaining >= <NUM_LIT:0> ) <EOL> while ( lastSent < m && remaining > <NUM_LIT:0> ) { <EOL> s . onNext ( ++ lastSent ) <EOL> remaining -- <EOL> } <EOL> if ( lastSent == m ) s . onComplete ( ) <EOL> } <EOL> override fun cancel ( ) { } <EOL> } ) <EOL> } <EOL> val flow = publisher <EOL> . asFlow ( ) <EOL> . buffer ( capacity , onBufferOverflow ) <EOL> val list = flow . toList ( ) <EOL> val runSize = if ( capacity == Channel . BUFFERED ) <NUM_LIT:1> else capacity <EOL> val expected = when ( onBufferOverflow ) { <EOL> BufferOverflow . SUSPEND -> ( <NUM_LIT:1> .. m ) . toList ( ) <EOL> BufferOverflow . DROP_OLDEST -> ( m - runSize + <NUM_LIT:1> .. m ) . toList ( ) <EOL> BufferOverflow . DROP_LATEST -> ( <NUM_LIT:1> .. runSize ) . toList ( ) <EOL> } <EOL> assertEquals ( expected , list ) <EOL> }

/**
 * Tests `publisher.asFlow.buffer(...)` chain, verifying expected requests size and that only expected
 * values are delivered.
 */


fun markFilesForCurrentRound ( target : ModuleBuildTarget , files : Collection < File > )

{ <EOL> require ( target in chunk . targets ) <EOL> val targetDirtyFiles = dirtyFilesHolder . byTarget . getValue ( target ) <EOL> val dirtyFileToRoot = HashMap < File , JavaSourceRootDescriptor > ( ) <EOL> files . forEach { file -> <EOL> val root = compileContext . projectDescriptor . buildRootIndex <EOL> . findAllParentDescriptors < BuildRootDescriptor > ( file , compileContext ) <EOL> . single { sourceRoot -> sourceRoot . target == target } <EOL> targetDirtyFiles . _markDirty ( file , root as JavaSourceRootDescriptor ) <EOL> dirtyFileToRoot [ file ] = root <EOL> } <EOL> markFilesImpl ( files , currentRound = true ) { it . exists ( ) } <EOL> cleanOutputsForNewDirtyFilesInCurrentRound ( target , dirtyFileToRoot ) <EOL> }

/**
 * Marks given [files] as dirty for current round and given [target] of [chunk].
 */


public operator fun iterator ( ) : ComplexFloatIterator

= iterator ( this )


public operator fun iterator ( ) : ComplexDoubleIterator

= iterator ( this )


public fun < T , D : Dimension > MultiArray < T , D > . append ( vararg value : T ) : D1Array < T >

{ <EOL> val newSize = this . size + value . size <EOL> val data = this . copyFromTwoArrays ( value . iterator ( ) , newSize ) <EOL> return D1Array ( data , shape = intArrayOf ( newSize ) , dim = D1 ) <EOL> }


public infix fun < T , D : Dimension , ID : Dimension > MultiArray < T , D > . append ( arr : MultiArray < T , ID > ) : D1Array < T >

{ <EOL> val newSize = this . size + arr . size <EOL> val data = this . copyFromTwoArrays ( arr . iterator ( ) , newSize ) <EOL> return D1Array ( data , shape = intArrayOf ( newSize ) , dim = D1 ) <EOL> }


public fun < T , D : Dimension > MultiArray < T , D > . append ( arr : MultiArray < T , D > , axis : Int ) : NDArray < T , D >

= <EOL> this . cat ( arr , axis )


public fun < T , D : Dimension > MultiArray < T , D > . repeat ( n : Int ) : D1Array < T >

{ <EOL> require ( n >= <NUM_LIT:1> ) { "<STR_LIT>" } <EOL> val data = initMemoryView < T > ( size * n , dtype ) <EOL> if ( consistent ) { <EOL> this . data . copyInto ( data ) <EOL> } else { <EOL> var index = <NUM_LIT:0> <EOL> for ( el in this ) <EOL> data [ index ++ ] = el <EOL> } <EOL> for ( i in size until ( size * n ) step size ) { <EOL> val startIndex = i - size <EOL> val endIndex = i <EOL> val startIndexComplex = startIndex * <NUM_LIT:2> <EOL> val endIndexComplex = startIndexComplex + ( size * <NUM_LIT:2> ) <EOL> when ( this . dtype ) { <EOL> DataType . ComplexFloatDataType -> <EOL> data . getFloatArray ( ) . copyInto ( data . getFloatArray ( ) , i * <NUM_LIT:2> , startIndexComplex , endIndexComplex ) <EOL> DataType . ComplexDoubleDataType -> <EOL> data . getDoubleArray ( ) . copyInto ( data . getDoubleArray ( ) , i * <NUM_LIT:2> , startIndexComplex , endIndexComplex ) <EOL> else -> data . copyInto ( data , i , i - size , endIndex ) <EOL> } <EOL> } <EOL> return D1Array ( data , shape = intArrayOf ( size * n ) , dim = D1 ) <EOL> }


public fun < T , D : Dimension > MultiArray < T , D > . clip ( min : T , max : T ) : NDArray < T , D > where T : Comparable < T > , T : Number

{ <EOL> require ( min <= max ) { <EOL> "<STR_LIT>" <EOL> } <EOL> val clippedData = initMemoryView ( size , dtype ) { index -> <EOL> val e = data [ index ] <EOL> if ( e < min ) min else if ( e > max ) max else e <EOL> } <EOL> return NDArray ( data = clippedData , shape = shape . copyOf ( ) , dim = dim ) <EOL> }

/**
 * Clips the values in ndarray if value is not in range min..max
 *
 * values bigger than [max] are set to [max]
 *
 * values smaller than [min] are set to [min]
 *
 * @param min minimum value for clipping where any value in ndarray
 * that is smaller than [min] are clipped and set to [min]
 * @param max maximum value for clipping where any value in ndarray
 * that is bigger than [max] are clipped and set to [max]
 * @return NDArray of which all of its elements are in range min..max
 * @throws IllegalArgumentException if min > max
 */


@ JvmName ( "<STR_LIT>" ) <EOL> public fun < T > MultiArray < T , D1 > . expandDims ( axis : Int ) : MultiArray < T , D2 >

{ <EOL> val newShape = shape . toMutableList ( ) . apply { add ( axis , <NUM_LIT:1> ) } . toIntArray ( ) <EOL> val newData = if ( consistent ) this . data else this . deepCopy ( ) . data <EOL> val newBase = if ( consistent ) this . base ? : this else null <EOL> val newOffset = if ( consistent ) this . offset else <NUM_LIT:0> <EOL> return D2Array ( newData , newOffset , newShape , dim = D2 , base = newBase ) <EOL> }

/**
 * Returns a ndarray with an expanded shape.
 */


@ JvmName ( "<STR_LIT>" ) <EOL> public fun < T > MultiArray < T , D2 > . expandDims ( axis : Int ) : MultiArray < T , D3 >

{ <EOL> val newShape = shape . toMutableList ( ) . apply { add ( axis , <NUM_LIT:1> ) } . toIntArray ( ) <EOL> val newData = if ( consistent ) this . data else this . deepCopy ( ) . data <EOL> val newBase = if ( consistent ) this . base ? : this else null <EOL> val newOffset = if ( consistent ) this . offset else <NUM_LIT:0> <EOL> return D3Array ( newData , newOffset , newShape , dim = D3 , base = newBase ) <EOL> }


@ JvmName ( "<STR_LIT>" ) <EOL> public fun < T > MultiArray < T , D3 > . expandDims ( axis : Int ) : MultiArray < T , D4 >

{ <EOL> val newShape = shape . toMutableList ( ) . apply { add ( axis , <NUM_LIT:1> ) } . toIntArray ( ) <EOL> val newData = if ( consistent ) this . data else this . deepCopy ( ) . data <EOL> val newBase = if ( consistent ) this . base ? : this else null <EOL> val newOffset = if ( consistent ) this . offset else <NUM_LIT:0> <EOL> return D4Array ( newData , newOffset , newShape , dim = D4 , base = newBase ) <EOL> }


@ JvmName ( "<STR_LIT>" ) <EOL> public fun < T > MultiArray < T , D4 > . expandDims ( axis : Int ) : MultiArray < T , DN >

= this . unsqueeze ( )


@ JvmName ( "<STR_LIT>" ) <EOL> public fun < T , D : Dimension > MultiArray < T , D > . expandNDims ( vararg axes : Int ) : MultiArray < T , DN >

= this . unsqueeze ( )

/**
 * Returns a ndarray with an expanded shape.
 *
 * @see MultiArray.unsqueeze
 */


fun getKind ( module : KtModule ) : LLModuleResolutionStrategy

/**
 * Returns [LLModuleResolutionStrategy.STATIC] if the [module] is treated as a binary for the current session,
 * and [LLModuleResolutionStrategy.LAZY] otherwise.
 *
 * In some cases, modules of the same type might be treated differently by the session, and have a different [LLModuleResolutionStrategy].
 * For instance, for a resolvable library session, only the target library is considered resolvable, and its dependencies are binary.
 */


public fun < T > xIntercept ( column : ColumnAccessor < T > ) : PositionalMapping < T >

{ <EOL> return addPositionalMapping < T > ( X_INTERCEPT , column . name ( ) , null ) <EOL> }

/**
 * Maps the `xIntercept` aesthetic to a data column by [ColumnAccessor].
 *
 * @param column the data column to be mapped.
 * @return a [PositionalMapping] object representing the mapping.
 */


public fun < T > xIntercept ( column : KProperty < T > ) : PositionalMapping < T >

{ <EOL> return addPositionalMapping < T > ( X_INTERCEPT , column . name , null ) <EOL> }

/**
 * Maps the `xIntercept` aesthetic to a data column by [KProperty].
 *
 * @param column the data column to be mapped.
 * @return a [PositionalMapping] object representing the mapping.
 */


public fun xIntercept ( column : String ) : PositionalMapping < Any ? >

{ <EOL> return addPositionalMapping ( X_INTERCEPT , column , null ) <EOL> }

/**
 * Maps the `xIntercept` aesthetic to a data column by [String].
 *
 * @param column the data column to be mapped.
 * @return a [PositionalMapping] object representing the mapping.
 */


public fun < T > xIntercept ( values : Iterable < T > ) : PositionalMapping < T >

{ <EOL> return addPositionalMapping < T > ( X_INTERCEPT , values . toList ( ) , null , null ) <EOL> }

/**
 * Maps the `xIntercept` aesthetic to iterable of values.
 *
 * @param values the iterable of values to be mapped.
 * @return a [PositionalMapping] object representing the mapping.
 */


public fun < T > xIntercept ( values : DataColumn < T > ) : PositionalMapping < T >

{ <EOL> return addPositionalMapping < T > ( X_INTERCEPT , values , null ) <EOL> }

/**
 * Maps the `xIntercept` aesthetic to a data column.
 *
 * @param values the data column to be mapped.
 * @return a [PositionalMapping] object representing the mapping.
 */


= super < AbstractMap > . hashCode ( )

/**
 * We provide [equals], so as a matter of style, we should also provide [hashCode].
 * However, the implementation from [AbstractMap] is enough.
 */


fun ScriptingHostConfiguration ? . with ( body : ScriptingHostConfiguration . Builder . ( ) -> Unit ) : ScriptingHostConfiguration

{ <EOL> val newConfiguration = <EOL> if ( this == null ) ScriptingHostConfiguration ( body = body ) <EOL> else ScriptingHostConfiguration ( this , body = body ) <EOL> return if ( newConfiguration != this ) newConfiguration else this <EOL> }

/**
 * An alternative to the constructor with base configuration, which returns a new configuration only if [body] adds anything
 * to the original one, otherwise returns original
 */


fun ScriptingHostConfiguration ? . withDefaultsFrom ( defaults : ScriptingHostConfiguration ) : ScriptingHostConfiguration

= <EOL> when { <EOL> this == defaults || defaults . isEmpty ( ) -> this ? : defaults <EOL> this == null || this . isEmpty ( ) -> defaults <EOL> else -> ScriptingHostConfiguration ( defaults , this ) <EOL> }

/**
 * Add the values not explicitly set in the receiver from the [defaults] configuration
 */


fun ScriptingHostConfiguration . Builder . getEvaluationContext ( handler : GetEvaluationContext )

{ <EOL> ScriptingHostConfiguration . getEvaluationContext . put ( handler ) <EOL> }

/**
 * A helper to enable passing lambda directly to the getEvaluationContext "keyword"
 */


fun computeMangle ( declaration : Declaration ) : String

/**
 * Computes the mangled name of [declaration].
 *
 * @param declaration The Kotlin declaration to compute a mangle name for.
 * @return The mangled name of [declaration].
 */


fun copy ( newMode : MangleMode ) : KotlinMangleComputer < Declaration >

/**
 * Creates a copy of this mangle computer with a different mangle mode but otherwise the same state.
 *
 * Useful for temporarily switching the mangle mode.
 *
 * @param newMode The mangle mode to use in the new mangle computer.
 * @return A copy of this mangle computer.
 */


public fun < T : ComplexFloat > complexFloatArrayOf ( vararg elements : T ) : ComplexFloatArray

= <EOL> if ( elements . isEmpty ( ) ) ComplexFloatArray ( <NUM_LIT:0> ) else ComplexFloatArray ( elements . size ) { elements [ it ] }

/**
 * Creates a new [ComplexFloatArray] from the provided vararg [elements].
 *
 * @param elements the elements to be included in the new [ComplexFloatArray].
 * @return a new [ComplexFloatArray] containing all the provided [elements],
 * or an empty [ComplexFloatArray] if no [elements] were provided.
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexFloatArray . component1 ( ) : ComplexFloat

= get ( <NUM_LIT:0> )

/**
 * Returns 1st element from the array.
 *
 * If the size of this array is less than 1, throws an [IndexOutOfBoundsException].
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexDoubleArray . component1 ( ) : ComplexDouble

= get ( <NUM_LIT:0> )


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexFloatArray . component2 ( ) : ComplexFloat

= get ( <NUM_LIT:1> )

/**
 * Returns 2nd *element* from the array.
 *
 * If the size of this array is less than 2, throws an [IndexOutOfBoundsException].
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexDoubleArray . component2 ( ) : ComplexDouble

= get ( <NUM_LIT:1> )


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexFloatArray . component3 ( ) : ComplexFloat

= get ( <NUM_LIT:2> )

/**
 * Returns 3rd *element* from the array.
 *
 * If the size of this array is less than 3, throws an [IndexOutOfBoundsException].
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexDoubleArray . component3 ( ) : ComplexDouble

= get ( <NUM_LIT:2> )


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexFloatArray . component4 ( ) : ComplexFloat

= get ( <NUM_LIT:3> )

/**
 * Returns 4th *element* from the array.
 *
 * If the size of this array is less than 4, throws an [IndexOutOfBoundsException].
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexDoubleArray . component4 ( ) : ComplexDouble

= get ( <NUM_LIT:3> )


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexFloatArray . component5 ( ) : ComplexFloat

= get ( <NUM_LIT:4> )

/**
 * Returns 5th *element* from the array.
 *
 * If the size of this array is less than 5, throws an [IndexOutOfBoundsException].
 */


@ Suppress ( "<STR_LIT>" ) <EOL> public inline operator fun ComplexDoubleArray . component5 ( ) : ComplexDouble

= get ( <NUM_LIT:4> )


public operator fun ComplexFloatArray . contains ( element : ComplexFloat ) : Boolean

= indexOf ( element ) >= <NUM_LIT:0>

/**
 * Returns `true` if [element] is found in the array.
 */


public operator fun ComplexDoubleArray . contains ( element : ComplexDouble ) : Boolean

= indexOf ( element ) >= <NUM_LIT:0>


public fun ComplexFloatArray . elementAt ( index : Int ) : ComplexFloat

= get ( index )

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


public fun ComplexDoubleArray . elementAt ( index : Int ) : ComplexDouble

= get ( index )


public inline fun ComplexFloatArray . elementAtOrElse ( index : Int , defaultValue : ( Int ) -> ComplexFloat ) : ComplexFloat

= <EOL> if ( index in <NUM_LIT:0> .. lastIndex ) get ( index ) else defaultValue ( index )

/**
 * 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.
 */


public inline fun ComplexDoubleArray . elementAtOrElse ( index : Int , defaultValue : ( Int ) -> ComplexDouble ) : ComplexDouble


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . elementAtOrNull ( index : Int ) : ComplexFloat ?

= this . getOrNull ( index )

/**
 * Returns an element at the given [index] or `null` if the [index] is out of bounds of this array.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . elementAtOrNull ( index : Int ) : ComplexDouble ?

= this . getOrNull ( index )


public inline fun ComplexFloatArray . find ( predicate : ( ComplexFloat ) -> Boolean ) : ComplexFloat ?

= firstOrNull ( predicate )

/**
 * Returns the first element matching the given [predicate], or `null` if no such element was found.
 */


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

= <EOL> firstOrNull ( predicate )


public inline fun ComplexFloatArray . findLast ( predicate : ( ComplexFloat ) -> Boolean ) : ComplexFloat ?

= <EOL> lastOrNull ( predicate )

/**
 * Returns the last element matching the given [predicate], or `null` if no such element was found.
 */


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

= <EOL> lastOrNull ( predicate )


public fun ComplexFloatArray . first ( ) : ComplexFloat

= <EOL> if ( isEmpty ( ) ) <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> else <EOL> this [ <NUM_LIT:0> ]

/**
 * Returns first element.
 * @throws [NoSuchElementException] if the array is empty.
 */


public fun ComplexDoubleArray . first ( ) : ComplexDouble


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

{ <EOL> for ( element in this ) if ( predicate ( element ) ) return element <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> }

/**
 * Returns the first element matching the given [predicate].
 * @throws [NoSuchElementException] if no such element is found.
 */


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


public fun ComplexFloatArray . firstOrNull ( ) : ComplexFloat ?

= if ( isEmpty ( ) ) null else this [ <NUM_LIT:0> ]

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


public fun ComplexDoubleArray . firstOrNull ( ) : ComplexDouble ?


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

{ <EOL> for ( element in this ) if ( predicate ( element ) ) return element <EOL> return null <EOL> }

/**
 * Returns the first element matching the given [predicate], or `null` if element was not found.
 */


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


public inline fun ComplexFloatArray . getOrElse ( index : Int , defaultValue : ( Int ) -> ComplexFloat ) : ComplexFloat


public inline fun ComplexDoubleArray . getOrElse ( index : Int , defaultValue : ( Int ) -> ComplexDouble ) : ComplexDouble


public fun ComplexFloatArray . getOrNull ( index : Int ) : ComplexFloat ?

= <EOL> if ( index in <NUM_LIT:0> .. lastIndex ) get ( index ) else null


public fun ComplexDoubleArray . getOrNull ( index : Int ) : ComplexDouble ?


public fun ComplexFloatArray . indexOf ( element : ComplexFloat ) : Int

{ <EOL> for ( index in indices ) { <EOL> if ( element == this [ index ] ) { <EOL> return index <EOL> } <EOL> } <EOL> return - <NUM_LIT:1> <EOL> }

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


public fun ComplexDoubleArray . indexOf ( element : ComplexDouble ) : Int


public inline fun ComplexFloatArray . indexOfFirst ( predicate : ( ComplexFloat ) -> Boolean ) : Int

{ <EOL> for ( index in indices ) { <EOL> if ( predicate ( this [ index ] ) ) { <EOL> return index <EOL> } <EOL> } <EOL> return - <NUM_LIT:1> <EOL> }

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


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


public inline fun ComplexFloatArray . indexOfLast ( predicate : ( ComplexFloat ) -> Boolean ) : Int

{ <EOL> for ( index in indices . reversed ( ) ) { <EOL> if ( predicate ( this [ index ] ) ) { <EOL> return index <EOL> } <EOL> } <EOL> return - <NUM_LIT:1> <EOL> }

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


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


public fun ComplexFloatArray . last ( ) : ComplexFloat

{ <EOL> if ( isEmpty ( ) ) <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> return this [ lastIndex ] <EOL> }

/**
 * Returns the last element.
 *
 * @throws NoSuchElementException if the array is empty.
 */


public fun ComplexDoubleArray . last ( ) : ComplexDouble


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

{ <EOL> for ( index in this . indices . reversed ( ) ) { <EOL> val element = this [ index ] <EOL> if ( predicate ( element ) ) return element <EOL> } <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> }

/**
 * Returns the last element matching the given [predicate].
 *
 * @throws NoSuchElementException if no such element is found.
 */


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


public fun ComplexFloatArray . lastIndexOf ( element : ComplexFloat ) : Int

{ <EOL> for ( index in indices . reversed ( ) ) { <EOL> if ( element == this [ index ] ) { <EOL> return index <EOL> } <EOL> } <EOL> return - <NUM_LIT:1> <EOL> }

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


public fun ComplexDoubleArray . lastIndexOf ( element : ComplexDouble ) : Int


public fun ComplexFloatArray . lastOrNull ( ) : ComplexFloat ?

{ <EOL> return if ( isEmpty ( ) ) null else this [ size - <NUM_LIT:1> ] <EOL> }

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


public fun ComplexDoubleArray . lastOrNull ( ) : ComplexDouble ?


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

{ <EOL> for ( index in this . indices . reversed ( ) ) { <EOL> val element = this [ index ] <EOL> if ( predicate ( element ) ) return element <EOL> } <EOL> return null <EOL> }


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


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . random ( ) : ComplexFloat

= random ( Random )

/**
 * Returns a random element from this array.
 *
 * @throws NoSuchElementException if this array is empty.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . random ( ) : ComplexDouble

= random ( Random )


public fun ComplexFloatArray . random ( random : Random ) : ComplexFloat

= <EOL> if ( isEmpty ( ) ) <EOL> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> else <EOL> get ( random . nextInt ( size ) )

/**
 * Returns a random element from this array using the specified source of randomness.
 *
 * @throws NoSuchElementException if this array is empty.
 */


public fun ComplexDoubleArray . random ( random : Random ) : ComplexDouble


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . randomOrNull ( ) : ComplexFloat ?

= randomOrNull ( Random )

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


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . randomOrNull ( ) : ComplexDouble ?

= randomOrNull ( Random )


public fun ComplexFloatArray . randomOrNull ( random : Random ) : ComplexFloat ?

= <EOL> if ( isEmpty ( ) ) null else get ( random . nextInt ( size ) )

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


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


public fun ComplexFloatArray . single ( ) : ComplexFloat

= when ( size ) { <EOL> <NUM_LIT:0> -> throw NoSuchElementException ( "<STR_LIT>" ) <EOL> <NUM_LIT:1> -> this [ <NUM_LIT:0> ] <EOL> else -> throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> }

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


public fun ComplexDoubleArray . single ( ) : ComplexDouble


public inline fun ComplexFloatArray . single ( predicate : ( ComplexFloat ) -> Boolean ) : ComplexFloat

{ <EOL> var single : ComplexFloat ? = null <EOL> var found = false <EOL> for ( element in this ) { <EOL> if ( predicate ( element ) ) { <EOL> if ( found ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> single = element <EOL> found = true <EOL> } <EOL> } <EOL> if ( ! found ) throw NoSuchElementException ( "<STR_LIT>" ) <EOL> return single as ComplexFloat <EOL> }

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


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

{ <EOL> var single : ComplexDouble ? = null <EOL> var found = false <EOL> for ( element in this ) { <EOL> if ( predicate ( element ) ) { <EOL> if ( found ) throw IllegalArgumentException ( "<STR_LIT>" ) <EOL> single = element <EOL> found = true <EOL> } <EOL> } <EOL> if ( ! found ) throw NoSuchElementException ( "<STR_LIT>" ) <EOL> return single as ComplexDouble <EOL> }


public fun ComplexFloatArray . singleOrNull ( ) : ComplexFloat ?

= if ( size == <NUM_LIT:1> ) this [ <NUM_LIT:0> ] else null

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


public fun ComplexDoubleArray . singleOrNull ( ) : ComplexDouble ?


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

{ <EOL> var single : ComplexFloat ? = null <EOL> var found = false <EOL> for ( element in this ) { <EOL> if ( predicate ( element ) ) { <EOL> if ( found ) return null <EOL> single = element <EOL> found = true <EOL> } <EOL> } <EOL> if ( ! found ) return null <EOL> return single <EOL> }

/**
 * Returns the single element matching the given [predicate], or `null` if element was not found or more than one element was found.
 */


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

{ <EOL> var single : ComplexDouble ? = null <EOL> var found = false <EOL> for ( element in this ) { <EOL> if ( predicate ( element ) ) { <EOL> if ( found ) return null <EOL> single = element <EOL> found = true <EOL> } <EOL> } <EOL> if ( ! found ) return null <EOL> return single <EOL> }


public fun ComplexFloatArray . drop ( n : Int ) : List < ComplexFloat >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> return takeLast ( ( size - n ) . coerceAtLeast ( <NUM_LIT:0> ) ) <EOL> }

/**
 * Returns a list containing all elements except first [n] elements.
 *
 * @throws IllegalArgumentException if [n] is negative.
 */


public fun ComplexDoubleArray . drop ( n : Int ) : List < ComplexDouble >


public fun ComplexFloatArray . dropLast ( n : Int ) : List < ComplexFloat >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> return take ( ( size - n ) . coerceAtLeast ( <NUM_LIT:0> ) ) <EOL> }

/**
 * Returns a list containing all elements except last [n] elements.
 *
 * @throws IllegalArgumentException if [n] is negative.
 */


public fun ComplexDoubleArray . dropLast ( n : Int ) : List < ComplexDouble >


public inline fun ComplexFloatArray . dropLastWhile ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

{ <EOL> for ( index in lastIndex downTo <NUM_LIT:0> ) { <EOL> if ( ! predicate ( this [ index ] ) ) { <EOL> return take ( index + <NUM_LIT:1> ) <EOL> } <EOL> } <EOL> return emptyList ( ) <EOL> }

/**
 * Returns a list containing all elements except last elements that satisfy the given [predicate].
 */


public inline fun ComplexDoubleArray . dropLastWhile ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >


public inline fun ComplexFloatArray . dropWhile ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

{ <EOL> var yielding = false <EOL> val list = ArrayList < ComplexFloat > ( ) <EOL> for ( item in this ) <EOL> if ( yielding ) <EOL> list . add ( item ) <EOL> else if ( ! predicate ( item ) ) { <EOL> list . add ( item ) <EOL> yielding = true <EOL> } <EOL> return list <EOL> }

/**
 * Returns a list containing all elements except first elements that satisfy the given [predicate].
 */


public inline fun ComplexDoubleArray . dropWhile ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >

{ <EOL> var yielding = false <EOL> val list = ArrayList < ComplexDouble > ( ) <EOL> for ( item in this ) <EOL> if ( yielding ) <EOL> list . add ( item ) <EOL> else if ( ! predicate ( item ) ) { <EOL> list . add ( item ) <EOL> yielding = true <EOL> } <EOL> return list <EOL> }


public inline fun ComplexFloatArray . filter ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

= <EOL> filterTo ( ArrayList ( ) , predicate )

/**
 * Returns a list containing only elements matching the given [predicate].
 */


public inline fun ComplexDoubleArray . filter ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >


public inline fun ComplexFloatArray . filterIndexed ( predicate : ( index : Int , ComplexFloat ) -> Boolean ) : List < ComplexFloat >

= <EOL> filterIndexedTo ( ArrayList ( ) , predicate )

/**
 * Returns a list containing only elements matching the given [predicate].
 * @param [predicate] function that takes the index of an element and the element itself
 * and returns the result of predicate evaluation on the element.
 */


public inline fun ComplexDoubleArray . filterIndexed ( predicate : ( index : Int , ComplexDouble ) -> Boolean ) : List < ComplexDouble >


public inline fun < C : MutableCollection < in ComplexFloat > > ComplexFloatArray . filterIndexedTo ( destination : C , predicate : ( index : Int , ComplexFloat ) -> Boolean ) : C

{ <EOL> forEachIndexed { index , element -> <EOL> if ( predicate ( index , element ) ) destination . add ( element ) <EOL> } <EOL> return destination <EOL> }

/**
 * Appends all elements matching the given [predicate] to the given [destination].
 * @param [predicate] function that takes the index of an element and the element itself
 * and returns the result of predicate evaluation on the element.
 */


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


public inline fun ComplexFloatArray . filterNot ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

= <EOL> filterNotTo ( ArrayList ( ) , predicate )

/**
 * Returns a list containing all elements not matching the given [predicate].
 */


public inline fun ComplexDoubleArray . filterNot ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >


public inline fun < C : MutableCollection < in ComplexFloat > > ComplexFloatArray . filterNotTo ( destination : C , predicate : ( ComplexFloat ) -> Boolean ) : C

{ <EOL> for ( element in this ) if ( ! predicate ( element ) ) destination . add ( element ) <EOL> return destination <EOL> }

/**
 * Appends all elements not matching the given [predicate] to the given [destination].
 */


public inline fun < C : MutableCollection < in ComplexDouble > > ComplexDoubleArray . filterNotTo ( destination : C , predicate : ( ComplexDouble ) -> Boolean ) : C


public inline fun < C : MutableCollection < in ComplexFloat > > ComplexFloatArray . filterTo ( destination : C , predicate : ( ComplexFloat ) -> Boolean ) : C

{ <EOL> for ( element in this ) if ( predicate ( element ) ) destination . add ( element ) <EOL> return destination <EOL> }

/**
 * Appends all elements matching the given [predicate] to the given [destination].
 */


public inline fun < C : MutableCollection < in ComplexDouble > > ComplexDoubleArray . filterTo ( destination : C , predicate : ( ComplexDouble ) -> Boolean ) : C


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

{ <EOL> if ( indices . isEmpty ( ) ) return listOf ( ) <EOL> return copyOfRange ( indices . first , indices . last + <NUM_LIT:1> ) . asList ( ) <EOL> }

/**
 * Returns a list containing elements at indices in the specified [indices] range.
 */


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


public fun ComplexFloatArray . slice ( indices : Iterable < Int > ) : List < ComplexFloat >

{ <EOL> val size = if ( indices is Collection < * > ) indices . size else <NUM_LIT:10> <EOL> if ( size == <NUM_LIT:0> ) return emptyList ( ) <EOL> val list = ArrayList < ComplexFloat > ( size ) <EOL> for ( index in indices ) { <EOL> list . add ( get ( index ) ) <EOL> } <EOL> return list <EOL> }

/**
 * Returns a list containing elements at specified [indices].
 */


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

{ <EOL> val size = if ( indices is Collection < * > ) indices . size else <NUM_LIT:10> <EOL> if ( size == <NUM_LIT:0> ) return emptyList ( ) <EOL> val list = ArrayList < ComplexDouble > ( size ) <EOL> for ( index in indices ) { <EOL> list . add ( get ( index ) ) <EOL> } <EOL> return list <EOL> }


public fun ComplexFloatArray . sliceArray ( indices : Collection < Int > ) : ComplexFloatArray

{ <EOL> val result = ComplexFloatArray ( indices . size ) <EOL> var targetIndex = <NUM_LIT:0> <EOL> for ( sourceIndex in indices ) { <EOL> result [ targetIndex ++ ] = this [ sourceIndex ] <EOL> } <EOL> return result <EOL> }

/**
 * Returns an array containing elements of this array at specified [indices].
 */


public fun ComplexDoubleArray . sliceArray ( indices : Collection < Int > ) : ComplexDoubleArray

{ <EOL> val result = ComplexDoubleArray ( indices . size ) <EOL> var targetIndex = <NUM_LIT:0> <EOL> for ( sourceIndex in indices ) { <EOL> result [ targetIndex ++ ] = this [ sourceIndex ] <EOL> } <EOL> return result <EOL> }


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

= <EOL> if ( indices . isEmpty ( ) ) <EOL> ComplexFloatArray ( <NUM_LIT:0> ) <EOL> else <EOL> copyOfRange ( indices . first , indices . last + <NUM_LIT:1> )

/**
 * Returns an array containing elements at indices in the specified [indices] range.
 */


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

= <EOL> if ( indices . isEmpty ( ) ) <EOL> ComplexDoubleArray ( <NUM_LIT:0> ) <EOL> else <EOL> copyOfRange ( indices . first , indices . last + <NUM_LIT:1> )


public fun ComplexFloatArray . take ( n : Int ) : List < ComplexFloat >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> if ( n == <NUM_LIT:0> ) return emptyList ( ) <EOL> if ( n >= size ) return toList ( ) <EOL> if ( n == <NUM_LIT:1> ) return listOf ( this [ <NUM_LIT:0> ] ) <EOL> var count = <NUM_LIT:0> <EOL> val list = ArrayList < ComplexFloat > ( n ) <EOL> for ( item in this ) { <EOL> list . add ( item ) <EOL> if ( ++ count == n ) <EOL> break <EOL> } <EOL> return list <EOL> }

/**
 * Returns a list containing first [n] elements.
 *
 * @throws IllegalArgumentException if [n] is negative.
 */


public fun ComplexDoubleArray . take ( n : Int ) : List < ComplexDouble >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> if ( n == <NUM_LIT:0> ) return emptyList ( ) <EOL> if ( n >= size ) return toList ( ) <EOL> if ( n == <NUM_LIT:1> ) return listOf ( this [ <NUM_LIT:0> ] ) <EOL> var count = <NUM_LIT:0> <EOL> val list = ArrayList < ComplexDouble > ( n ) <EOL> for ( item in this ) { <EOL> list . add ( item ) <EOL> if ( ++ count == n ) <EOL> break <EOL> } <EOL> return list <EOL> }


public fun ComplexFloatArray . takeLast ( n : Int ) : List < ComplexFloat >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> if ( n == <NUM_LIT:0> ) return emptyList ( ) <EOL> val size = size <EOL> if ( n >= size ) return toList ( ) <EOL> if ( n == <NUM_LIT:1> ) return listOf ( this [ size - <NUM_LIT:1> ] ) <EOL> val list = ArrayList < ComplexFloat > ( n ) <EOL> for ( index in size - n until size ) <EOL> list . add ( this [ index ] ) <EOL> return list <EOL> }

/**
 * Returns a list containing last [n] elements.
 *
 * @throws IllegalArgumentException if [n] is negative.
 */


public fun ComplexDoubleArray . takeLast ( n : Int ) : List < ComplexDouble >

{ <EOL> require ( n >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> if ( n == <NUM_LIT:0> ) return emptyList ( ) <EOL> val size = size <EOL> if ( n >= size ) return toList ( ) <EOL> if ( n == <NUM_LIT:1> ) return listOf ( this [ size - <NUM_LIT:1> ] ) <EOL> val list = ArrayList < ComplexDouble > ( n ) <EOL> for ( index in size - n until size ) <EOL> list . add ( this [ index ] ) <EOL> return list <EOL> }


public inline fun ComplexFloatArray . takeLastWhile ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

{ <EOL> for ( index in lastIndex downTo <NUM_LIT:0> ) { <EOL> if ( ! predicate ( this [ index ] ) ) { <EOL> return drop ( index + <NUM_LIT:1> ) <EOL> } <EOL> } <EOL> return toList ( ) <EOL> }

/**
 * Returns a list containing last elements satisfying the given [predicate].
 */


public inline fun ComplexDoubleArray . takeLastWhile ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >


public inline fun ComplexFloatArray . takeWhile ( predicate : ( ComplexFloat ) -> Boolean ) : List < ComplexFloat >

{ <EOL> val list = ArrayList < ComplexFloat > ( ) <EOL> for ( item in this ) { <EOL> if ( ! predicate ( item ) ) break <EOL> list . add ( item ) <EOL> } <EOL> return list <EOL> }

/**
 * Returns a list containing first elements satisfying the given [predicate].
 */


public inline fun ComplexDoubleArray . takeWhile ( predicate : ( ComplexDouble ) -> Boolean ) : List < ComplexDouble >

{ <EOL> val list = ArrayList < ComplexDouble > ( ) <EOL> for ( item in this ) { <EOL> if ( ! predicate ( item ) ) break <EOL> list . add ( item ) <EOL> } <EOL> return list <EOL> }


public fun ComplexFloatArray . reverse ( ) : Unit

{ <EOL> val midPoint = ( size / <NUM_LIT:2> ) - <NUM_LIT:1> <EOL> if ( midPoint < <NUM_LIT:0> ) return <EOL> var reverseIndex = lastIndex <EOL> for ( index in <NUM_LIT:0> .. midPoint ) { <EOL> val tmp = this [ index ] <EOL> this [ index ] = this [ reverseIndex ] <EOL> this [ reverseIndex ] = tmp <EOL> reverseIndex -- <EOL> } <EOL> }

/**
 * Reverses elements in the array in-place.
 */


public fun ComplexDoubleArray . reverse ( ) : Unit


public fun ComplexFloatArray . reverse ( fromIndex : Int , toIndex : Int ) : Unit

{ <EOL> checkRangeIndexes ( fromIndex , toIndex , size ) <EOL> val midPoint = ( fromIndex + toIndex ) / <NUM_LIT:2> <EOL> if ( fromIndex == midPoint ) return <EOL> var reverseIndex = toIndex - <NUM_LIT:1> <EOL> for ( index in fromIndex until midPoint ) { <EOL> val tmp = this [ index ] <EOL> this [ index ] = this [ reverseIndex ] <EOL> this [ reverseIndex ] = tmp <EOL> reverseIndex -- <EOL> } <EOL> }

/**
 * Reverses elements of the array in the specified range in-place.
 *
 * @param fromIndex the start of the range (inclusive) to reverse.
 * @param toIndex the end of the range (exclusive) to reverse.
 *
 * @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
 * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
 */


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


public fun ComplexFloatArray . reversed ( ) : List < ComplexFloat >

{ <EOL> if ( isEmpty ( ) ) return emptyList ( ) <EOL> val list = toMutableList ( ) <EOL> list . reverse ( ) <EOL> return list <EOL> }

/**
 * Returns a list with elements in reversed order.
 */


public fun ComplexDoubleArray . reversed ( ) : List < ComplexDouble >


public fun ComplexFloatArray . reversedArray ( ) : ComplexFloatArray

{ <EOL> if ( isEmpty ( ) ) return this <EOL> val result = ComplexFloatArray ( size ) <EOL> val lastIndex = lastIndex <EOL> for ( i in <NUM_LIT:0> .. lastIndex ) <EOL> result [ lastIndex - i ] = this [ i ] <EOL> return result <EOL> }

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


public fun ComplexDoubleArray . reversedArray ( ) : ComplexDoubleArray

{ <EOL> if ( isEmpty ( ) ) return this <EOL> val result = ComplexDoubleArray ( size ) <EOL> val lastIndex = lastIndex <EOL> for ( i in <NUM_LIT:0> .. lastIndex ) <EOL> result [ lastIndex - i ] = this [ i ] <EOL> return result <EOL> }


public fun ComplexFloatArray . shuffle ( ) : Unit

{ <EOL> shuffle ( Random ) <EOL> }

/**
 * Randomly shuffles elements in this array in-place.
 */


public fun ComplexDoubleArray . shuffle ( ) : Unit

{ <EOL> shuffle ( Random ) <EOL> }


public fun ComplexFloatArray . shuffle ( random : Random ) : Unit

{ <EOL> for ( i in lastIndex downTo <NUM_LIT:1> ) { <EOL> val j = random . nextInt ( i + <NUM_LIT:1> ) <EOL> val copy = this [ i ] <EOL> this [ i ] = this [ j ] <EOL> this [ j ] = copy <EOL> } <EOL> }

/**
 * Randomly shuffles elements in this array in-place using the specified [random] instance as the source of randomness.
 *
 * See: https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle#The_modern_algorithm
 */


public fun ComplexDoubleArray . shuffle ( random : Random ) : Unit


public inline fun < R : Comparable < R > > ComplexFloatArray . sortedBy ( crossinline selector : ( ComplexFloat ) -> R ? ) : List < ComplexFloat >

{ <EOL> return sortedWith ( compareBy ( selector ) ) <EOL> }

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


public inline fun < R : Comparable < R > > ComplexDoubleArray . sortedBy ( crossinline selector : ( ComplexDouble ) -> R ? ) : List < ComplexDouble >


public inline fun < R : Comparable < R > > ComplexFloatArray . sortedByDescending ( crossinline selector : ( ComplexFloat ) -> R ? ) : List < ComplexFloat >

{ <EOL> return sortedWith ( compareByDescending ( selector ) ) <EOL> }

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


public inline fun < R : Comparable < R > > ComplexDoubleArray . sortedByDescending ( crossinline selector : ( ComplexDouble ) -> R ? ) : List < ComplexDouble >


public fun ComplexFloatArray . sortedWith ( comparator : Comparator < in ComplexFloat > ) : List < ComplexFloat >

{ <EOL> return toTypedArray ( ) . apply { sortWith ( comparator ) } . asList ( ) <EOL> }

/**
 * Returns a list of all elements sorted according to the specified [comparator].
 */


public fun ComplexDoubleArray . sortedWith ( comparator : Comparator < in ComplexDouble > ) : List < ComplexDouble >


public fun ComplexFloatArray . asList ( ) : List < ComplexFloat >

= object : AbstractList < ComplexFloat > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : ComplexFloat ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : ComplexFloat = this@asList [ index ] <EOL> override fun indexOf ( element : ComplexFloat ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : ComplexFloat ) : Int = this@asList . lastIndexOf ( element ) <EOL> }

/**
 * Returns a [List] that wraps the original array.
 */


public fun ComplexDoubleArray . asList ( ) : List < ComplexDouble >

= object : AbstractList < ComplexDouble > ( ) , RandomAccess { <EOL> override val size : Int get ( ) = this@asList . size <EOL> override fun isEmpty ( ) : Boolean = this@asList . isEmpty ( ) <EOL> override fun contains ( element : ComplexDouble ) : Boolean = this@asList . contains ( element ) <EOL> override fun get ( index : Int ) : ComplexDouble = this@asList [ index ] <EOL> override fun indexOf ( element : ComplexDouble ) : Int = this@asList . indexOf ( element ) <EOL> override fun lastIndexOf ( element : ComplexDouble ) : Int = this@asList . lastIndexOf ( element ) <EOL> }


public infix fun ComplexFloatArray ? . contentEquals ( other : ComplexFloatArray ? ) : Boolean

= <EOL> this ? . getFlatArray ( ) contentEquals other ? . getFlatArray ( )

/**
 * 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.
 *
 * The elements are compared for equality with the [equals][Any.equals] function.
 */


public infix fun ComplexDoubleArray ? . contentEquals ( other : ComplexDoubleArray ? ) : Boolean


public fun ComplexFloatArray ? . contentHashCode ( ) : Int

= this ? . getFlatArray ( ) . contentHashCode ( )

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


public fun ComplexDoubleArray ? . contentHashCode ( ) : Int


public fun ComplexFloatArray . copyInto ( destination : ComplexFloatArray , destinationOffset : Int = <NUM_LIT:0> , startIndex : Int = <NUM_LIT:0> , endIndex : Int = size ) : ComplexFloatArray

{ <EOL> this . getFlatArray ( ) . copyInto ( destination . getFlatArray ( ) , destinationOffset * <NUM_LIT:2> , startIndex * <NUM_LIT:2> , endIndex * <NUM_LIT:2> ) <EOL> return destination <EOL> }

/**
 * Copies this array or its subrange into the [destination] array and returns that array.
 *
 * It's allowed to pass the same array in the [destination] and even specify the subrange so that it overlaps with the destination range.
 *
 * @param destination the array to copy to.
 * @param destinationOffset the position in the [destination] array to copy to, 0 by default.
 * @param startIndex the beginning (inclusive) of the subrange to copy, 0 by default.
 * @param endIndex the end (exclusive) of the subrange to copy, size of this array by default.
 *
 * @throws IndexOutOfBoundsException or [IllegalArgumentException] when [startIndex] or [endIndex] is out of range of this array indices or when `startIndex > endIndex`.
 * @throws IndexOutOfBoundsException when the subrange doesn't fit into the [destination] array starting at the specified [destinationOffset],
 * or when that index is out of the [destination] array indices range.
 *
 * @return the [destination] array.
 */


public fun ComplexDoubleArray . copyInto ( destination : ComplexDoubleArray , destinationOffset : Int = <NUM_LIT:0> , startIndex : Int = <NUM_LIT:0> , endIndex : Int = size ) : ComplexDoubleArray


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . copyOf ( ) : ComplexFloatArray

{ <EOL> val ret = ComplexFloatArray ( size ) <EOL> this . getFlatArray ( ) . copyInto ( ret . getFlatArray ( ) , <NUM_LIT:0> , <NUM_LIT:0> , ret . size * <NUM_LIT:2> ) <EOL> return ret <EOL> }

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


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . copyOf ( ) : ComplexDoubleArray

{ <EOL> val ret = ComplexDoubleArray ( size ) <EOL> this . getFlatArray ( ) . copyInto ( ret . getFlatArray ( ) , <NUM_LIT:0> , <NUM_LIT:0> , ret . size * <NUM_LIT:2> ) <EOL> return ret <EOL> }


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . copyOf ( newSize : Int ) : ComplexFloatArray

{ <EOL> val ret = ComplexFloatArray ( newSize ) <EOL> this . getFlatArray ( ) . copyInto ( ret . getFlatArray ( ) , <NUM_LIT:0> , <NUM_LIT:0> , min ( this . size , newSize ) * <NUM_LIT:2> ) <EOL> return ret <EOL> }

/**
 * 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.
 *
 * - If [newSize] is less than the size of the original array, the copy array is truncated to the [newSize].
 * - If [newSize] is greater than the size of the original array, the extra elements in the copy array are filled with zero values.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . copyOf ( newSize : Int ) : ComplexDoubleArray

{ <EOL> val ret = ComplexDoubleArray ( newSize ) <EOL> this . getFlatArray ( ) . copyInto ( ret . getFlatArray ( ) , <NUM_LIT:0> , <NUM_LIT:0> , min ( this . size , newSize ) * <NUM_LIT:2> ) <EOL> return ret <EOL> }


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . copyOfRange ( fromIndex : Int , toIndex : Int ) : ComplexFloatArray

{ <EOL> if ( toIndex > size ) throw IndexOutOfBoundsException ( "<STR_LIT>" ) <EOL> val newLength = toIndex - fromIndex <EOL> require ( newLength >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> val ret = ComplexFloatArray ( newLength ) <EOL> this . copyInto ( ret , <NUM_LIT:0> , fromIndex , toIndex ) <EOL> return ret <EOL> }

/**
 * Returns a new array which is a copy of the specified range of the original array.
 *
 * @param fromIndex the start of the range (inclusive) to copy.
 * @param toIndex the end of the range (exclusive) to copy.
 *
 * @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
 * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . copyOfRange ( fromIndex : Int , toIndex : Int ) : ComplexDoubleArray

{ <EOL> if ( toIndex > size ) throw IndexOutOfBoundsException ( "<STR_LIT>" ) <EOL> val newLength = toIndex - fromIndex <EOL> require ( newLength >= <NUM_LIT:0> ) { "<STR_LIT>" } <EOL> val ret = ComplexDoubleArray ( newLength ) <EOL> this . copyInto ( ret , <NUM_LIT:0> , fromIndex , toIndex ) <EOL> return ret <EOL> }


public fun ComplexFloatArray . fill ( element : ComplexFloat , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Unit

{ <EOL> checkRangeIndexes ( fromIndex , toIndex , size ) <EOL> for ( i in fromIndex until toIndex ) <EOL> this [ i ] = element <EOL> }

/**
 * Fills this array or its subrange with the specified [element] value.
 *
 * @param fromIndex the start of the range (inclusive) to fill, 0 by default.
 * @param toIndex the end of the range (exclusive) to fill, size of this array by default.
 *
 * @throws IndexOutOfBoundsException if [fromIndex] is less than zero or [toIndex] is greater than the size of this array.
 * @throws IllegalArgumentException if [fromIndex] is greater than [toIndex].
 */


public fun ComplexDoubleArray . fill ( element : ComplexDouble , fromIndex : Int = <NUM_LIT:0> , toIndex : Int = size ) : Unit


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . isEmpty ( ) : Boolean

= size == <NUM_LIT:0>

/**
 * Returns `true` if the array is empty.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . isEmpty ( ) : Boolean

= size == <NUM_LIT:0>


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . isNotEmpty ( ) : Boolean

= ! isEmpty ( )

/**
 * Returns `true` if the array is not empty.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . isNotEmpty ( ) : Boolean

= ! isEmpty ( )


public operator fun ComplexFloatArray . plus ( element : ComplexFloat ) : ComplexFloatArray

{ <EOL> val index = size <EOL> val result = this . copyOf ( index + <NUM_LIT:1> ) <EOL> result [ index ] = element <EOL> return result <EOL> }

/**
 * Returns an array containing all elements of the original array and then the given [element].
 */


public operator fun ComplexDoubleArray . plus ( element : ComplexDouble ) : ComplexDoubleArray


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

{ <EOL> var index = size <EOL> val result = this . copyOf ( index + elements . size ) <EOL> for ( element in elements ) result [ index ++ ] = element <EOL> return result <EOL> }

/**
 * Returns an array containing all elements of the original array and then all elements of the given [elements] collection.
 */


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


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

{ <EOL> val thisSize = size <EOL> val arraySize = elements . size <EOL> val result = this . copyOf ( thisSize + arraySize ) <EOL> elements . copyInto ( result , thisSize , <NUM_LIT:0> , arraySize ) <EOL> return result <EOL> }

/**
 * Returns an array containing all elements of the original array and then all elements of the given [elements] array.
 */


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


public fun Array < out ComplexFloat > . toComplexFloatArray ( ) : ComplexFloatArray

= <EOL> ComplexFloatArray ( size ) { index -> this [ index ] }

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


public fun Array < out ComplexDouble > . toComplexDoubleArray ( ) : ComplexDoubleArray

= <EOL> ComplexDoubleArray ( size ) { index -> this [ index ] }

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


public fun FloatArray . toComplexFloatArray ( ) : ComplexFloatArray

= <EOL> ComplexFloatArray ( size ) . apply { this@toComplexFloatArray . copyInto ( this . getFlatArray ( ) ) }


public fun DoubleArray . toComplexDoubleArray ( ) : ComplexDoubleArray

= <EOL> ComplexDoubleArray ( size ) . apply { this@toComplexDoubleArray . copyInto ( this . getFlatArray ( ) ) }


public fun Collection < ComplexFloat > . toComplexFloatArray ( ) : ComplexFloatArray

{ <EOL> val result = ComplexFloatArray ( size ) <EOL> var index = <NUM_LIT:0> <EOL> for ( element in this ) <EOL> result [ index ++ ] = element <EOL> return result <EOL> }

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


public fun Collection < ComplexDouble > . toComplexDoubleArray ( ) : ComplexDoubleArray

{ <EOL> val result = ComplexDoubleArray ( size ) <EOL> var index = <NUM_LIT:0> <EOL> for ( element in this ) <EOL> result [ index ++ ] = element <EOL> return result <EOL> }


@ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> public fun ComplexFloatArray . toTypedArray ( ) : Array < ComplexFloat >

{ <EOL> val result = arrayOfNulls < ComplexFloat > ( size ) <EOL> for ( index in indices ) <EOL> result [ index ] = this [ index ] <EOL> return result as Array < ComplexFloat > <EOL> }

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


@ Suppress ( "<STR_LIT:UNCHECKED_CAST>" ) <EOL> public fun ComplexDoubleArray . toTypedArray ( ) : Array < ComplexDouble >

{ <EOL> val result = arrayOfNulls < ComplexDouble > ( size ) <EOL> for ( index in indices ) <EOL> result [ index ] = this [ index ] <EOL> return result as Array < ComplexDouble > <EOL> }


public inline fun < K , V > ComplexFloatArray . associate ( transform : ( ComplexFloat ) -> Pair < K , V > ) : Map < K , V >

{ <EOL> val capacity = mapCapacity ( size ) . coerceAtLeast ( <NUM_LIT:16> ) <EOL> return associateTo ( LinkedHashMap ( capacity ) , transform ) <EOL> }

/**
 * Returns a [Map] containing key-value pairs provided by [transform] function
 * applied to elements of the given array.
 *
 * If any of two pairs would have the same key the last one gets added to the map.
 *
 * The returned map preserves the entry iteration order of the original array.
 */


public inline fun < K , V > ComplexDoubleArray . associate ( transform : ( ComplexDouble ) -> Pair < K , V > ) : Map < K , V >


public inline fun < K > ComplexFloatArray . associateBy ( keySelector : ( ComplexFloat ) -> K ) : Map < K , ComplexFloat >

{ <EOL> val capacity = mapCapacity ( size ) . coerceAtLeast ( <NUM_LIT:16> ) <EOL> return associateByTo ( LinkedHashMap ( capacity ) , keySelector ) <EOL> }

/**
 * Returns a [Map] containing the elements from the given array indexed by the key
 * returned from [keySelector] function applied to each element.
 *
 * If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
 *
 * The returned map preserves the entry iteration order of the original array.
 */


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


public inline fun < K , V > ComplexFloatArray . associateBy ( keySelector : ( ComplexFloat ) -> K , valueTransform : ( ComplexFloat ) -> V ) : Map < K , V >

{ <EOL> val capacity = mapCapacity ( size ) . coerceAtLeast ( <NUM_LIT:16> ) <EOL> return associateByTo ( LinkedHashMap ( capacity ) , keySelector , valueTransform ) <EOL> }

/**
 * Returns a [Map] containing the values provided by [valueTransform] and indexed by [keySelector] functions applied to elements of the given array.
 *
 * If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
 *
 * The returned map preserves the entry iteration order of the original array.
 */


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


public inline fun < K , M : MutableMap < in K , in ComplexFloat > > ComplexFloatArray . associateByTo ( destination : M , keySelector : ( ComplexFloat ) -> K ) : M

{ <EOL> for ( element in this ) { <EOL> destination . put ( keySelector ( element ) , element ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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.
 *
 * If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
 */


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


public inline fun < K , V , M : MutableMap < in K , in V > > ComplexFloatArray . associateByTo ( destination : M , keySelector : ( ComplexFloat ) -> K , valueTransform : ( ComplexFloat ) -> V ) : M

{ <EOL> for ( element in this ) { <EOL> destination . put ( keySelector ( element ) , valueTransform ( element ) ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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.
 *
 * If any two elements would have the same key returned by [keySelector] the last one gets added to the map.
 */


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


public inline fun < K , V , M : MutableMap < in K , in V > > ComplexFloatArray . associateTo ( destination : M , transform : ( ComplexFloat ) -> Pair < K , V > ) : M

{ <EOL> for ( element in this ) { <EOL> destination += transform ( element ) <EOL> } <EOL> return destination <EOL> }

/**
 * Populates and returns the [destination] mutable map with key-value pairs
 * provided by [transform] function applied to each element of the given array.
 *
 * If any of two pairs would have the same key the last one gets added to the map.
 */


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


public inline fun < V > ComplexFloatArray . associateWith ( valueSelector : ( ComplexFloat ) -> V ) : Map < ComplexFloat , V >

{ <EOL> val result = LinkedHashMap < ComplexFloat , V > ( mapCapacity ( size ) . coerceAtLeast ( <NUM_LIT:16> ) ) <EOL> return associateWithTo ( result , valueSelector ) <EOL> }

/**
 * Returns a [Map] where keys are elements from the given array and values are
 * produced by the [valueSelector] function applied to each element.
 *
 * If any two elements are equal, the last one gets added to the map.
 *
 * The returned map preserves the entry iteration order of the original array.
 */


public inline fun < V > ComplexDoubleArray . associateWith ( valueSelector : ( ComplexDouble ) -> V ) : Map < ComplexDouble , V >

{ <EOL> val result = LinkedHashMap < ComplexDouble , V > ( mapCapacity ( size ) . coerceAtLeast ( <NUM_LIT:16> ) ) <EOL> return associateWithTo ( result , valueSelector ) <EOL> }


public inline fun < V , M : MutableMap < in ComplexFloat , in V > > ComplexFloatArray . associateWithTo ( destination : M , valueSelector : ( ComplexFloat ) -> V ) : M

{ <EOL> for ( element in this ) { <EOL> destination . put ( element , valueSelector ( element ) ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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.
 *
 * If any two elements are equal, the last one overwrites the former value in the map.
 */


public inline fun < V , M : MutableMap < in ComplexDouble , in V > > ComplexDoubleArray . associateWithTo ( destination : M , valueSelector : ( ComplexDouble ) -> V ) : M


public fun < C : MutableCollection < in ComplexFloat > > ComplexFloatArray . toCollection ( destination : C ) : C

{ <EOL> for ( item in this ) { <EOL> destination . add ( item ) <EOL> } <EOL> return destination <EOL> }

/**
 * Appends all elements to the given [destination] collection.
 */


public fun < C : MutableCollection < in ComplexDouble > > ComplexDoubleArray . toCollection ( destination : C ) : C


public fun ComplexFloatArray . toHashSet ( ) : HashSet < ComplexFloat >

{ <EOL> return toCollection ( HashSet ( mapCapacity ( size ) ) ) <EOL> }

/**
 * Returns a new [HashSet] of all elements.
 */


public fun ComplexDoubleArray . toHashSet ( ) : HashSet < ComplexDouble >


public fun ComplexFloatArray . toList ( ) : List < ComplexFloat >

{ <EOL> return when ( size ) { <EOL> <NUM_LIT:0> -> emptyList ( ) <EOL> <NUM_LIT:1> -> listOf ( this [ <NUM_LIT:0> ] ) <EOL> else -> this . toMutableList ( ) <EOL> } <EOL> }

/**
 * Returns a [List] containing all elements.
 */


public fun ComplexDoubleArray . toList ( ) : List < ComplexDouble >


public fun ComplexFloatArray . toMutableList ( ) : MutableList < ComplexFloat >

{ <EOL> val list = ArrayList < ComplexFloat > ( size ) <EOL> for ( item in this ) list . add ( item ) <EOL> return list <EOL> }

/**
 * Returns a new [MutableList] filled with all elements of this array.
 */


public fun ComplexDoubleArray . toMutableList ( ) : MutableList < ComplexDouble >

{ <EOL> val list = ArrayList < ComplexDouble > ( size ) <EOL> for ( item in this ) list . add ( item ) <EOL> return list <EOL> }


public fun ComplexFloatArray . toSet ( ) : Set < ComplexFloat >

{ <EOL> return when ( size ) { <EOL> <NUM_LIT:0> -> emptySet ( ) <EOL> <NUM_LIT:1> -> setOf ( this [ <NUM_LIT:0> ] ) <EOL> else -> toCollection ( LinkedHashSet ( mapCapacity ( size ) ) ) <EOL> } <EOL> }

/**
 * Returns a [Set] of all elements.
 *
 * The returned set preserves the element iteration order of the original array.
 */


public fun ComplexDoubleArray . toSet ( ) : Set < ComplexDouble >


public inline fun < R > ComplexFloatArray . flatMap ( transform : ( ComplexFloat ) -> Iterable < R > ) : List < R >

{ <EOL> return flatMapTo ( ArrayList ( ) , transform ) <EOL> }

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


public inline fun < R > ComplexDoubleArray . flatMap ( transform : ( ComplexDouble ) -> Iterable < R > ) : List < R >


public inline fun < R > ComplexFloatArray . flatMapIndexed ( transform : ( index : Int , ComplexFloat ) -> Iterable < R > ) : List < R >

= <EOL> flatMapIndexedTo ( ArrayList ( ) , transform )

/**
 * 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.
 */


public inline fun < R > ComplexDoubleArray . flatMapIndexed ( transform : ( index : Int , ComplexDouble ) -> Iterable < R > ) : List < R >


public inline fun < R , C : MutableCollection < in R > > ComplexFloatArray . flatMapIndexedTo ( destination : C , transform : ( index : Int , ComplexFloat ) -> Iterable < R > ) : C

{ <EOL> var index = <NUM_LIT:0> <EOL> for ( element in this ) { <EOL> val list = transform ( index ++ , element ) <EOL> destination . addAll ( list ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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].
 */


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


public inline fun < R , C : MutableCollection < in R > > ComplexFloatArray . flatMapTo ( destination : C , transform : ( ComplexFloat ) -> Iterable < R > ) : C

{ <EOL> for ( element in this ) { <EOL> val list = transform ( element ) <EOL> destination . addAll ( list ) <EOL> } <EOL> return destination <EOL> }

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


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


public inline fun < K > ComplexFloatArray . groupBy ( keySelector : ( ComplexFloat ) -> K ) : Map < K , List < ComplexFloat > >

{ <EOL> return groupByTo ( LinkedHashMap ( ) , keySelector ) <EOL> }

/**
 * 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.
 *
 * The returned map preserves the entry iteration order of the keys produced from the original array.
 */


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


public inline fun < K , V > ComplexFloatArray . groupBy ( keySelector : ( ComplexFloat ) -> K , valueTransform : ( ComplexFloat ) -> V ) : Map < K , List < V > >

{ <EOL> return groupByTo ( LinkedHashMap ( ) , keySelector , valueTransform ) <EOL> }

/**
 * 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.
 *
 * The returned map preserves the entry iteration order of the keys produced from the original array.
 */


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


public inline fun < K , M : MutableMap < in K , MutableList < ComplexFloat > > > ComplexFloatArray . groupByTo ( destination : M , keySelector : ( ComplexFloat ) -> K ) : M

{ <EOL> for ( element in this ) { <EOL> val key = keySelector ( element ) <EOL> val list = destination . getOrPut ( key ) { ArrayList ( ) } <EOL> list . add ( element ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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.
 *
 * @return The [destination] map.
 */


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


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

{ <EOL> for ( element in this ) { <EOL> val key = keySelector ( element ) <EOL> val list = destination . getOrPut ( key ) { ArrayList ( ) } <EOL> list . add ( valueTransform ( element ) ) <EOL> } <EOL> return destination <EOL> }

/**
 * 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.
 *
 * @return The [destination] map.
 */


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


public inline fun < R > ComplexFloatArray . map ( transform : ( ComplexFloat ) -> R ) : List < R >

{ <EOL> return mapTo ( ArrayList ( size ) , transform ) <EOL> }

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


public inline fun < R > ComplexDoubleArray . map ( transform : ( ComplexDouble ) -> R ) : List < R >


public inline fun < R > ComplexFloatArray . mapIndexed ( transform : ( index : Int , ComplexFloat ) -> R ) : List < R >

{ <EOL> return mapIndexedTo ( ArrayList ( size ) , transform ) <EOL> }

/**
 * Returns a list containing the results of applying the given [transform] function
 * to each element and its index in the original array.
 * @param [transform] function that takes the index of an element and the element itself
 * and returns the result of the transform applied to the element.
 */


public inline fun < R > ComplexDoubleArray . mapIndexed ( transform : ( index : Int , ComplexDouble ) -> R ) : List < R >


public inline fun < R , C : MutableCollection < in R > > ComplexFloatArray . mapIndexedTo ( destination : C , transform : ( index : Int , ComplexFloat ) -> R ) : C

{ <EOL> var index = <NUM_LIT:0> <EOL> for ( item in this ) <EOL> destination . add ( transform ( index ++ , item ) ) <EOL> return destination <EOL> }

/**
 * Applies the given [transform] function to each element and its index in the original array
 * and appends the results to the given [destination].
 * @param [transform] function that takes the index of an element and the element itself
 * and returns the result of the transform applied to the element.
 */


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


public inline fun < R , C : MutableCollection < in R > > ComplexFloatArray . mapTo ( destination : C , transform : ( ComplexFloat ) -> R ) : C

{ <EOL> for ( item in this ) <EOL> destination . add ( transform ( item ) ) <EOL> return destination <EOL> }

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


public inline fun < R , C : MutableCollection < in R > > ComplexDoubleArray . mapTo ( destination : C , transform : ( ComplexDouble ) -> R ) : C


public fun ComplexFloatArray . withIndex ( ) : Iterable < IndexedValue < ComplexFloat > >

= <EOL> object : Iterable < IndexedValue < ComplexFloat > > { <EOL> override fun iterator ( ) : Iterator < IndexedValue < ComplexFloat > > = object : Iterator < IndexedValue < ComplexFloat > > { <EOL> private var index = <NUM_LIT:0> <EOL> private val iterator = this@withIndex . iterator ( ) <EOL> override fun hasNext ( ) : Boolean = iterator . hasNext ( ) <EOL> override fun next ( ) : IndexedValue < ComplexFloat > = <EOL> IndexedValue ( if ( index ++ < <NUM_LIT:0> ) throw ArithmeticException ( "<STR_LIT>" ) else index , iterator . next ( ) ) <EOL> } <EOL> }

/**
 * 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.
 */


public fun ComplexDoubleArray . withIndex ( ) : Iterable < IndexedValue < ComplexDouble > >

= <EOL> object : Iterable < IndexedValue < ComplexDouble > > { <EOL> override fun iterator ( ) : Iterator < IndexedValue < ComplexDouble > > = <EOL> object : Iterator < IndexedValue < ComplexDouble > > { <EOL> private var index = <NUM_LIT:0> <EOL> private val iterator = this@withIndex . iterator ( ) <EOL> override fun hasNext ( ) : Boolean = iterator . hasNext ( ) <EOL> override fun next ( ) : IndexedValue < ComplexDouble > = <EOL> IndexedValue ( if ( index ++ < <NUM_LIT:0> ) throw ArithmeticException ( "<STR_LIT>" ) else index , iterator . next ( ) ) <EOL> } <EOL> }


public fun ComplexFloatArray . distinct ( ) : List < ComplexFloat >

{ <EOL> return this . toMutableSet ( ) . toList ( ) <EOL> }

/**
 * Returns a list containing only distinct elements from the given array.
 *
 * The elements in the resulting list are in the same order as they were in the source array.
 */


public fun ComplexDoubleArray . distinct ( ) : List < ComplexDouble >


public inline fun < K > ComplexFloatArray . distinctBy ( selector : ( ComplexFloat ) -> K ) : List < ComplexFloat >

{ <EOL> val set = HashSet < K > ( ) <EOL> val list = ArrayList < ComplexFloat > ( ) <EOL> for ( e in this ) { <EOL> val key = selector ( e ) <EOL> if ( set . add ( key ) ) <EOL> list . add ( e ) <EOL> } <EOL> return list <EOL> }

/**
 * Returns a list containing only elements from the given array
 * having distinct keys returned by the given [selector] function.
 *
 * The elements in the resulting list are in the same order as they were in the source array.
 */


public inline fun < K > ComplexDoubleArray . distinctBy ( selector : ( ComplexDouble ) -> K ) : List < ComplexDouble >

{ <EOL> val set = HashSet < K > ( ) <EOL> val list = ArrayList < ComplexDouble > ( ) <EOL> for ( e in this ) { <EOL> val key = selector ( e ) <EOL> if ( set . add ( key ) ) <EOL> list . add ( e ) <EOL> } <EOL> return list <EOL> }


public infix fun ComplexFloatArray . intersect ( other : Iterable < ComplexFloat > ) : Set < ComplexFloat >

{ <EOL> val set = this . toMutableSet ( ) <EOL> set . retainAll ( other ) <EOL> return set <EOL> }

/**
 * Returns a set containing all elements that are contained by both this array and the specified collection.
 *
 * The returned set preserves the element iteration order of the original array.
 *
 * To get a set containing all elements that are contained at least in one of these collections use [union].
 */


public infix fun ComplexDoubleArray . intersect ( other : Iterable < ComplexDouble > ) : Set < ComplexDouble >


public infix fun ComplexFloatArray . subtract ( other : Iterable < ComplexFloat > ) : Set < ComplexFloat >

{ <EOL> val set = this . toMutableSet ( ) <EOL> set . removeAll ( other ) <EOL> return set <EOL> }

/**
 * Returns a set containing all elements that are contained by this array and not contained by the specified collection.
 *
 * The returned set preserves the element iteration order of the original array.
 */


public infix fun ComplexDoubleArray . subtract ( other : Iterable < ComplexDouble > ) : Set < ComplexDouble >


public fun ComplexFloatArray . toMutableSet ( ) : MutableSet < ComplexFloat >

{ <EOL> return toCollection ( LinkedHashSet ( mapCapacity ( size ) ) ) <EOL> }

/**
 * Returns a new [MutableSet] containing all distinct elements from the given array.
 *
 * The returned set preserves the element iteration order of the original array.
 */


public fun ComplexDoubleArray . toMutableSet ( ) : MutableSet < ComplexDouble >


public infix fun ComplexFloatArray . union ( other : Iterable < ComplexFloat > ) : Set < ComplexFloat >

{ <EOL> val set = this . toMutableSet ( ) <EOL> set . addAll ( other ) <EOL> return set <EOL> }

/**
 * Returns a set containing all distinct elements from both collections.
 *
 * The returned set preserves the element iteration order of the original array.
 * Those elements of the [other] collection that are unique are iterated in the end
 * in the order of the [other] collection.
 *
 * To get a set containing all elements that are contained in both collections use [intersect].
 */


public infix fun ComplexDoubleArray . union ( other : Iterable < ComplexDouble > ) : Set < ComplexDouble >


public inline fun ComplexFloatArray . all ( predicate : ( ComplexFloat ) -> Boolean ) : Boolean

{ <EOL> for ( element in this ) if ( ! predicate ( element ) ) return false <EOL> return true <EOL> }

/**
 * Returns `true` if all elements match the given [predicate].
 */


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


public fun ComplexFloatArray . any ( ) : Boolean

= ! isEmpty ( )

/**
 * Returns `true` if array has at least one element.
 */


public fun ComplexDoubleArray . any ( ) : Boolean

= ! isEmpty ( )


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

{ <EOL> for ( element in this ) if ( predicate ( element ) ) return true <EOL> return false <EOL> }

/**
 * Returns `true` if at least one element matches the given [predicate].
 */


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


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexFloatArray . count ( ) : Int

= size

/**
 * Returns the number of elements in this array.
 */


@ Suppress ( "<STR_LIT:NOTHING_TO_INLINE>" ) <EOL> public inline fun ComplexDoubleArray . count ( ) : Int

= size


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

{ <EOL> var count = <NUM_LIT:0> <EOL> for ( element in this ) if ( predicate ( element ) ) ++ count <EOL> return count <EOL> }

/**
 * Returns the number of elements matching the given [predicate].
 */


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