Using `as_ref()` instead of `clone()` in `get_adj_matrix()`

pull/91/head
Meliurwen 2 years ago
parent 4fd0ee0407
commit 7a3ac6c9ab
Signed by: meliurwen
GPG Key ID: 818A8B35E9F1CE10
  1. 4
      reCTBN/src/process/ctbn.rs

@ -139,8 +139,8 @@ impl CtbnNetwork {
return array_state; return array_state;
} }
/// Get the Adjacency Matrix. /// Get the Adjacency Matrix.
pub fn get_adj_matrix(&self) -> Option<Array2<u16>> { pub fn get_adj_matrix(&self) -> Option<&Array2<u16>> {
self.adj_matrix.clone() self.adj_matrix.as_ref()
} }
} }

Loading…
Cancel
Save