function complex( x, mask, out, stride, offset ) {
	var mdata;
	var mget;
	var io;
	var so;
	var i;
	var j;

	mdata = mask.data;
	mget = mask.accessors[ 0 ];

	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 < mdata.length; i++ ) {
		if ( mget( mdata, i ) ) {
			j = i * 2;
			out[ io ] = x[ j ];
			out[ io+1 ] = x[ j+1 ];
			io += so;
		}
	}
	return out;
}
Applies a mask to a complex array and assigns unmasked values to elements in a complex output array.

@private
@param {Collection} x - real-valued floating-point input array view
@param {Object} mask - mask array object
@param {Collection} out - real-valued floating-point output array view
@param {integer} stride - output array stride
@param {NonNegativeInteger} offset - output array offset
@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, 5.0, 6.0, 7.0, 8.0 ] );
var mask = [ 0, 1, 0, 1 ];

var out = new Float64Array( 8 );

var arr = complex( x, arraylike2object( mask ), out, 1, 0 );
// returns <Float64Array>[ 3.0, 4.0, 7.0, 8.0, 0.0, 0.0, 0.0, 0.0 ]