(
&self,
collection: &str,
personalization: Option<&std::collections::HashMap<String, f64>>,
damping: Option<f64>,
max_iterations: Option<u32>,
)
| 157 | } |
| 158 | |
| 159 | pub(super) async fn graph_pagerank_impl( |
| 160 | &self, |
| 161 | collection: &str, |
| 162 | personalization: Option<&std::collections::HashMap<String, f64>>, |
| 163 | damping: Option<f64>, |
| 164 | max_iterations: Option<u32>, |
| 165 | ) -> NodeDbResult<Vec<(String, f64)>> { |
| 166 | let sql = crate::graph_dsl::build_pagerank_sql( |
| 167 | collection, |
| 168 | personalization, |
| 169 | damping, |
| 170 | max_iterations, |
| 171 | )?; |
| 172 | let (columns, rows) = self.simple_query_raw(&sql).await?; |
| 173 | crate::graph_dsl::parse_pagerank_rows(&columns, &rows) |
| 174 | } |
| 175 | |
| 176 | pub(super) async fn graph_shortest_path_impl( |
| 177 | &self, |
no test coverage detected