def set_source_nodes(self, source_nodes):
        r"""
        Set the source nodes and compute their t-weights.
        
        Parameters
        ----------
        source_nodes : sequence of integers
            Declare the source nodes via their ids.
        
        Notes
        -----
        It does not get checked if one of the supplied source-nodes already has
        a weight assigned (e.g. by passing it to `set_sink_nodes`). This can
        occur when the foreground- and background-markers cover the same region. In this
        case the order of setting the terminal nodes can affect the graph and therefore
        the graph-cut result.
        """
        self.__snodes = list(source_nodes)
        
        # set the source-to-node weights (t-weights)
        for snode in self.__snodes:
            self.__tweights[snode] = (self.MAX, 0)