pub struct HypergraphBuilder { /* private fields */ }Expand description
Builder for constructing a multi-layer hypergraph.
Implementations§
Source§impl HypergraphBuilder
impl HypergraphBuilder
Sourcepub fn new(config: HypergraphConfig) -> Self
pub fn new(config: HypergraphConfig) -> Self
Create a new builder with the given configuration.
Sourcepub fn add_coso_framework(&mut self)
pub fn add_coso_framework(&mut self)
Add COSO framework as Layer 1 nodes (5 components + 17 principles).
Sourcepub fn add_controls(&mut self, controls: &[InternalControl])
pub fn add_controls(&mut self, controls: &[InternalControl])
Add internal controls as Layer 1 nodes with edges to COSO components.
Sourcepub fn add_vendors(&mut self, vendors: &[Vendor])
pub fn add_vendors(&mut self, vendors: &[Vendor])
Add vendor master data as Layer 1 nodes.
Sourcepub fn add_customers(&mut self, customers: &[Customer])
pub fn add_customers(&mut self, customers: &[Customer])
Add customer master data as Layer 1 nodes.
Sourcepub fn add_employees(&mut self, employees: &[Employee])
pub fn add_employees(&mut self, employees: &[Employee])
Add employee/organizational nodes as Layer 1 nodes.
Sourcepub fn add_accounts(&mut self, coa: &ChartOfAccounts)
pub fn add_accounts(&mut self, coa: &ChartOfAccounts)
Add GL accounts as Layer 3 nodes.
Sourcepub fn add_journal_entries_as_hyperedges(&mut self, entries: &[JournalEntry])
pub fn add_journal_entries_as_hyperedges(&mut self, entries: &[JournalEntry])
Add journal entries as Layer 3 hyperedges.
Each journal entry becomes a hyperedge connecting its debit and credit accounts.
Sourcepub fn add_p2p_documents(
&mut self,
purchase_orders: &[PurchaseOrder],
goods_receipts: &[GoodsReceipt],
vendor_invoices: &[VendorInvoice],
payments: &[Payment],
)
pub fn add_p2p_documents( &mut self, purchase_orders: &[PurchaseOrder], goods_receipts: &[GoodsReceipt], vendor_invoices: &[VendorInvoice], payments: &[Payment], )
Add P2P document chains as Layer 2 nodes.
If a vendor has more documents than the threshold, they’re aggregated into pool nodes.
Sourcepub fn add_o2c_documents(
&mut self,
sales_orders: &[SalesOrder],
deliveries: &[Delivery],
customer_invoices: &[CustomerInvoice],
)
pub fn add_o2c_documents( &mut self, sales_orders: &[SalesOrder], deliveries: &[Delivery], customer_invoices: &[CustomerInvoice], )
Add O2C document chains as Layer 2 nodes.
Sourcepub fn build_cross_layer_edges(&mut self)
pub fn build_cross_layer_edges(&mut self)
Build cross-layer edges linking governance to accounting and process layers.
Sourcepub fn build(self) -> Hypergraph
pub fn build(self) -> Hypergraph
Finalize and build the Hypergraph.