Parameters
- unfixedLayer
- direction
Return Value
Returns the crossing matrix
direction == 0 -- use unfixedLayer - 1 and unfixedLayer + 1 direction > 0 -- use unfixedLayer - 1 (sweeping away from layer 0) direction < 0 -- use unfixedLayer + 1 (sweeping towards layer 0)
The resulting integer array can be used as follows: if index1 and index2 are the indices corresponding to two nodes on the unfixedLayer and crossmat is the crossing matrix, then crossmat[index1 * indices[unfixedLayer] + index2]
is the number of crossing that occur if the node corresponding to index1 is placed to the left of the node corresponding to index2. If index1 == index2
, then crossmat[index1 * indices[unfixedLayer] + index2]
is the number of crossings between links to and from the node corresponding to index1.