pub struct GraphFunctions;
Expand description
Basic graph functions for SQL integration These are simplified implementations to establish the foundation Full DataFusion UDF integration will be implemented in a future iteration
Implementations§
Source§impl GraphFunctions
impl GraphFunctions
pub fn new() -> Self
Sourcepub fn graph_density(&self, _edges_table: &str) -> DataFusionResult<f64>
pub fn graph_density(&self, _edges_table: &str) -> DataFusionResult<f64>
Calculate graph density: edges / (nodes * (nodes - 1))
Sourcepub fn clustering_coefficient(
&self,
_node_id: &str,
_edges_table: &str,
) -> DataFusionResult<f64>
pub fn clustering_coefficient( &self, _node_id: &str, _edges_table: &str, ) -> DataFusionResult<f64>
Calculate clustering coefficient for a specific node
Sourcepub fn pagerank(
&self,
_node_id: &str,
_edges_table: &str,
_damping_factor: Option<f64>,
) -> DataFusionResult<f64>
pub fn pagerank( &self, _node_id: &str, _edges_table: &str, _damping_factor: Option<f64>, ) -> DataFusionResult<f64>
Calculate PageRank score for a specific node
Sourcepub fn degree_centrality(
&self,
_node_id: &str,
_edges_table: &str,
) -> DataFusionResult<f64>
pub fn degree_centrality( &self, _node_id: &str, _edges_table: &str, ) -> DataFusionResult<f64>
Calculate degree centrality for a specific node
Sourcepub fn betweenness_centrality(
&self,
_node_id: &str,
_edges_table: &str,
) -> DataFusionResult<f64>
pub fn betweenness_centrality( &self, _node_id: &str, _edges_table: &str, ) -> DataFusionResult<f64>
Calculate betweenness centrality for a specific node
Sourcepub fn graph_match(
&self,
_pattern: &str,
_nodes_table: &str,
_edges_table: &str,
) -> DataFusionResult<bool>
pub fn graph_match( &self, _pattern: &str, _nodes_table: &str, _edges_table: &str, ) -> DataFusionResult<bool>
Basic graph pattern matching
Sourcepub fn connected_components(
&self,
_edges_table: &str,
_algorithm: Option<&str>,
) -> DataFusionResult<u64>
pub fn connected_components( &self, _edges_table: &str, _algorithm: Option<&str>, ) -> DataFusionResult<u64>
Count connected components
Sourcepub fn shortest_path_batch(
&self,
_sources: &[String],
_targets: &[String],
_edges_table: &str,
) -> DataFusionResult<Vec<f64>>
pub fn shortest_path_batch( &self, _sources: &[String], _targets: &[String], _edges_table: &str, ) -> DataFusionResult<Vec<f64>>
Batch shortest path calculation (simplified)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GraphFunctions
impl RefUnwindSafe for GraphFunctions
impl Send for GraphFunctions
impl Sync for GraphFunctions
impl Unpin for GraphFunctions
impl UnwindSafe for GraphFunctions
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more