Documentation
¶
Index ¶
- func IsAcyclic(edgeType string) bool
- type Graph
- func (g *Graph) AddEdge(e *storage.Edge) error
- func (g *Graph) AddNode(n *storage.Node) error
- func (g *Graph) Ancestors(id string) ([]string, error)
- func (g *Graph) BFS(startID string, maxDepth int) ([]string, error)
- func (g *Graph) Descendants(id string) ([]string, error)
- func (g *Graph) ExtractSubgraph(startID string, maxDepth int) (*Subgraph, error)
- func (g *Graph) Impact(filePath string, maxDepth int) ([]string, error)
- func (g *Graph) IntentBFS(startID string, maxDepth int, queryIntent intent.Intent) ([]string, error)
- func (g *Graph) RemoveEdge(id string) error
- func (g *Graph) RemoveNode(id string) error
- type Subgraph
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Graph ¶
type Graph struct {
// contains filtered or unexported fields
}
Graph wraps a Store and provides DAG operations + traversal.
func (*Graph) BFS ¶
BFS performs breadth-first traversal from startID up to maxDepth, returning visited node IDs.
func (*Graph) Descendants ¶
Descendants walks forward through acyclic edges from the given node.
func (*Graph) ExtractSubgraph ¶
ExtractSubgraph returns the full subgraph (nodes + edges) around startID up to maxDepth.
func (*Graph) Impact ¶
Impact returns node IDs affected by a file change, walking backwards through the graph.
func (*Graph) IntentBFS ¶
func (g *Graph) IntentBFS(startID string, maxDepth int, queryIntent intent.Intent) ([]string, error)
IntentBFS performs intent-aware BFS from startID. Edge traversal is weighted by the query intent (MAGMA-style adaptive traversal). Edges with higher intent weight are traversed first and given higher scores.
func (*Graph) RemoveEdge ¶
RemoveEdge delegates to store.
func (*Graph) RemoveNode ¶
RemoveNode delegates to store.