dlvhex  2.5.0
SimpleNogoodContainer Class Reference

A NogoodContainer based on NogoodSet. More...

#include <include/dlvhex2/Nogood.h>

Inheritance diagram for SimpleNogoodContainer:
Collaboration diagram for SimpleNogoodContainer:

Public Types

typedef boost::shared_ptr
< SimpleNogoodContainer
Ptr
typedef boost::shared_ptr
< const SimpleNogoodContainer
ConstPtr

Public Member Functions

void addNogood (Nogood ng)
 Adds a nogood to the container.
void removeNogood (Nogood ng)
NogoodgetNogood (int index)
int getNogoodCount ()
void clear ()
void addAllResolvents (RegistryPtr reg, int maxSize=-1)
void forgetLeastFrequentlyAdded ()
void defragment ()

Private Attributes

boost::mutex mutex
 Exclusive access to the nogood container.
NogoodSet ngg
 Internal nogood storage.

Detailed Description

A NogoodContainer based on NogoodSet.

Definition at line 347 of file Nogood.h.


Member Typedef Documentation

typedef boost::shared_ptr<const SimpleNogoodContainer> SimpleNogoodContainer::ConstPtr

Reimplemented from NogoodContainer.

Definition at line 367 of file Nogood.h.

Reimplemented from NogoodContainer.

Definition at line 366 of file Nogood.h.


Member Function Documentation

void SimpleNogoodContainer::addNogood ( Nogood  ng) [virtual]

Adds a nogood to the container.

Parameters:
ngThe nogood to add.

Implements NogoodContainer.

Definition at line 558 of file Nogood.cpp.

References NogoodSet::addNogood(), mutex, and ngg.

Referenced by addAllResolvents(), CDNLSolver::addNogood(), ExternalLearningHelper::learnFromInputOutputBehavior(), and ExternalLearningHelper::learnFromNegativeAtoms().

Definition at line 586 of file Nogood.cpp.

References mutex, and ngg.

Referenced by CDNLSolver::loadAddedNogoods().

Definition at line 699 of file Nogood.cpp.

References NogoodSet::defragment(), and ngg.

Definition at line 565 of file Nogood.cpp.

References mutex, ngg, and NogoodSet::removeNogood().


Field Documentation

boost::mutex SimpleNogoodContainer::mutex [private]

Exclusive access to the nogood container.

Definition at line 351 of file Nogood.h.

Referenced by addNogood(), clear(), forgetLeastFrequentlyAdded(), getNogood(), getNogoodCount(), and removeNogood().

Internal nogood storage.

Definition at line 354 of file Nogood.h.

Referenced by addNogood(), clear(), defragment(), forgetLeastFrequentlyAdded(), getNogood(), getNogoodCount(), and removeNogood().


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