Class RandomIncisionFunction<T extends Formula>

  • Type Parameters:
    T - The formula this incision function works on
    All Implemented Interfaces:
    IncisionFunction<T>

    public class RandomIncisionFunction<T extends Formula>
    extends java.lang.Object
    implements IncisionFunction<T>
    This class implements an incision function that just randomly selects a minimal incision.
    NOTE: results of this function are not deterministic and may not be reproduced (however each result is a valid incision)
    Author:
    Matthias Thimm
    • Method Summary

      Modifier and Type Method Description
      java.util.Collection<T> incise​(java.util.Collection<java.util.Collection<T>> kernelSets)
      Selects from each collection in the given collection one element and returns the collection of all those elements.
      private boolean isIncision​(java.util.Collection<java.util.Collection<T>> kernelSets, java.util.Collection<T> possibleIncision)
      Checks whether possibleIncision is an incision, ie.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RandomIncisionFunction

        public RandomIncisionFunction()
    • Method Detail

      • incise

        public java.util.Collection<T> incise​(java.util.Collection<java.util.Collection<T>> kernelSets)
        Description copied from interface: IncisionFunction
        Selects from each collection in the given collection one element and returns the collection of all those elements.
        Specified by:
        incise in interface IncisionFunction<T extends Formula>
        Parameters:
        kernelSets - a collection of kernel sets.
        Returns:
        the selected elements.
      • isIncision

        private boolean isIncision​(java.util.Collection<java.util.Collection<T>> kernelSets,
                                   java.util.Collection<T> possibleIncision)
        Checks whether possibleIncision is an incision, ie. whether each kernel is incised.
        Parameters:
        kernelSets - a set of kernels.
        possibleIncision - a possible incision.
        Returns:
        "true" if the given set is an incision.