function complex( x, indices, values, stride, getIndex, maxIndex ) {
	var idata;
	var iget;
	var iv;
	var sv;
	var i;
	var j;
	var k;

	idata = indices.data;
	iget = indices.accessors[ 0 ];

	sv = stride * 2; // note: multiply by 2, as real-valued values array consists of interleaved real and imaginary components
	iv = 0;
	for ( i = 0; i < idata.length; i++ ) {
		j = getIndex( iget( idata, i ), maxIndex );
		k = j * 2;
		x[ k ] = values[ iv ];
		x[ k+1 ] = values[ iv+1 ];
		iv += sv;
	}
	return x;
}
Replaces elements in a complex array with provided values.

@private
@param {Collection} x - real-valued floating-point input array view
@param {Object} indices - index array object
@param {Collection} values - real-valued floating-point values array view
@param {NonNegativeInteger} stride - index stride for accessing elements in `values`
@param {Function} getIndex - function for resolving an array index
@param {NonNegativeInteger} maxIndex - maximum array index (inclusive)
@returns {Collection} input array view

@example
var Float64Array = require( '@stdlib/array/float64' );
var arraylike2object = require( '@stdlib/array/base/arraylike2object' );
var ind = require( '@stdlib/ndarray/base/ind' ).factory;

var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0, 8.0 ] );

var indices = [ 0, 2 ];
var values = new Float64Array( [ 10.0, 20.0, 50.0, 60.0 ] );

var getIndex = ind( 'throw' );

var out = complex( x, arraylike2object( indices ), values, 1, getIndex, x.length-1 );
// returns <Float64Array>[ 10.0, 20.0, 3.0, 4.0, 50.0, 60.0, 7.0, 8.0 ]