Skip to content

SuperInstance/flux-social-c

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

flux-social-c

A pure C11 social graph library. Zero dependencies, no dynamic allocation.

Features

  • 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

Build & Test

make test

API

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

Limits

Resource Max
Agents 64
Relations 256
Groups 16
Members/group 32
Name length 23 chars

License

Public domain / MIT

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C 96.5%
  • Makefile 3.5%