-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* impl exclude layer api and tests * impl exclude layers python and tests * impl/test exclude_nodes_subgraph * impl python exclude nodes api * fmt * add tests for nbr * impl node type filter for nodes and subgraph * fmt
- Loading branch information
Showing
19 changed files
with
399 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
use crate::db::{ | ||
api::view::internal::{CoreGraphOps, OneHopFilter}, | ||
graph::views::node_type_filtered_subgraph::TypeFilteredSubgraph, | ||
}; | ||
use std::borrow::Borrow; | ||
|
||
pub trait NodeTypesFilter<'graph>: OneHopFilter<'graph> { | ||
fn type_filter<I: IntoIterator<Item = V>, V: Borrow<str>>( | ||
&self, | ||
node_types: I, | ||
) -> Self::Filtered<TypeFilteredSubgraph<Self::FilteredGraph>> { | ||
let meta = self.current_filter().node_meta().node_type_meta(); | ||
let r = node_types | ||
.into_iter() | ||
.flat_map(|nt| meta.get_id(nt.borrow())) | ||
.collect(); | ||
self.one_hop_filtered(TypeFilteredSubgraph::new(self.current_filter().clone(), r)) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod deletion_graph; | ||
pub mod layer_graph; | ||
pub mod node_subgraph; | ||
pub mod node_type_filtered_subgraph; | ||
pub mod window_graph; |
Oops, something went wrong.