From 7a3ac6c9abd364dfc62d2a45717c95c32f78476f Mon Sep 17 00:00:00 2001 From: meliurwen Date: Thu, 16 Feb 2023 16:36:07 +0100 Subject: [PATCH] Using `as_ref()` instead of `clone()` in `get_adj_matrix()` --- reCTBN/src/process/ctbn.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/reCTBN/src/process/ctbn.rs b/reCTBN/src/process/ctbn.rs index 6956ea0..d93400d 100644 --- a/reCTBN/src/process/ctbn.rs +++ b/reCTBN/src/process/ctbn.rs @@ -139,8 +139,8 @@ impl CtbnNetwork { return array_state; } /// Get the Adjacency Matrix. - pub fn get_adj_matrix(&self) -> Option> { - self.adj_matrix.clone() + pub fn get_adj_matrix(&self) -> Option<&Array2> { + self.adj_matrix.as_ref() } }