摘要 |
PURPOSE: A method for allocating node identifiers for a permutation network is provided to offer a method for allocating node identifiers for a permutation network, easy to embody as a computer program. CONSTITUTION: A computer program executing a method for allocating node identifiers for a permutation network sets up a constant 'SYMBOL SIZE' and initializes variables 'ii_array' and 'count' as '0'(200). The program converts the value of the variable 'count' into a character string of n places and stores it in a string variable 'SYMBOL'(210). The program confirms whether the same characters are doubled in the character string 'SYMBOL'(220). If the characters in the character string 'SYMBOL' are all different, the program checks whether a code value of each of the characters comprised in the character string 'SYMBOL' is within a required range(230). If a character out of the required range exists among the characters, the program adds '1' to the value of the variable 'count' and executes the step 210 again(270). The variable 'count' confirmed as a proper node identifier for the permutation network is added in an ID list(240). Then the program confirms whether the variable 'count' is smaller than a given threshold '10SYMBOL SIZE'(250). In case that the variable 'count' is smaller than the threshold '10SYMBOL SIZE', the program respectively adds '1' to the value of the variable 'ii_array' and the value of the variable 'count' and executes the step 210 again(260,270).
|