Skip to content

Conversation

@s-n-sharma
Copy link
Collaborator

No description provided.

Copy link
Contributor

@rohanku rohanku left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some basic comments, will need to take a more careful look at your unsafe code/null space logic.

.gitignore Outdated
*.tsbuildinfo

# Ignore timing files
*.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't want to exclude all txt files since they are sometimes useful (e.g. requirements.txt for Python), you can make your timing files have a .log suffix and exclude that.

Cargo.toml Outdated
geometry = { version = "0.7", registry = "substrate" }
enumify = { version = "0.2", registry = "substrate" }

[profile.release]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this, don't want release to always be in debug mode.

build/

# Ignore timing files
*.txt
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

[dependencies]
derive-where = { version = "1", features = ["serde"] }
nalgebra = "0.34"
nalgebra = { version = "0.34", features = ["rayon"] }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Run cargo-udeps to make sure all these dependencies are being used.


[build-dependencies]
lrpar = { version = "0.13", features = ["serde"] }
#trying sparse
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove comment.

{
let val = round(sol[(i as usize, 0)]);
self.solved_vars.insert(Var(i), val);
let mut var_map = vec![usize::MAX; n_vars]; //og matrix -> shrunk matrix
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove/edit comments

use std::fs::OpenOptions;
use std::io::Write;

let time_str = format!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this or use tracing to log things (use the trace! macro).

});
solver.solve();
assert_relative_eq!(*solver.solved_vars.get(&x).unwrap(), 5., epsilon = EPSILON);
assert_relative_eq!(*solver.solved_vars.get(&y).unwrap(), 5., epsilon = EPSILON);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this changed?

flamegraph.svg Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this for?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What editor are you using? Seems like it's adding new lines to everything.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you write some unit tests for the solver? We don't do any solver correctness checks in our "integration" tests.

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.

4 participants