Skip to content

Commit

Permalink
Fix bug in OptimizationProblem::build_eos (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
prehner authored Jun 28, 2024
1 parent 5bf89d3 commit 49ee3b6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,10 @@ impl<M, R, P, const N: usize> OptimizationProblem<M, R, P, N> {
{
let mut y_iter = result.y.iter().map(|&y| y as f64);
let f = array::from_fn(|i| {
let y = vec![y_iter.next().unwrap(); self.molecules[i].structure_variables().len()];
let y: Vec<_> = y_iter
.by_ref()
.take(self.molecules[i].structure_variables().len())
.collect();
self.molecules[i].evaluate_feature_variables(&y)
});
let p = self.property_model.evaluate_parameter_variables(&f);
Expand Down

0 comments on commit 49ee3b6

Please sign in to comment.