Skip to content

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

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open

Canonization #15

wants to merge 14 commits into from

Conversation

devrz45
Copy link
Collaborator

@devrz45 devrz45 commented Feb 3, 2025

No description provided.

@devrz45 devrz45 requested a review from AgentElement February 3, 2025 19:17
src/canonize.rs Outdated
pub fn canonize(m: &Molecule) -> String {
let mol_graph = m.get_graph();

/*
Copy link
Collaborator

@AgentElement AgentElement Feb 3, 2025

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 {
Copy link
Collaborator

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 {
Copy link
Collaborator

@AgentElement AgentElement Feb 4, 2025

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);
Copy link
Collaborator

@AgentElement AgentElement Feb 4, 2025

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

@AgentElement
Copy link
Collaborator

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants