Class ThreadSafeMooreCaches

    • Method Detail

      • createDAGCache

        public static <I,​O> Supplier<ThreadSafeMooreCacheOracle<I,​O>> createDAGCache​(Alphabet<I> alphabet,
                                                                                                 Supplier<? extends MembershipOracle<I,​Word<O>>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreDAGBuilder
      • createDAGCache

        public static <I,​O> Supplier<ThreadSafeMooreCacheOracle<I,​O>> createDAGCache​(Alphabet<I> alphabet,
                                                                                                 @Nullable Mapping<? super O,​? extends O> errorSyms,
                                                                                                 Supplier<? extends MembershipOracle<I,​Word<O>>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        errorSyms - a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreDAGBuilder
      • createDAGCache

        public static <I,​O> Collection<ThreadSafeMooreCacheOracle<I,​O>> createDAGCache​(Alphabet<I> alphabet,
                                                                                                   Collection<? extends MembershipOracle<I,​Word<O>>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreDAGBuilder
      • createDAGCache

        public static <I,​O> Collection<ThreadSafeMooreCacheOracle<I,​O>> createDAGCache​(Alphabet<I> alphabet,
                                                                                                   @Nullable Mapping<? super O,​? extends O> errorSyms,
                                                                                                   Collection<? extends MembershipOracle<I,​Word<O>>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a DAG for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        errorSyms - a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreDAGBuilder
      • createTreeCache

        public static <I,​O> Supplier<ThreadSafeMooreCacheOracle<I,​O>> createTreeCache​(Alphabet<I> alphabet,
                                                                                                  Supplier<? extends MembershipOracle<I,​Word<O>>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreTreeBuilder
      • createTreeCache

        public static <I,​O> Supplier<ThreadSafeMooreCacheOracle<I,​O>> createTreeCache​(Alphabet<I> alphabet,
                                                                                                  @Nullable Mapping<? super O,​? extends O> errorSyms,
                                                                                                  Supplier<? extends MembershipOracle<I,​Word<O>>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        errorSyms - a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreTreeBuilder
      • createTreeCache

        public static <I,​O> Collection<ThreadSafeMooreCacheOracle<I,​O>> createTreeCache​(Alphabet<I> alphabet,
                                                                                                    Collection<? extends MembershipOracle<I,​Word<O>>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreTreeBuilder
      • createTreeCache

        public static <I,​O> Collection<ThreadSafeMooreCacheOracle<I,​O>> createTreeCache​(Alphabet<I> alphabet,
                                                                                                    @Nullable Mapping<? super O,​? extends O> errorSyms,
                                                                                                    Collection<? extends MembershipOracle<I,​Word<O>>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a Moore machine learning setup, using a tree for internal cache organization.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        alphabet - the alphabet containing the symbols of possible queries
        errorSyms - a mapping for defining a prefix-closure filter. If an output symbol has a non-null mapping all symbols after this symbol are replaced by the mapped value.
        oracles - the collection of oracles which will be used as delegates (in case of a cache-miss) by the corresponding oracles caches.
        Returns:
        a collection of ThreadSafeMooreCacheOracles.
        See Also:
        IncrementalMooreTreeBuilder