1#![warn(missing_docs)]
10
11pub mod feature_extraction;
12pub mod hypergraph;
13pub mod types;
14
15pub use feature_extraction::{FeatureConfig, FeatureExtraction};
16pub use hypergraph::{HypergraphConfig, HypergraphConstruction};
17pub use types::*;
18
19pub fn register_all(
21 registry: &rustkernel_core::registry::KernelRegistry,
22) -> rustkernel_core::error::Result<()> {
23 tracing::info!("Registering financial audit kernels");
24
25 registry.register_batch_metadata_from(feature_extraction::FeatureExtraction::new)?;
27
28 registry.register_batch_metadata_from(hypergraph::HypergraphConstruction::new)?;
30
31 tracing::info!("Registered 2 financial audit kernels");
32 Ok(())
33}
34
35#[cfg(test)]
36mod tests {
37 use super::*;
38 use rustkernel_core::{domain::Domain, registry::KernelRegistry, traits::GpuKernel};
39
40 #[test]
41 fn test_register_all() {
42 let registry = KernelRegistry::new();
43 register_all(®istry).expect("Failed to register audit kernels");
44 assert_eq!(registry.total_count(), 2);
45 }
46
47 #[test]
48 fn test_feature_extraction_metadata() {
49 let kernel = FeatureExtraction::new();
50 let metadata = kernel.metadata();
51 assert!(metadata.id.contains("feature"));
52 assert_eq!(metadata.domain, Domain::FinancialAudit);
53 }
54
55 #[test]
56 fn test_hypergraph_construction_metadata() {
57 let kernel = HypergraphConstruction::new();
58 let metadata = kernel.metadata();
59 assert!(metadata.id.contains("hypergraph"));
60 assert_eq!(metadata.domain, Domain::FinancialAudit);
61 }
62}