pub struct TransactionGraph { /* private fields */ }Expand description
Transaction graph for network analysis
Implementations§
Source§impl TransactionGraph
impl TransactionGraph
Sourcepub fn set_reporting_threshold(&mut self, threshold: f64)
pub fn set_reporting_threshold(&mut self, threshold: f64)
Set reporting threshold (for structuring detection)
Sourcepub fn add_transaction(
&mut self,
from_account: &str,
to_account: &str,
amount: f64,
timestamp: DateTime<Utc>,
)
pub fn add_transaction( &mut self, from_account: &str, to_account: &str, amount: f64, timestamp: DateTime<Utc>, )
Add a transaction to the graph
Sourcepub fn detect_circular_flows(&self, max_hops: usize) -> Vec<CircularFlowResult>
pub fn detect_circular_flows(&self, max_hops: usize) -> Vec<CircularFlowResult>
Detect circular flows (money returning to origin)
Sourcepub fn detect_structuring(&self) -> Vec<StructuringResult>
pub fn detect_structuring(&self) -> Vec<StructuringResult>
Detect structuring (transactions just under threshold)
Sourcepub fn detect_funnel_accounts(&self) -> Vec<FunnelAccountResult>
pub fn detect_funnel_accounts(&self) -> Vec<FunnelAccountResult>
Detect funnel accounts (many-to-one aggregation)
Sourcepub fn detect_pass_through(&self) -> Vec<PassThroughResult>
pub fn detect_pass_through(&self) -> Vec<PassThroughResult>
Detect pass-through accounts
Sourcepub fn get_account_stats(&self, account_id: &str) -> Option<AccountStats>
pub fn get_account_stats(&self, account_id: &str) -> Option<AccountStats>
Get account statistics
Sourcepub fn get_stats(&self) -> GraphStats
pub fn get_stats(&self) -> GraphStats
Get graph statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TransactionGraph
impl RefUnwindSafe for TransactionGraph
impl Send for TransactionGraph
impl Sync for TransactionGraph
impl Unpin for TransactionGraph
impl UnwindSafe for TransactionGraph
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more