A pure C11 social graph library. Zero dependencies, no dynamic allocation.
- Agents with roles, names, reputation
- Relations (directed storage, bidirectional lookup)
- Groups with leaders and membership
- Graph metrics: neighbors, degree centrality
- Static allocation only — no
malloc
make test| Function | Description |
|---|---|
sg_add_agent |
Add agent with id, name, role |
sg_find_agent |
Find agent by id |
sg_set_role |
Update agent role |
sg_add_relation |
Add relation between two agents |
sg_find_relation |
Find relation (either direction) |
sg_neighbors |
Get unique neighbor ids |
sg_centrality |
Degree centrality |
sg_create_group |
Create group with leader |
sg_join_group |
Add agent to group |
sg_group_members |
List group members |
| Resource | Max |
|---|---|
| Agents | 64 |
| Relations | 256 |
| Groups | 16 |
| Members/group | 32 |
| Name length | 23 chars |
Public domain / MIT