execute

open fun execute()

Execute the action on a random neighbor if the node has a neighborhood. Otherwise do nothing.


abstract fun execute(targetNode: Node<T>)

Execute the action on the given target node. NOTE, it is NOT guaranteed that this method checks if the target node is in the actual neighborhood of the node.

Parameters

targetNode

the node where the action will be execute