Factorial

Below is a browsable image of the model.

  • For an executable version,
  • To view or save the MoML file for this model, click here.
Factorialmodel <h2>SDF Director</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>iterations</td><td>10</td><td>10</td></tr><tr><td>vectorizationFactor</td><td>1</td><td>1</td></tr><tr><td>allowDisconnectedGraphs</td><td>false</td><td>false</td></tr><tr><td>allowRateChanges</td><td>false</td><td>false</td></tr><tr><td>constrainBufferSizes</td><td>true</td><td>true</td></tr><tr><td>period</td><td>0.0</td><td>0.0</td></tr><tr><td>synchronizeToRealTime</td><td>false</td><td>false</td></tr><tr><td>startTime</td><td>&nbsp;</td><td>null</td></tr><tr><td>stopTime</td><td>&nbsp;</td><td>null</td></tr></table> <h2>Display</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>rowsDisplayed</td><td>10</td><td>10</td></tr><tr><td>columnsDisplayed</td><td>40</td><td>40</td></tr><tr><td>suppressBlankLines</td><td>false</td><td>false</td></tr><tr><td>title</td><td>&nbsp;</td><td>&nbsp;</td></tr></table> <h2>Ramp</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>init</td><td>0</td><td>0</td></tr><tr><td>step</td><td>1</td><td>1</td></tr><tr><td>firingCountLimit</td><td>NONE</td><td>0</td></tr></table> <h2>JavaScript</h2><table border="1"><tr><td><b>Parameter</b></td><td><b>Expression</b></td><td><b>Value</b></td></tr><tr><td>script</td><td>function fire() {\\n  var value = get(input);\\n  if (value &lt; 0) {\\n     error(&quot;Input must be greater than or equal to 0.&quot;);\\n  } else {\\n     var total = 1;\\n     while(value &gt; 1) {\\n       total *= value;\\n       value--;\\n     }\\n     send(total, output);\\n  }\\n}</td><td>function fire() {\\n  var value = get(input);\\n  if (value &lt; 0) {\\n     error(&quot;Input must be greater than or equal to 0.&quot;);\\n  } else {\\n     var total = 1;\\n     while(value &gt; 1) {\\n       total *= value;\\n       value--;\\n     }\\n     send(total, output);\\n  }\\n}</td></tr></table>