<?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="mean" module="max" category="Math">
	<digest>
		Calculate a running average
	</digest>
	<description>
		Calculates the mean (average) of all the numbers it has received and outputs it.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Max
		</metadata>
		<metadata name="tag">
			math
		</metadata>
		<metadata name="reference">
			TEXT_HERE
		</metadata>
		<metadata name="license">
			TEXT_HERE
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="int/float/list">
			<digest>
				(int/float/list) Numbers to be averaged
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="int/float/list">
			<digest>
				(int/float/list) Numbers to be averaged
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="float">
			<digest>
				(float) Mean value
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="int">
			<digest>
				(int) Sample size
			</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>
				Output previous calculation
			</digest>
			<description>
				Sends out the previous output (the stored average value).
			</description>
		</method>
		<method name="int">
			<arglist>
				<arg name="input" optional="0" type="int" />
			</arglist>
			<digest>
				Calculate and cause output
			</digest>
			<description>
				The number is added to the sum of all numbers received up to that point, and the mean is sent out.
			</description>
		</method>
		<method name="float">
			<arglist>
				<arg name="input" optional="0" type="float" />
			</arglist>
			<digest>
				Calculate and cause output
			</digest>
			<description>
				The number is added to the sum of all numbers received up to that point, and the mean is sent out.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Calculate mean of list elements
			</digest>
			<description>
				The numbers in the list are added together, the sum is divided by the number of items in the list, and the mean is sent out. All previously received numbers are cleared from memory.
			</description>
		</method>
		<method name="clear">
			<arglist />
			<digest>
				Clear previous values
			</digest>
			<description>
				Resets the stored and calculated contents of the object to zero.
			</description>
		</method>
	</methodlist>
	<!--ATTRIBUTES-->
	<!--EXAMPLE-->
	<examplelist>
		<example img="mean.png" caption="Find the average value of many numbers" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="accum" />
		<seealso name="anal" />
		<seealso name="bag" />
		<seealso name="histo" />
		<seealso name="prob" />
	</seealsolist>
	<misc name="Output">
		<entry name="float">
			<description>
				Out left outlet: The mean (average) value of all numbers received up to that point, or of all the numbers received together in a list.
				<br />
				<br />
				Out right outlet: How many numbers have been included in the averaging process.
			</description>
		</entry>
		<entry name="int">
			<description>
				Out left outlet: The mean (average) value of all numbers received up to that point, or of all the numbers received together in a list.
				<br />
				<br />
				Out right outlet: How many numbers have been included in the averaging process.
			</description>
		</entry>
	</misc>
</c74object>
