<?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="jit.expr" module="jit" category="Jitter Math">
	<digest>
		Evaluate an expression to fill a matrix
	</digest>
	<description>
		Evaluates expressions to fill an output matrix. The expression can contain any operator available from within <o>jit.op</o>, any functor available from within <o>jit.bfg</o>, and many jitter MOPs. A variable number of inputs can be specified with an attribute argument setting the <at>inputs</at> attribute.
	</description>
	<!--METADATA-->
	<metadatalist>
		<metadata name="author">
			Cycling '74
		</metadata>
		<metadata name="tag">
			Jitter
		</metadata>
		<metadata name="tag">
			Jitter Math
		</metadata>
	</metadatalist>
	<!--INLETS-->
	<inletlist>
		<inlet id="0" type="matrix">
			<digest>
				in
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
		<inlet id="1" type="matrix">
			<digest>
				in2
			</digest>
			<description>
				TEXT_HERE
			</description>
		</inlet>
	</inletlist>
	<!--OUTLETS-->
	<outletlist>
		<outlet id="0" type="matrix">
			<digest>
				out
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
		<outlet id="1" type="matrix">
			<digest>
				dumpout
			</digest>
			<description>
				TEXT_HERE
			</description>
		</outlet>
	</outletlist>
	<!--MOP-->
	<mop matrixinputcount="-1" matrixoutputcount="1">
		<matrixoutput name="out" planelink="1" typelink="1" dimlink="1" minplanecount="1" maxplanecount="32" mindimcount="1" maxdimcount="32">
			<types>
				char long float32 float64
			</types>
		</matrixoutput>
	</mop>
	<!--MESSAGES-->
	<methodlist>
		<method name="int">
			<arglist />
			<digest>
				Treat data as int cells
			</digest>
			<description>
				Sets all matrix cells corresponding with input to <m>int</m>.
			</description>
		</method>
		<method name="float">
			<arglist />
			<digest>
				Treat data as float cells
			</digest>
			<description>
				Sets all matrix cells corresponding with input to <m>float</m>.
			</description>
		</method>
		<method name="list">
			<arglist>
				<arg name="input" optional="0" type="list" />
			</arglist>
			<digest>
				Treat list as per-plane data
			</digest>
			<description>
				Sets all matrix cells corresponding with input to list, on a per plane basis.
			</description>
		</method>
	</methodlist>
	<jittermethodlist>
		<jittermethod name="bang" />
		<jittermethod name="clear" />
		<jittermethod name="exportattrs" />
		<jittermethod name="exportsummary" />
		<jittermethod name="getattributes" />
		<jittermethod name="getstate" />
		<jittermethod name="jit_matrix" />
		<jittermethod name="importattrs" />
		<jittermethod name="outputmatrix" />
		<jittermethod name="summary" />
	</jittermethodlist>
	<!--ATTRIBUTES-->
	<attributelist>
		<attribute name="cache" get="1" set="1" type="int" size="1">
			<digest>
				Cache intermediary values
			</digest>
			<description>
				Toggles the cache intermediary values flag. The default is 1 (on). It may be desirable to turn off when using generator operators such as <o>jit.noise</o> in the expression, which should not be cached.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Cache" />
			</attributelist>
		</attribute>
		<attribute name="expr" get="1" set="1" type="symbol" size="32">
			<digest>
				Executable expression
			</digest>
			<description>
				The expression to evaluate. If one expression is specified, it is evaluated for all planes. If multiple expressions are specified, they are evaluated on a plane by plane basis.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Expr" />
			</attributelist>
			<discussion>
				<p />
				For a list of valid operators see <o>jit.op</o> and <o>jit.bfg</o>.				<p />
				Special variables that may be used are:
				<br />
				<m>cell[0-31]</m> integer coordinate across dim
				<br />
				<m>norm[0-31]</m> normalized coordinate across dim
				<br />
				<m>snorm[0-31]</m> signed normalized coordinate across dim
				<br />
				<m>dim[0-31]</m> matrix size across dim
				<br />
				<m>in[0-31]</m> input matrix, corresponding plane
				<br />
				<m>in[0-31].p[0-31]</m> input matrix, specific plane
				<br />
				<m>matrixname</m> any named matrix, corresponding plane
				<br />
				<m>matrixname.p[0-31]</m> any named matrix, specific plane
				<br />
				<p />
				Special contants that may be used are:
				<br />
				<m>PI</m> 				<br />
				<m>TWOPI</m> 				<br />
				<m>HALFPI</m> 				<br />
				<m>INVPI</m> 1/PI
				<br />
				<m>DEGTORAD</m> TWOPI/360
				<br />
				<m>RADTODEG</m> 360/TWOPI
				<br />
				<m>E</m> Euler's constant
				<br />
				<m>LN2</m> natural log of 2
				<br />
				<m>LN10</m> natural log of 10
				<br />
				<m>LOG2E</m> log base 2 of Euler's constant
				<br />
				<m>LOG10E</m> log base 10 of Euler's constant
				<br />
				<m>SQRT2</m> square root of 2
				<br />
				<m>SQRT1_2</m> square root of 1/2
				<br />
			</discussion>
		</attribute>
		<attribute name="inputs" get="1" set="1" type="int" size="1">
			<digest>
				Input count
			</digest>
			<description>
				Input count (default = 2)
			</description>
		</attribute>
		<attribute name="precision" get="1" set="1" type="symbol" size="1">
			<digest>
				Internal precision
			</digest>
			<description>
				Sets the internal precision. The options are:
				<br />
				<br />
				float32 (the default)
				<br />
				float64
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Precision" />
			</attributelist>
		</attribute>
		<attribute name="verbose" get="1" set="1" type="int" size="1">
			<digest>
				Verbose printing mode
			</digest>
			<description>
				Toggles the printing of expression information to Max Console.
			</description>
			<attributelist>
				<attribute name="label" get="1" set="1" type="symbol" size="1" value="Verbose" />
			</attributelist>
		</attribute>
	</attributelist>
	<jitterattributelist>
		<jitterattribute name="outputmode" />
		<jitterattribute name="adapt" />
		<jitterattribute name="out_name" />
		<jitterattribute name="type" />
		<jitterattribute name="dim" />
		<jitterattribute name="planecount" />
	</jitterattributelist>
	<!--EXAMPLE-->
	<examplelist>
		<example img="jit.expr.png" />
	</examplelist>
	<!--SEEALSO-->
	<seealsolist>
		<seealso name="expr" />
		<seealso name="jit.charmap" />
		<seealso name="jit.op" />
		<seealso name="jit.bfg" />
		<seealso name="vexpr" />
		<seealso module="jit" name="jitterchapter39" type="tutorial" />
		<seealso module="jit" name="jitterchapter46" type="tutorial" />
	</seealsolist>
	<discussion>
		<b>Note:</b> The <o>jit.op</o> operators <m>&gt;p</m> and <m>&lt;p</m> are not recognized by the <o>jit.expr</o> parser. The expressions <m>gtp(<i>x</i>, <i>y</i>)</m> and <m>ltp(<i>x</i>, <i>y</i>)</m> may be used in their place.
		<br />
		<br />
		Expressions should be specified between double quotes, and different expressions can be evaluated per plane if multiple symbols are used for the <at>expr</at> attribute. There are special variables and constants which can be used within expressions listed below. All expressions are evaluated using floating point arithmetic, so they will be more precise, but often slower for computing char data. For optimal speed with char data, it is recommended to use <o>jit.charmap</o> where possible (perhaps filled with an evaluated expression).
	</discussion>
</c74object>
