propeller/docs/propeller.push.instructions.vector.html
2024-01-07 12:53:34 -05:00

25 lines
25 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html PUBLIC ""
"">
<html><head><meta charset="UTF-8" /><title>propeller.push.instructions.vector documentation</title><link rel="stylesheet" type="text/css" href="css/default.css" /><link rel="stylesheet" type="text/css" href="css/highlight.css" /><script type="text/javascript" src="js/highlight.min.js"></script><script type="text/javascript" src="js/jquery.min.js"></script><script type="text/javascript" src="js/page_effects.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div id="header"><h2>Generated by <a href="https://github.com/weavejester/codox">Codox</a></h2><h1><a href="index.html"><span class="project-title"><span class="project-name">Propeller</span> <span class="project-version">0.3.2</span></span></a></h1></div><div class="sidebar primary"><h3 class="no-link"><span class="inner">Project</span></h3><ul class="index-link"><li class="depth-1 "><a href="index.html"><div class="inner">Index</div></a></li></ul><h3 class="no-link"><span class="inner">Topics</span></h3><ul><li class="depth-1 "><a href="A_Guide_To_Propeller.html"><div class="inner"><span>A Guide to Propeller</span></div></a></li><li class="depth-1 "><a href="Adding_Genetic_Operators.html"><div class="inner"><span>Adding Genetic Operators</span></div></a></li><li class="depth-1 "><a href="Adding_Problem.html"><div class="inner"><span>Adding a Problem</span></div></a></li><li class="depth-1 "><a href="Adding_Selection_Method.html"><div class="inner"><span>Adding a Selection Method</span></div></a></li><li class="depth-1 "><a href="Additional_Instructions.html"><div class="inner"><span>Additional Instructions</span></div></a></li><li class="depth-1 "><a href="Downsampling_training_data.html"><div class="inner"><span># Downsample Functions</span></div></a></li><li class="depth-1 "><a href="Generating_Documentation.html"><div class="inner"><span>Generating Documentation for Propeller</span></div></a></li></ul><h3 class="no-link"><span class="inner">Namespaces</span></h3><ul><li class="depth-1"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>propeller</span></div></div></li><li class="depth-2 branch"><a href="propeller.downsample.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>downsample</span></div></a></li><li class="depth-2 branch"><a href="propeller.genome.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>genome</span></div></a></li><li class="depth-2 branch"><a href="propeller.gp.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gp</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>problems</span></div></div></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>PSB1</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.count-odds.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>count-odds</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.grade.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>grade</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB1.scrabble-score.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>scrabble-score</span></div></a></li><li class="depth-4"><a href="propeller.problems.PSB1.small-or-large.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>small-or-large</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree" style="top: -145px;"><span class="top" style="height: 154px;"></span><span class="bottom"></span></span><span>PSB2</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.basement.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>basement</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.bouncing-balls.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bouncing-balls</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.bowling.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bowling</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.camel-case.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>camel-case</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.dice-game.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>dice-game</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.find-pair.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>find-pair</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.fizz-buzz.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fizz-buzz</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.fuel-cost.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>fuel-cost</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.gcd.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>gcd</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.luhn.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>luhn</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.middle-character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>middle-character</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.paired-digits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>paired-digits</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.shopping-list.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>shopping-list</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.snow-day.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>snow-day</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.solve-boolean.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>solve-boolean</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.spin-words.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>spin-words</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.square-digits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>square-digits</span></div></a></li><li class="depth-4 branch"><a href="propeller.problems.PSB2.substitution-cipher.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>substitution-cipher</span></div></a></li><li class="depth-4"><a href="propeller.problems.PSB2.twitter.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>twitter</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.UBall5D.html"><div class="inner"><span class="tree" style="top: -610px;"><span class="top" style="height: 619px;"></span><span class="bottom"></span></span><span>UBall5D</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>boolean</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.boolean.mul3.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mul3</span></div></a></li><li class="depth-4"><a href="propeller.problems.boolean.mul4.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>mul4</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.complex-regression.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>complex-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.data-creation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>data-creation</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.float-regression.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>float-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.integer-regression.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>integer-regression</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.simple-classification.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simple-classification</span></div></a></li><li class="depth-3"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>software</span></div></div></li><li class="depth-4 branch"><a href="propeller.problems.software.number-io.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>number-io</span></div></a></li><li class="depth-4"><a href="propeller.problems.software.smallest.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>smallest</span></div></a></li><li class="depth-3 branch"><a href="propeller.problems.string-classification.html"><div class="inner"><span class="tree" style="top: -83px;"><span class="top" style="height: 92px;"></span><span class="bottom"></span></span><span>string-classification</span></div></a></li><li class="depth-3"><a href="propeller.problems.valiant.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>valiant</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree" style="top: -1230px;"><span class="top" style="height: 1239px;"></span><span class="bottom"></span></span><span>push</span></div></div></li><li class="depth-3"><a href="propeller.push.instructions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>instructions</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.bool.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>bool</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>character</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.code.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>code</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.input-output.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>input-output</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.numeric.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>numeric</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.parentheses.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>parentheses</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.polymorphic.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>polymorphic</span></div></a></li><li class="depth-4 branch"><a href="propeller.push.instructions.string.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>string</span></div></a></li><li class="depth-4 current"><a href="propeller.push.instructions.vector.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>vector</span></div></a></li><li class="depth-3 branch"><a href="propeller.push.interpreter.html"><div class="inner"><span class="tree" style="top: -300px;"><span class="top" style="height: 309px;"></span><span class="bottom"></span></span><span>interpreter</span></div></a></li><li class="depth-3 branch"><a href="propeller.push.limits.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>limits</span></div></a></li><li class="depth-3"><a href="propeller.push.state.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>state</span></div></a></li><li class="depth-2 branch"><a href="propeller.selection.html"><div class="inner"><span class="tree" style="top: -424px;"><span class="top" style="height: 433px;"></span><span class="bottom"></span></span><span>selection</span></div></a></li><li class="depth-2 branch"><a href="propeller.simplification.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>simplification</span></div></a></li><li class="depth-2"><div class="no-link"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>tools</span></div></div></li><li class="depth-3 branch"><a href="propeller.tools.calculus.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>calculus</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.character.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>character</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.distributions.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>distributions</span></div></a></li><li class="depth-3 branch"><a href="propeller.tools.math.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>math</span></div></a></li><li class="depth-3"><a href="propeller.tools.metrics.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>metrics</span></div></a></li><li class="depth-2 branch"><a href="propeller.utils.html"><div class="inner"><span class="tree" style="top: -176px;"><span class="top" style="height: 185px;"></span><span class="bottom"></span></span><span>utils</span></div></a></li><li class="depth-2"><a href="propeller.variation.html"><div class="inner"><span class="tree"><span class="top"></span><span class="bottom"></span></span><span>variation</span></div></a></li></ul></div><div class="sidebar secondary"><h3><a href="#top"><span class="inner">Public Vars</span></a></h3><ul><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_butlast"><div class="inner"><span>_butlast</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_concat"><div class="inner"><span>_concat</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_conj"><div class="inner"><span>_conj</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_contains"><div class="inner"><span>_contains</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_emptyvector"><div class="inner"><span>_emptyvector</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_first"><div class="inner"><span>_first</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_indexof"><div class="inner"><span>_indexof</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_iterate"><div class="inner"><span>_iterate</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_last"><div class="inner"><span>_last</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_length"><div class="inner"><span>_length</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_nth"><div class="inner"><span>_nth</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_occurrencesof"><div class="inner"><span>_occurrencesof</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_pushall"><div class="inner"><span>_pushall</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_remove"><div class="inner"><span>_remove</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_replace"><div class="inner"><span>_replace</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_replacefirst"><div class="inner"><span>_replacefirst</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_rest"><div class="inner"><span>_rest</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_reverse"><div class="inner"><span>_reverse</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_set"><div class="inner"><span>_set</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_subvec"><div class="inner"><span>_subvec</span></div></a></li><li class="depth-1"><a href="propeller.push.instructions.vector.html#var-_take"><div class="inner"><span>_take</span></div></a></li></ul></div><div class="namespace-docs" id="content"><h1 class="anchor" id="top">propeller.push.instructions.vector</h1><div class="doc"><div class="markdown"><p>VECTOR instructions for all vector element subtypes: BOOLEAN, FLOAT, INTEGER, and STRING.</p>
</div></div><div class="public anchor" id="var-_butlast"><h3>_butlast</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the butlast of the top item</p>
</div></div></div><div class="public anchor" id="var-_concat"><h3>_concat</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Concats and pushes the top two vectors of the stack</p>
</div></div></div><div class="public anchor" id="var-_conj"><h3>_conj</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Conjs the top item of the appropriately-typed literal stack onto the vector stack (e.g. pop the top INTEGER and conj it onto the top VECTOR_INTEGER)</p>
</div></div></div><div class="public anchor" id="var-_contains"><h3>_contains</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes TRUE onto the BOOLEAN stack if the top element of the vector stack contains the top element of the appropriately-typed literal stack. Otherwise, pushes FALSE</p>
</div></div></div><div class="public anchor" id="var-_emptyvector"><h3>_emptyvector</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes TRUE onto the BOOLEAN stack if the top element is an empty vector. Otherwise, pushes FALSE</p>
</div></div></div><div class="public anchor" id="var-_first"><h3>_first</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the first item of the top element of the vector stack onto the appropriately-typed literal stack. If the vector is empty, return :ignore-instruction so that nothing is changed on the stacks.</p>
</div></div></div><div class="public anchor" id="var-_indexof"><h3>_indexof</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes onto the INTEGER stack the index of the top element of the appropriately-typed literal stack within the top element of the vector stack</p>
</div></div></div><div class="public anchor" id="var-_iterate"><h3>_iterate</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Iterates over the vector using the code on the exec stack</p>
</div></div></div><div class="public anchor" id="var-_last"><h3>_last</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the last item of the top element of the vector stack onto the appropriately-typed literal stack</p>
</div></div></div><div class="public anchor" id="var-_length"><h3>_length</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the length of the top item onto the INTEGER stack</p>
</div></div></div><div class="public anchor" id="var-_nth"><h3>_nth</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the Nth item of the top element of the vector stack onto the appropriately-typed literal stack, where N is taken from the INTEGER stack. To insure the index is within bounds, N is taken mod the vector length</p>
</div></div></div><div class="public anchor" id="var-_occurrencesof"><h3>_occurrencesof</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes onto the INTEGER stack the number of occurrences of the top element of the appropriately-typed literal stack within the top element of the vector stack</p>
</div></div></div><div class="public anchor" id="var-_pushall"><h3>_pushall</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes every item of the top element onto the appropriately-typed stack</p>
</div></div></div><div class="public anchor" id="var-_remove"><h3>_remove</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Removes all occurrences of the top element of the appropriately-typed literal stack from the first element of the vector stack</p>
</div></div></div><div class="public anchor" id="var-_replace"><h3>_replace</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Replaces all occurrences of the second element of the appropriately-typed literal stack with the top element of the appropriately-typed literal stack within the top item of the vector stack</p>
</div></div></div><div class="public anchor" id="var-_replacefirst"><h3>_replacefirst</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Replaces the first occurrence of the second element of the appropriately-typed literal stack with the top element of the appropriately-typed literal stack within the top item of the vector stack</p>
</div></div></div><div class="public anchor" id="var-_rest"><h3>_rest</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the rest of the top item</p>
</div></div></div><div class="public anchor" id="var-_reverse"><h3>_reverse</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the reverse of the top item</p>
</div></div></div><div class="public anchor" id="var-_set"><h3>_set</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Replaces in the top vector the item at index N (taken from the INTEGER stack) with the top item from the appropriately-typed literal stack. To insure the index is within bounds, N is taken mod the vector length</p>
</div></div></div><div class="public anchor" id="var-_subvec"><h3>_subvec</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes a subvector of the top item, with start and end indices determined by the second and top items of the INTEGER stack respectively</p>
</div></div></div><div class="public anchor" id="var-_take"><h3>_take</h3><div class="usage"></div><div class="doc"><div class="markdown"><p>Pushes the first N items of the top element, where N is taken from the top of the INTEGER stack</p>
</div></div></div></div></body></html>