Files
Baradb/docs/tr/graph.md
T

42 lines
917 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Grafik Motoru
Grafik geçişi ve analizi için yerleşik algoritmalarla bitişik liste depolaması.
## Kullanım
```nim
import barabadb/graph/engine
var g = newGraph()
let alice = g.addNode("Person", {"Name": "Alice"}.toTable)
let bob = g.addNode("Person", {"Name": "Bob"}.toTable)
discard g.addEdge(alice, bob, "knows")
let bfs = g.bfs(alice)
let path = g.shortestPath(alice, bob)
let ranks = g.pageRank()
```
## Algoritmalar
| Algoritma | Açıklama |
|-----------|----------|
| `bfs` | Enine arama |
| `dfs` | Derine arama |
| `dijkstra` | En kısa ağırlıklı yol |
| `pageRank` | Düğüm önem sıralaması |
| `louvain` | Topluluk tespiti |
| `patternMatch` | Altgraf eşleme |
## Cypher Sorgusu
```nim
import barabadb/graph/cypher
var engine = newCypherEngine(g)
let results = engine.execute("""
MATCH (p:Person)-[:KNOWS]->(friend:Person)
WHERE p.name = 'Alice'
RETURN friend.name
""")
```