FUNCTIONS // 
FUNCTION: sort( vector )
Sorts a data vector.

@private
@param {array} vector - data 1d array
@returns {array} sorted array (ascending)
function sort( vector ) {
		// Indexify the vector...
		var dat = new Array( vector.length );
		for ( var i = 0; i < vector.length; i++ ) {
			dat[ i ] = [ i, vector[i] ];
		}
		// Sort the data array:
		dat.sort( ascending );
		return dat;
	}