-
Notifications
You must be signed in to change notification settings - Fork 2
Canonization #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Canonization #15
Conversation
src/canonize.rs
Outdated
pub fn canonize(m: &Molecule) -> String { | ||
let mol_graph = m.get_graph(); | ||
|
||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this entire comment block should be removed
@@ -47,6 +47,14 @@ impl Atom { | |||
capacity: 0, | |||
} | |||
} | |||
pub fn get_element(&self) -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe have .element()
return the element, and implement a to_string()
on the element type?
@@ -226,6 +234,10 @@ impl Molecule { | |||
Self { graph: g } | |||
} | |||
|
|||
pub fn get_graph(&self) -> &MGraph { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can use .graph()
instead, it does the same thing.
|
||
let (curr, level) = visited.pop_front().unwrap(); | ||
|
||
// println!("Current:{:?}", curr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove all of these print statements (and other commented out code) as well
Additionally, I'd be too scared to try to work with this without a handful of tests. The commented-out block constructing the dummy molecule would make a good test. |
No description provided.