Class MatchFunction

    • Constructor Detail

      • MatchFunction

        protected MatchFunction​(String name,
                                String type)
    • Method Detail

      • getName

        public String getName()
        Description copied from interface: IMatchFunction
        This method returns the unique match function name.
        Specified by:
        getName in interface IMatchFunction
        Returns:
        the unique match function name.
      • getMatchType

        public String getMatchType()
        Description copied from interface: IMatchFunction
        This method returns the type of the match function.
        Specified by:
        getMatchType in interface IMatchFunction
        Returns:
        the type of the match function.
      • onLoadComplete

        public void onLoadComplete()
        Description copied from interface: IMatchFunction
        This method is invoked by the casebase after all the cases have been initialized. The onLoadComplete method may be used to optimize or adjust weight values based on the distribution of the case values.
        Specified by:
        onLoadComplete in interface IMatchFunction
      • onStartup

        public void onStartup()
        Description copied from interface: IMatchFunction
        This method is invoked by the casebase before the cases are initialized.
        Specified by:
        onStartup in interface IMatchFunction
      • match

        public int match​(IMatchVisitor visitor,
                         IMatchValue demand,
                         IMatchValue supply)
        Description copied from interface: IMatchFunction
        This method should compare the demand value against the supply value and determine the match score.
        Specified by:
        match in interface IMatchFunction
        Parameters:
        visitor - The visitor that should be notified of the match events.
        demand - The value that is demanded.
        supply - The value that is supplied.
        Returns:
        The match score for the supply and demand combination.