|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnars.entity.BudgetValue
nars.entity.Item
nars.entity.Concept
public final class Concept
A concept contains information associated with a term, including directly and indirectly related tasks and beliefs.
To make sure the space will be released, the only allowed reference to a concept are those in a ConceptBag. All other access go through the Term that names the concept.
Field Summary | |
---|---|
private java.util.ArrayList<Judgment> |
pastRecords
Judgments directly made about the term, with non-future tense |
private java.util.ArrayList<Goal> |
pendingGoals
Goals directly requested on the term |
private java.util.ArrayList<Question> |
pendingQuestions
Question directly asked about the term |
private java.util.ArrayList<Judgment> |
predictions
Judgments directly made about the term, with future tense |
private Judgment |
presentBelief
Most recent and confidence judgment |
private boolean |
revisible
Whether truth value of judgments can be revised |
private boolean |
showing
Whether the content of the concept is being displayed |
private TaskLinkBag |
taskLinks
Task links for indirect processing |
private Term |
term
The term is the unique ID of the concept |
private TermLinkBag |
termLinks
Term links between the term and its components and compounds |
private java.util.ArrayList<TermLink> |
termLinkTemplates
Link templates of TermLink, only in concepts with CompoundTerm |
private ConceptWindow |
window
The display window |
Fields inherited from class nars.entity.Item |
---|
key |
Fields inherited from class nars.entity.BudgetValue |
---|
durability, priority, quality |
Constructor Summary | |
---|---|
Concept(Term tm)
Constructor, called in Memory.getConcept only |
Method Summary | |
---|---|
private void |
addToTable(Judgment newJudgment,
java.util.ArrayList table,
int capacity)
Add a new belief or goal into the table Sort the beliefs/goals by rank, and remove redundant or low rank one |
void |
buildTermLinks(BudgetValue budget)
Recursively build TermLinks between a compound and its components |
private void |
checkRevisibility()
Judgments with dependent variable cannot be revised |
void |
directProcess(Task task)
Directly process a new task. |
private java.lang.String |
displayContent()
Collect direct belief, questions, and goals for display |
void |
fire()
An atomic step in a concept, only called in Memory.processConcept |
Judgment |
getBelief(Task task)
Select a belief to interact with the given task in inference |
float |
getQuality()
Recalculate the quality of the concept [to be refined] |
Term |
getTerm()
Return the assocated term, called from Memory only |
java.util.ArrayList<TermLink> |
getTermLinkTemplates()
Return the templates for TermLinks, only called in Memory.continuedProcess |
void |
insertTaskLink(TaskLink taskLink)
Insert a TaskLink into the TaskLink bag |
void |
insertTermLink(TermLink termLink)
Insert a TermLink into the TermLink bag |
void |
play()
Resume display, called from ConceptWindow only |
private void |
processGoal(Goal goal,
Task task)
Direct processing a new goal |
private void |
processJudgment(Judgment judg,
Task task)
To accept a new judgment as belief, and check for revisions and solutions |
private void |
processQuestion(Question ques,
Task task)
To answer a question by existing beliefs |
private boolean |
reviseTable(Judgment newSentence,
Task task,
java.util.ArrayList table)
Revise existing beliefs or goals |
void |
startPlay()
Start displaying contents and links, called from ConceptWindow only |
void |
stop()
Stop display, called from ConceptWindow only |
java.lang.String |
toString()
Return a string representation of the concept, called in ConceptBag only |
private void |
tryUpdate(Judgment judg)
To temporalRevision the presentBelief |
Methods inherited from class nars.entity.Item |
---|
getBudget, getKey |
Methods inherited from class nars.entity.BudgetValue |
---|
aboveThreshold, clone, decDurability, decPriority, decQuality, getDurability, getPriority, incDurability, incPriority, incQuality, merge, setDurability, setPriority, setQuality, summary, toString2 |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private Term term
private TaskLinkBag taskLinks
private TermLinkBag termLinks
private java.util.ArrayList<TermLink> termLinkTemplates
private java.util.ArrayList<Question> pendingQuestions
private java.util.ArrayList<Goal> pendingGoals
private java.util.ArrayList<Judgment> pastRecords
private java.util.ArrayList<Judgment> predictions
private Judgment presentBelief
private boolean revisible
private boolean showing
private ConceptWindow window
Constructor Detail |
---|
public Concept(Term tm)
tm
- A term corresponding to the conceptMethod Detail |
---|
private void checkRevisibility()
public void directProcess(Task task)
called in Memory.immediateProcess only
task
- The task to be processedprivate void processQuestion(Question ques, Task task)
ques
- The question to be answeredtask
- The task to be processedprivate void processGoal(Goal goal, Task task)
goal
- The goal to be processedtask
- The task to be processedprivate void processJudgment(Judgment judg, Task task)
judg
- The judgment to be acceptedtask
- The task to be processedprivate boolean reviseTable(Judgment newSentence, Task task, java.util.ArrayList table)
task
- The task to be processedtable
- The table to be revised
private void tryUpdate(Judgment judg)
judg
- The new beliefprivate void addToTable(Judgment newJudgment, java.util.ArrayList table, int capacity)
newJudgment
- The judgment to be processedtable
- The table to be revisedcapacity
- The capacity of the tablepublic void insertTaskLink(TaskLink taskLink)
called only from Memory.continuedProcess
taskLink
- The termLink to be insertedpublic void buildTermLinks(BudgetValue budget)
called only from Memory.continuedProcess
budget
- The budget of the taskpublic void insertTermLink(TermLink termLink)
called from buildTermLinks only
termLink
- The termLink to be insertedpublic Term getTerm()
public java.lang.String toString()
toString
in class BudgetValue
public float getQuality()
getQuality
in class BudgetValue
public java.util.ArrayList<TermLink> getTermLinkTemplates()
public Judgment getBelief(Task task)
get the first qualified one
only called in RuleTables.reason
task
- The selected task
public void fire()
public void startPlay()
public void play()
public void stop()
private java.lang.String displayContent()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |