Class ThreadSafeMealyCaches

    • Method Detail

      • createDAGCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyDAGBuilder
      • createDAGCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyDAGBuilder
      • createDAGCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyDAGBuilder
      • createDAGCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyDAGBuilder
      • createTreeCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyTreeBuilder
      • createTreeCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyTreeBuilder
      • createTreeCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyTreeBuilder
      • createTreeCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<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 Mealy 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 ThreadSafeMealyCacheOracles.
        See Also:
        IncrementalMealyTreeBuilder
      • createDynamicTreeCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<I,​O>> createDynamicTreeCache​(Supplier<? extends MembershipOracle<I,​Word<O>>> oracleSupplier)
        Enhances a given oracle supplier with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache used Maps. As a result, no alphabet specification is required.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        oracleSupplier - the supplier that is used to construct the delegate oracle for the cache, in case of a cache-miss.
        Returns:
        a supplier for ThreadSafeMealyCacheOracles.
        See Also:
        DynamicIncrementalMealyTreeBuilder
      • createDynamicTreeCache

        public static <I,​O> Supplier<ThreadSafeMealyCacheOracle<I,​O>> createDynamicTreeCache​(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache used Maps. As a result, no alphabet specification is required.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        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 ThreadSafeMealyCacheOracles.
        See Also:
        DynamicIncrementalMealyTreeBuilder
      • createDynamicTreeCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<I,​O>> createDynamicTreeCache​(Collection<? extends MembershipOracle<I,​Word<O>>> oracles)
        Enhances each oracle of a given collection with a shared, thread-safe cache for a Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache used Maps. As a result, no alphabet specification is required.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        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 ThreadSafeMealyCacheOracles.
        See Also:
        DynamicIncrementalMealyTreeBuilder
      • createDynamicTreeCache

        public static <I,​O> Collection<ThreadSafeMealyCacheOracle<I,​O>> createDynamicTreeCache​(@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 Mealy machine learning setup, using a dynamically growing tree for internal cache organization. Rather than index-based storage, this cache used Maps. As a result, no alphabet specification is required.
        Type Parameters:
        I - input symbol type
        O - output symbol type
        Parameters:
        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 ThreadSafeMealyCacheOracles.
        See Also:
        DynamicIncrementalMealyTreeBuilder