Package com.tnsai.reasoning.got
Class GoTNode
java.lang.Object
com.tnsai.reasoning.got.GoTNode
- All Implemented Interfaces:
Evaluable
A node in a Graph of Thoughts.
Unlike tree nodes, GoT nodes can have multiple parents (merge/aggregate) and can form cycles through refinement operations.
-
Method Summary
Modifier and TypeMethodDescriptionaddChild(String id, String thought, GoTOperation operation) intgetDepth()Gets the depth of this node (root = 0).getId()Gets the node identifier.doublegetScore()Gets the thought content at this node.Gets the combined thought chain from root to this node.booleanbooleanisLeaf()booleanbooleanisRoot()static GoTNodeCreates a merge node from multiple parent nodes.static GoTNodevoidsetScore(double score) toString()
-
Method Details
-
root
-
addChild
-
merge
Creates a merge node from multiple parent nodes. -
getId
Description copied from interface:EvaluableGets the node identifier. -
getThought
Description copied from interface:EvaluableGets the thought content at this node.- Specified by:
getThoughtin interfaceEvaluable
-
getOperation
-
getParents
-
getChildren
-
getScore
public double getScore() -
isEvaluated
public boolean isEvaluated() -
isLeaf
public boolean isLeaf() -
isRoot
public boolean isRoot() -
isMergeNode
public boolean isMergeNode() -
getThoughtChain
Description copied from interface:EvaluableGets the combined thought chain from root to this node.- Specified by:
getThoughtChainin interfaceEvaluable
-
getDepth
public int getDepth()Description copied from interface:EvaluableGets the depth of this node (root = 0). -
setScore
public void setScore(double score) -
toString
-