# Additional {Contact} functions for the HotPath heuristic. # Last edited on 2021-10-03 20:55:18 by stolfi # In addition to the fields defined in the {contact} interface, each {Contact} # object also has some mutable fields that are used during the # {hotpath.best_path} algorithm. They are handled by the procedures in # this section. # # These attributes are not defined automatically. Their initial values # are undefined and must be properly defined by the {set_*} procedures # below, just before or during the heuristic. import contact_hp_IMP import block # BLOCKS CONTAINING THE SIDES def set_side_block(ct, i, bc): # Sets the block {bc} that contains the move which is # side {i} (0 or 1) of contact {ct}. Note that the move may occur in multiple # paths (alternatives) of that block, but must not occur in any other block. # ??? May be superfluous given the {seam} interface. ??? return contact_hp_IMP.set_side_block(ct, i, bc) def side_block(ct, i): # A mutable link that returns the block that contains the move which is # side {i} (0 or 1) of contact {ct}. # ??? May be superfluous given the {seam} interface. ??? return contact_hp_IMP.side_block(ct, i)