This plug reads the raw weights held in the socket's weights map across a set of slots, sums them, and overwrites each slot with its share of that total as a percentage rounded down. It asks the caller for count, the number of weight slots to iterate over in both passes. It fires whenever a caller runs it with that count supplied at execution time. Computing these percent shares by hand or against a stale sum would write incorrect proportions back into storage.
Actions · 17
Setto
Assigns a value to a named variable that later steps reference.
Setto
Assigns a value to a named variable that later steps reference.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
Readmapvalueofinin
Reads a value from a keyed map in the socket's persistent storage.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Setto
Assigns a value to a named variable that later steps reference.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Setto
Assigns a value to a named variable that later steps reference.
Endblock
Closes the innermost open block, whether a conditional branch or a loop.
Setto
Assigns a value to a named variable that later steps reference.
Steers control flow by comparing two values: branch, loop, or require the condition holds.
Readmapvalueofinin
Reads a value from a keyed map in the socket's persistent storage.
Calculatetimesdividedbyrounded
Multiplies two values and divides by a third in one step, rounding up or down.
Setmapvalueofininto
Writes a value into a keyed map in the socket's persistent storage.
Calculate
Applies a binary arithmetic operation to two values and returns the result.
Setto
Assigns a value to a named variable that later steps reference.
Endblock
Closes the innermost open block, whether a conditional branch or a loop.
Related plugs · 8
Not ready to run as it stands: it waits on values or a position of your own.