public class LazyAtomManager extends PersistedAtomManager
PersistedAtomManager.PersistedAccessException
Modifier and Type | Field and Description |
---|---|
static double |
ACTIVATION_THRESHOLD_DEFAULT
Default value for ACTIVATION_THRESHOLD_KEY property.
|
static String |
ACTIVATION_THRESHOLD_KEY
The minimum value an atom must take for it to be activated.
|
static String |
CONFIG_PREFIX
Prefix of property keys used by this class.
|
persistedCache, THROW_ACCESS_EXCEPTION_DEFAULT, THROW_ACCESS_EXCEPTION_KEY
db
Constructor and Description |
---|
LazyAtomManager(Database db) |
Modifier and Type | Method and Description |
---|---|
int |
activateAtoms(List<Rule> rules,
GroundRuleStore groundRuleStore)
Activate any lazy atoms above the threshold.
|
int |
activateAtoms(Set<RandomVariableAtom> atoms,
List<Rule> rules,
GroundRuleStore groundRuleStore)
Activate a specific set of lazy atoms.
|
int |
countActivatableAtoms()
Compute the number of lazy atoms that can be activated at this moment.
|
GroundAtom |
getAtom(Predicate predicate,
Constant... arguments)
Returns the GroundAtom for the given Predicate and GroundTerms.
|
Set<RandomVariableAtom> |
getLazyAtoms() |
addToPersistedCache, commitPersistedAtoms, getPersistedRVAtoms
executeGroundingQuery, executeQuery, getDatabase, isClosed
public static final String CONFIG_PREFIX
public static final String ACTIVATION_THRESHOLD_KEY
public static final double ACTIVATION_THRESHOLD_DEFAULT
public LazyAtomManager(Database db)
public GroundAtom getAtom(Predicate predicate, Constant... arguments)
AtomManager
ReadableDatabase.getAtom(Predicate, Constant...)
to actually retrieve the GroundAtom.getAtom
in class PersistedAtomManager
predicate
- the Predicate of the Atomarguments
- the GroundTerms of the Atompublic Set<RandomVariableAtom> getLazyAtoms()
public int countActivatableAtoms()
public int activateAtoms(List<Rule> rules, GroundRuleStore groundRuleStore)
rules
- the potential rules to look for lazy atoms in.public int activateAtoms(Set<RandomVariableAtom> atoms, List<Rule> rules, GroundRuleStore groundRuleStore)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.