Serializable
, Cloneable
, Comparable<AbstractTerm>
, EventEmitter.EventObserver
, AbstractTerm
, Plugin
public class Anticipate extends Operator implements EventEmitter.EventObserver
Modifier and Type | Class | Description |
---|---|---|
(package private) class |
Anticipate.Prediction |
Operator.ExecutionResult
Term.TermVisitor
Modifier and Type | Field | Description |
---|---|---|
float |
ANTICIPATION_DURABILITY_MUL |
|
float |
ANTICIPATION_PRIORITY_MUL |
|
(package private) boolean |
anticipationOperator |
|
Map<Anticipate.Prediction,LinkedHashSet<Term>> |
anticipations |
|
private BudgetValue |
expiredBudget |
|
private TruthValue |
expiredTruth |
|
private DerivationContext |
nal |
|
private Set<Term> |
newTasks |
EmptyTermArray, imagination, index_variable, SELF, SEQ_SPATIAL, SEQ_TEMPORAL, term_indices
Constructor | Description |
---|---|
Anticipate() |
|
Anticipate(float ANTICIPATION_DURABILITY_MUL,
float ANTICIPATION_PRIORITY_MUL) |
Modifier and Type | Method | Description |
---|---|---|
void |
anticipate(Term content,
Memory memory,
long occurenceTime,
Task t,
Timable time) |
|
void |
anticipationFeedback(Term content,
Task t,
Memory memory,
Timable time) |
|
protected void |
deriveDidntHappen(Term aTerm,
long expectedOccurenceTime,
DerivationContext nal) |
|
void |
event(Class event,
Object[] args) |
|
protected List<Task> |
execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
Required method for every operator, specifying the corresponding
operation
|
boolean |
isAnticipationAsOperator() |
|
void |
setAnticipationAsOperator(boolean val) |
|
boolean |
setEnabled(Nar n,
boolean enabled) |
called when plugin is activated (enabled = true) / deactivated (enabled=false)
|
void |
updateAnticipations(DerivationContext nal) |
finalize, getClass, notify, notifyAll, wait, wait, wait
addPrefixIfMissing, call, call, clone, operationExecutionString, reportExecution
cloneDeep, compareTo, containedTemporalRelations, containsTerm, containsTermRecursively, countTermRecursively, equals, get, get, getComplexity, getIsSpatial, getTemporalOrder, hashCode, hasInterval, hasVar, hasVar, hasVarDep, hasVarIndep, hasVarQuery, isConstant, isExecutable, isHigherOrderStatement, isSelf, name, nameInternal, operator, recurseSubtermsContainingVariables, recurseSubtermsContainingVariables, recurseTerms, setName, subjectOrPredicateIsIndependentVar, text, toSortedSet, toSortedSetArray, toString, valid
public final Map<Anticipate.Prediction,LinkedHashSet<Term>> anticipations
private TruthValue expiredTruth
private BudgetValue expiredBudget
public float ANTICIPATION_DURABILITY_MUL
public float ANTICIPATION_PRIORITY_MUL
private transient DerivationContext nal
boolean anticipationOperator
public Anticipate()
public Anticipate(float ANTICIPATION_DURABILITY_MUL, float ANTICIPATION_PRIORITY_MUL)
public boolean setEnabled(Nar n, boolean enabled)
Plugin
setEnabled
in interface Plugin
setEnabled
in class Operator
public void updateAnticipations(DerivationContext nal)
public void event(Class event, Object[] args)
event
in interface EventEmitter.EventObserver
protected List<Task> execute(Operation operation, Term[] args, Memory memory, Timable time)
Operator
public boolean isAnticipationAsOperator()
public void setAnticipationAsOperator(boolean val)
public void anticipate(Term content, Memory memory, long occurenceTime, Task t, Timable time)
public void anticipationFeedback(Term content, Task t, Memory memory, Timable time)
protected void deriveDidntHappen(Term aTerm, long expectedOccurenceTime, DerivationContext nal)
Copyright © 2020 OpenNARS. All rights reserved.