dlvhex  2.5.0
EvalHeuristicGreedy Class Reference

Default heuristics which tries to merge as much as possible, but such that the worst case for the grounder is avoided (see GTTV'13 paper). More...

#include <include/dlvhex2/EvalHeuristicGreedy.h>

Inheritance diagram for EvalHeuristicGreedy:
Collaboration diagram for EvalHeuristicGreedy:

Public Types

typedef EvalHeuristicBase
< EvalGraphBuilder
Base

Public Member Functions

 EvalHeuristicGreedy ()
 Constructor.
virtual ~EvalHeuristicGreedy ()
 Destructor.
virtual void build (EvalGraphBuilder &builder)
 Constructs the evaluation graph.

Private Member Functions

bool mergeComponents (ProgramCtx &ctx, const ComponentGraph::ComponentInfo &ci1, const ComponentGraph::ComponentInfo &ci2, bool negativeExternalDependency) const
 Decides whetherh to merges two components into one.

Detailed Description

Default heuristics which tries to merge as much as possible, but such that the worst case for the grounder is avoided (see GTTV'13 paper).

Definition at line 45 of file EvalHeuristicGreedy.h.


Member Typedef Documentation


Constructor & Destructor Documentation

Constructor.

Definition at line 85 of file EvalHeuristicGreedy.cpp.

Destructor.

Definition at line 91 of file EvalHeuristicGreedy.cpp.


Member Function Documentation

DLVHEX_NAMESPACE_BEGIN bool EvalHeuristicGreedy::mergeComponents ( ProgramCtx ctx,
const ComponentGraph::ComponentInfo ci1,
const ComponentGraph::ComponentInfo ci2,
bool  negativeExternalDependency 
) const [private]

Decides whetherh to merges two components into one.

Parameters:
ctxProgramCtx.
ci1First component.
ci2Second component.
negativeExternalDependencySpecifies whether there is a negative external dependency between ci1 and ci2.
Trueif the components shall be merged and false otherwise.

Definition at line 57 of file EvalHeuristicGreedy.cpp.

References ProgramCtx::config, ComponentGraph::ComponentInfo::disjunctiveHeads, ComponentGraph::ComponentInfo::fixedDomain, Configuration::getOption(), ComponentGraph::ComponentInfo::innerEatoms, ComponentGraph::ComponentInfo::innerEatomsNonmonotonic, ComponentGraph::ComponentInfo::negativeDependencyBetweenRules, and ComponentGraph::ComponentInfo::outerEatoms.


The documentation for this class was generated from the following files: