#
# <one line to give the library's name and an idea of what it does.>
# Copyright (C) 2014  <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 MeasureInterface(object):
  """!
  Interface for all measures
  """
  __metaclass__ = abc.ABCMeta
  
  def __init__(self, options, str_name):
    """!
    Constructor of abstract class.

    @param options: a dictionary containing options for this measure
    @param str_name: string like representation for the measure
    """
    self._str_name = str_name
    self._options = options

  def __str__(self):
    """!
    String like representation
    """
    return self._str_name

  def options(self):
    """!
    @returns options 
    """
    return self._options

  @abc.abstractmethod
  def calculate(self, g1, g2):
    """!
    Calculates similarity between two graphs.

    @param g1 first graph
    @type g1: networgx.DiGraph/networkx.MultiDiGraph

    @param g2 second graph
    @type g1: networgx.DiGraph/networkx.MultiDiGraph

    @return the value of similarity between g1 and g2
    @rtype: double
    """
    pass
