ConceptualGraph class
A directed, weighted graph of concepts and their relationships.
Serves as the long-term semantic backbone of the consciousness system. Concepts persist here even after they leave the short-term workspace.
Constructors
- ConceptualGraph({ConsciousnessLogger? logger})
Properties
Methods
-
addConcept(
String id, Concept concept) → void - Adds or updates a Concept in the graph.
-
discoverImplicitPatterns(
) → List< Pattern> - Discovers implicit patterns: clusters of highly interconnected concepts.
-
findPath(
String startId, String goalId) → List< ConceptNode> -
DFS path from
startIdtogoalId. Returns the node path or []. -
findRelatedConcepts(
String startId, int maxDepth) → List< ConceptNode> -
BFS: returns all nodes reachable from
startIdwithinmaxDepthhops. -
getAllNodes(
) → List< ConceptNode> - Returns all nodes in the graph.
-
getMostActivated(
int n) → List< ConceptNode> -
Returns the
nmost activated concepts. -
getMostConnected(
int n) → List< ConceptNode> -
Returns the
nmost connected (highest out-degree) concepts. -
getNeighborsByType(
String conceptId, RelationshipType type) → List< ConceptNode> -
Returns concepts directly connected to
conceptIdbytype. -
getNode(
String conceptId) → ConceptNode? -
Returns the node for
conceptId, or null if not found. -
getStats(
) → Map< String, dynamic> - Returns overall graph statistics.
-
hasNode(
String id) → bool -
Returns true if a concept with
idexists. -
linkConcepts(
String sourceId, String targetId, {required RelationshipType relationshipType, required double strength, String label = ''}) → void -
Creates a directed edge from
sourceIdtotargetId. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
spreadActivation(
String sourceId, {int maxHops = 3, double decay = 0.5}) → Map< String, double> -
Spreads activation from
sourceIdthrough its edges. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited