differt.rt.generate_all_path_candidates#
- generate_all_path_candidates(num_primitives, order)[source]#
Generate an array of all path candidates for fixed path order and a number of primitives.
The returned array contains, for each row, an array of
orderindices indicating the primitive with which the path interacts.This list is generated as the list of all paths from one node to another, by passing by exactly
orderprimitives. Calling this function is equivalent to callingitertools.productwith parameters[0, 1, ..., num_primitives - 1]andrepeat=order, and removing entries containing loops, i.e., two or more consecutive indices that are equal.- Parameters:
- Return type:
- Returns:
An unsigned array with primitive indices on each column. Its number of columns is actually equal to
num_primitives * ((num_primitives - 1) ** (order - 1)).