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

edgeCount → int
Number of directed edges across all nodes.
no setter
hashCode → int
The hash code for this object.
no setterinherited
nodeCount → int
Number of nodes in the graph.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

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 startId to goalId. Returns the node path or [].
findRelatedConcepts(String startId, int maxDepth) → List<ConceptNode>
BFS: returns all nodes reachable from startId within maxDepth hops.
getAllNodes() → List<ConceptNode>
Returns all nodes in the graph.
getMostActivated(int n) → List<ConceptNode>
Returns the n most activated concepts.
getMostConnected(int n) → List<ConceptNode>
Returns the n most connected (highest out-degree) concepts.
getNeighborsByType(String conceptId, RelationshipType type) → List<ConceptNode>
Returns concepts directly connected to conceptId by type.
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 id exists.
linkConcepts(String sourceId, String targetId, {required RelationshipType relationshipType, required double strength, String label = ''}) → void
Creates a directed edge from sourceId to targetId.
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 sourceId through its edges.
toString() → String
A string representation of this object.
override

Operators

operator ==(Object other) → bool
The equality operator.
inherited