pub trait AlgorithmClient {
Show 13 methods
// Required methods
fn build_view<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = GraphView> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn page_rank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: PageRankConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = HashMap<u64, f64>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn weakly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = WccResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn strongly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = SccResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn bfs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn dijkstra<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn edmonds_karp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
sink: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<FlowResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn prim_mst<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = MSTResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn count_triangles<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn bfs_all_shortest_paths<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Vec<PathResult>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn cdlp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: CdlpConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = CdlpResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn local_clustering_coefficient<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = LccResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn pca<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
properties: &'life2 [&'life3 str],
config: PcaConfig,
) -> Pin<Box<dyn Future<Output = PcaResult> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
}Expand description
Extension trait for graph algorithm operations.
Only implemented by EmbeddedClient since algorithms need direct store access.
Required Methods§
Sourcefn build_view<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = GraphView> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn build_view<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = GraphView> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Build a GraphView projection for algorithm execution.
Optionally filter by node label, edge type, and extract edge weights.
Sourcefn page_rank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: PageRankConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = HashMap<u64, f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn page_rank<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: PageRankConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = HashMap<u64, f64>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Run PageRank on the graph (or a subgraph filtered by label/edge_type).
Sourcefn weakly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = WccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn weakly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = WccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Detect weakly connected components.
Sourcefn strongly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = SccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn strongly_connected_components<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = SccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Detect strongly connected components.
Sourcefn bfs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bfs<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Breadth-first search from source to target.
Sourcefn dijkstra<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn dijkstra<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = Option<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Dijkstra’s shortest path from source to target (weighted).
Sourcefn edmonds_karp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
sink: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<FlowResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn edmonds_karp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
sink: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Option<FlowResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Edmonds-Karp maximum flow from source to sink.
Sourcefn prim_mst<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = MSTResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn prim_mst<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
weight_prop: Option<&'life3 str>,
) -> Pin<Box<dyn Future<Output = MSTResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Prim’s minimum spanning tree.
Sourcefn count_triangles<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn count_triangles<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = usize> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Count triangles in the graph.
Sourcefn bfs_all_shortest_paths<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Vec<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bfs_all_shortest_paths<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
source: u64,
target: u64,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Vec<PathResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Find all shortest paths between source and target (BFS).
Sourcefn cdlp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: CdlpConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = CdlpResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn cdlp<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
config: CdlpConfig,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = CdlpResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Community Detection via Label Propagation (CDLP).
Sourcefn local_clustering_coefficient<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = LccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn local_clustering_coefficient<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
edge_type: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = LccResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Local Clustering Coefficient for all nodes.
Sourcefn pca<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
properties: &'life2 [&'life3 str],
config: PcaConfig,
) -> Pin<Box<dyn Future<Output = PcaResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
fn pca<'life0, 'life1, 'life2, 'life3, 'async_trait>(
&'life0 self,
label: Option<&'life1 str>,
properties: &'life2 [&'life3 str],
config: PcaConfig,
) -> Pin<Box<dyn Future<Output = PcaResult> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait,
Principal Component Analysis on node numeric properties.
Extracts the specified numeric properties from nodes matching label,
builds a feature matrix, and runs PCA with the given config.