Class LDSRelationComputer<T>

  • Type Parameters:
    T -
    All Implemented Interfaces:
    java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>, java.util.concurrent.Callable<java.util.List<java.util.List<T>>>, java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>, org.api4.java.algorithm.IAlgorithm<RelationComputationProblem<T>,​java.util.List<java.util.List<T>>>, org.api4.java.common.control.ICancelable, org.api4.java.common.control.ILoggingCustomizable

    public class LDSRelationComputer<T>
    extends AAlgorithm<RelationComputationProblem<T>,​java.util.List<java.util.List<T>>>
    This algorithms allows to compute an ordered Cartesian product. It is ordered in the sense that it interprets the sets over which the product is built as ORDERED sets and first generates tuples with items that appear first in the sets. The algorithm also works for ordinary unordered sets but is a bit slower why another algorithm could be favorable.
    • Constructor Detail

      • LDSRelationComputer

        public LDSRelationComputer​(java.util.List<java.util.Collection<T>> sets)
    • Method Detail

      • nextWithException

        public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException()
                                                                         throws java.lang.InterruptedException,
                                                                                org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException,
                                                                                org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
        Throws:
        java.lang.InterruptedException
        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
      • nextTuple

        public java.util.List<T> nextTuple()
                                    throws java.lang.InterruptedException,
                                           org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException,
                                           org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
        Throws:
        java.lang.InterruptedException
        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
      • call

        public java.util.List<java.util.List<T>> call()
                                               throws java.lang.InterruptedException,
                                                      org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException,
                                                      org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
        Throws:
        java.lang.InterruptedException
        org.api4.java.algorithm.exceptions.AlgorithmExecutionCanceledException
        org.api4.java.algorithm.exceptions.AlgorithmTimeoutedException
      • getNumRecycledNodes

        public int getNumRecycledNodes()
      • getNumCreatedNodes

        public int getNumCreatedNodes()
      • setLoggerName

        public void setLoggerName​(java.lang.String name)
        Specified by:
        setLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        setLoggerName in class AAlgorithm<RelationComputationProblem<T>,​java.util.List<java.util.List<T>>>
      • getLoggerName

        public java.lang.String getLoggerName()
        Specified by:
        getLoggerName in interface org.api4.java.common.control.ILoggingCustomizable
        Overrides:
        getLoggerName in class AAlgorithm<RelationComputationProblem<T>,​java.util.List<java.util.List<T>>>