<?xml version="1.0" encoding="utf-8" standalone="yes"?>

<?xml-stylesheet href="./_c74_ref.xsl" type="text/xsl"?>

<!--This is an automatically generated file. DO NOT EDIT THIS FILE DIRECTLY. Rather, use the _ref.xml files found in the 'edits' folder.-->
<c74object name="array.sort" module="max" category="Array">
	<digest>
		Sort the elements of an array object according to a test.
	</digest>
	<description>
		Each pair of entries is output, the user compares them and then passes a 1 (left is &gt; right) or a 0 (left is &lt;= right) to determine a final sorted order.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			array
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="INLET_TYPE">
			<digest>
				array in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="INLET_TYPE">
			<digest>
				sort comparison response (0/1)
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="OUTLET_TYPE">
			<digest>
				sorted array out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="OUTLET_TYPE">
			<digest>
				sort comparison output 1
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="2" type="OUTLET_TYPE">
			<digest>
				sort comparison output 2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--ARGUMENTS-->
	<objarglist>
		<objarg id="0" name="OBJARG_NAME" type="OBJARG_TYPE" optional="0">
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</objarg>
	</objarglist>
	<!--MESSAGES-->
	<methodlist>
		<method name="bang">
			<arglist />
			<digest>
				Trigger output
			</digest>
			<description>
				Reprocess previously received arrays and trigger output.
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="value" type="int" optional="0" />
			</arglist>
			<digest>
				Convert an integer to an array.
			</digest>
			<description>
				Convert an incoming integer to an array, then process as described for the <m>array</m> message.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="value" type="float" optional="0" />
			</arglist>
			<digest>
				Convert a floating-point number to an array.
			</digest>
			<description>
				Convert an incoming floating-point number to an array, then process as described for the <m>array</m> message.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="list-value" type="list" optional="0" />
			</arglist>
			<digest>
				Convert a list to an array.
			</digest>
			<description>
				Convert an incoming list to an array, then process as described for the <m>array</m> message.
			</description>
		</method>
		<method name="anything">
			<arglist>
				<arg name="list-value" type="list" optional="0" />
			</arglist>
			<digest>
				Convert a list to an array.
			</digest>
			<description>
				Convert an incoming list to an array, then process as described for the <m>array</m> message.
			</description>
		</method>
		<method name="array">
			<arglist>
				<arg name="ARG_NAME_0" type="list" optional="0" />
			</arglist>
			<digest>
				Sort the elements of the array.
			</digest>
			<description>
				Pairs of array elements will be output from the second and third outlets. Compare them and send the result to the rightmost inlet, sending a 1 if the left is greater than the right, or a 0 if the right is greater than or equal to the left. Finally, the object will output the sorted result. The input array is not modified, but a sorted copy is output.
			</description>
		</method>
		<method name="cancel">
			<arglist />
			<digest>
				TEXT_HERE
			</digest>
			<description>
				TEXT_HERE
			</description>
		</method>
		<method name="dictionary">
			<arglist>
				<arg name="dictionary-value" type="list" optional="0" />
			</arglist>
			<digest>
				Wrap a dictionary object in an array.
			</digest>
			<description>
				Wrap an incoming dictionary object in an array, then process as described for the <m>array</m> message.
			</description>
		</method>
		<method name="in1">
			<arglist>
				<arg name="ARG_NAME_0" type="int" optional="0" />
			</arglist>
			<digest>
				Record the comparison result.
			</digest>
			<description>
				As you compare each two elements of the array, send the comparison result to the rightmost inlet.
			</description>
		</method>
		<method name="string">
			<arglist>
				<arg name="string-value" type="list" optional="0" />
			</arglist>
			<digest>
				Wrap a string object in an array.
			</digest>
			<description>
				Wrap a string object in an array, then process as described for the <m>array</m> message.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="simple" get="1" set="1" type="int" size="1">
			<digest>
				Simple sorting mode
			</digest>
			<description>
				TEXT_HERE
			</description>
			<attributelist>
				<attribute name="enumvals" get="1" set="1" type="atom" size="3">
					<enumlist>
						<enum name="Off">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Ascending">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
						<enum name="Descending">
							<digest>
								TEXT_HERE
							</digest>
							<description>
								TEXT_HERE
							</description>
						</enum>
					</enumlist>
				</attribute>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Simple sorting mode" />
				<attribute name="style" get="1" set="1" type="symbol" size="1" value="enumindex" />
			</attributelist>
		</attribute>
	</attributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example caption="" img="" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="array" />
		<seealso name="array.filter" />
		<seealso name="array.map" />
		<seealso name="array.reverse" />
		<seealso name="coll" />
		<seealso name="zl.sort" />
	</seealsolist>
	<discussion>
		Similar to <o>array.map</o> and <o>array.reduce</o>, as the object iterates over the elements of the array, send a value to the rightmost inlet to finish processing each pair, until the final result is determined.
	</discussion>
</c74object>
