我想在 perl 中实现这个算法
11000, 67676, -7878, 9898
11001, 67676, -7878, 7673
11789, 56565, -0909, 5555
17654, 67676, -7654, 3214
18776, 99999, -55, 4444
17765, 67676, 7878, 9898
scan *nodes
hash1{node}=x,y,z
invert_y=y*-1
chech invert_y existance in hash2
if exists
hash2{y}=[n1,n2,n3...].append the node
else
hash2{y}=store node in a array and pass its reference as value
foreach key in hash1
get x1,y1,z1 of this node1 (eg. hash1{key} will return x,y,z of this node1)
invert_y=y*1
if exists hash2{invert_y}
get all node of hash2{keys} in node_array
foreach node2 in node_array
get x2,y2,z2 of this node2 (eg. hash1{node2} will return x,y,z of this node2)
if x1 of node1 == x2 of node2 && z1 of node1 == z2 of node2
node1 and node2 are symmetric