|
|
@ -138,6 +138,10 @@ impl CtbnNetwork { |
|
|
|
|
|
|
|
|
|
|
|
return array_state; |
|
|
|
return array_state; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/// Get the Adjacency Matrix.
|
|
|
|
|
|
|
|
pub fn get_adj_matrix(&self) -> Option<Array2<u16>> { |
|
|
|
|
|
|
|
self.adj_matrix.clone() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
impl process::NetworkProcess for CtbnNetwork { |
|
|
|
impl process::NetworkProcess for CtbnNetwork { |
|
|
@ -240,9 +244,4 @@ impl process::NetworkProcess for CtbnNetwork { |
|
|
|
.filter_map(|(idx, x)| if x > &0 { Some(idx) } else { None }) |
|
|
|
.filter_map(|(idx, x)| if x > &0 { Some(idx) } else { None }) |
|
|
|
.collect() |
|
|
|
.collect() |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/// Get the Adjacency Matrix.
|
|
|
|
|
|
|
|
fn get_adj_matrix(&self) -> Option<Array2<u16>> { |
|
|
|
|
|
|
|
self.adj_matrix.clone() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|