FASTCOUNTER 2.5.2025
FastCounter creates the AstroChip definition of a fast counter.
The fast counter processes a list of numbers and counts the
elements with a special property. Numbers equal to, not equal
to, lower than, greater than, lower or equal than or greater or
equal than another number are counted.
The definition creator is written in JAVA and the JAVA classes
are JAVA 1.8 compilations. The command line usage is:
java FastCounter outputfile.txt m n k
m is the number of each digits of each number.
n is the number of numbers checked in one cycle.
k is the number of digits in the counting result.
You can edit outputfile.txt:
The CONSTANTs cixj are the numbers checked (i: 1...n, j: 1...m).
One CONSTANT of "CONSTANT equal", "CONSTANT notequal",
"CONSTANT lower", "CONSTANT greater", "CONSTANT lowerequal" and
"CONSTANT greaterequal" must be 1 to indicate the counting type.
The CONSTANTs cmpcj (j: 1...m) is the number, the numbers are
compared to. If "CONSTANT useresulti" (i: 1...n) is 0, the number
is not processed.
The count result is shown after each cycle in AstroChip. If
overflowout is 1, then the counter counted more numbers than
(1,...,1) (k times 1).
Parts of the code were already written for NmAdderTree
(Astro Solutions, 6.3.2018).