#
# <one line to give the library's name and an idea of what it does.>
# Copyright (C) 2015  <copyright holder> <email>
# 
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
# 
#

import abc

class SpreadingInterface(object):
  """!
  This class represents interface for all spreading methods into graph
  """
  __metaclass__ = abc.ABCMeta

  def __init__(self, str_name):
    """!
    Constructor sets string-like name of spreading methods as the class member

    @param str_name Name of spreading
    @type str_name: String
    """
    self._str_name = str_name

  @abc.abstractmethod
  def spread(self, g, max_it, max_depth):
    """!
    Abstract function to spread weighs of nodes into graph. 

    This method have to be implemented into all spreading methods

    @param g Graph into which the weight will be spread
    @type g: networkx.DiGraph/networkx.MultiDiGraph
    @param max_it Number of iterations of spreading
    @type max_it: Integer
    @param max_depth The number of graph levelst to spread the value
    @type max_depth: Positive integer
    """
    pass
