use crate::backend::native::types::{NativeBackendError, NativeNodeId, NativeResult};
use crate::snapshot::SnapshotId;
pub struct V3AdjacencyHelpers;
impl V3AdjacencyHelpers {
pub fn get_outgoing_neighbors(
_graph_file: &crate::backend::native::graph_file::GraphFile,
_node_id: NativeNodeId,
_snapshot_id: SnapshotId,
) -> NativeResult<Vec<NativeNodeId>> {
Ok(Vec::new())
}
pub fn get_incoming_neighbors(
_graph_file: &crate::backend::native::graph_file::GraphFile,
_node_id: NativeNodeId,
_snapshot_id: SnapshotId,
) -> NativeResult<Vec<NativeNodeId>> {
Ok(Vec::new())
}
pub fn outgoing_degree(
_graph_file: &crate::backend::native::graph_file::GraphFile,
_node_id: NativeNodeId,
) -> NativeResult<usize> {
Ok(0)
}
pub fn incoming_degree(
_graph_file: &crate::backend::native::graph_file::GraphFile,
_node_id: NativeNodeId,
) -> NativeResult<usize> {
Ok(0)
}
}
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_v3_adjacency_stubs() {
let result = V3AdjacencyHelpers::get_outgoing_neighbors(
&crate::backend::native::graph_file::GraphFile::placeholder(),
1,
crate::snapshot::SnapshotId::current(),
);
assert!(result.is_ok());
assert!(result.unwrap().is_empty());
let degree = V3AdjacencyHelpers::outgoing_degree(
&crate::backend::native::graph_file::GraphFile::placeholder(),
1,
);
assert!(degree.is_ok());
assert_eq!(degree.unwrap(), 0);
}
}