function complexMap( x, indices, mode, out, stride, offset, clbk ) {
	var getIndex;
	var idata;
	var iget;
	var max;
	var io;
	var so;
	var i;
	var j;
	var k;

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

	// Resolve a function for returning an index according to the specified index mode:
	getIndex = ind( mode );

	// Resolve the maximum index:
	max = ( x.length/2 ) - 1; // resolve the length of the original complex array

	// Extract each desired element from the provided array...
	so = stride * 2; // note: multiply by 2, as real-valued array consists of interleaved real and imaginary components
	io = offset * 2;
	for ( i = 0; i < idata.length; i++ ) {
		j = getIndex( iget( idata, i ), max );
		k = j * 2;

		// eslint-disable-next-line no-useless-call
		out[ io ] = clbk.call( null, x[ k ], k );

		// eslint-disable-next-line no-useless-call
		out[ io+1 ] = clbk.call( null, x[ k+1 ], k+1 );
		io += so;
	}
	return out;
}
Takes elements from a complex array and assigns the values to elements in a complex output array.

@private
@param {Collection} x - real-valued floating-point input array view
@param {Object} indices - index array object
@param {string} mode - index mode
@param {Collection} out - real-valued floating-point output array view
@param {integer} stride - output array stride
@param {NonNegativeInteger} offset - output array offset
@param {Function} clbk - callback function applied to each selected element
@returns {Collection} output array view

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

var x = new Float64Array( [ 1.0, 2.0, 3.0, 4.0 ] );
var indices = [ 0, 0, 1, 1 ];

var out = new Float64Array( 8 );

function clbk(val){
	return val;
}

var arr = complexMap( x, arraylike2object( indices ), 'throw', out, 1, 0, clbk );
// returns <Float64Array>[ 1.0, 2.0, 1.0, 2.0, 3.0, 4.0, 3.0, 4.0 ]