Interface QueryLifecycle


  • public interface QueryLifecycle
    Allows callers to hook into the query lifecycle of an inference engine.
    • Method Detail

      • begin

        void begin​(QueryLifecycleBegin begin)
        Called before the query is computed. Callers can modify the query options if required. This can be useful when an algorithm (such as the optimizer) uses a factory to generate multiple inference algorithms, but you need to be able to set options that are specific to each query performed. For example, the disjuntive cause algorithm needs to set 'CausesOfTreatmentsAndOutcomes' which might change each time the optimizer performs a query. Note that some algorithms (such as parameter learning) may operate on a copy of the original network, so you may need to refer to nodes by name.
        Parameters:
        begin - Information relevant to the start of the query.
      • end

        void end​(QueryLifecycleEnd end)
        Called after the query is computed.
        Parameters:
        end - Information relevant to the end of the query.