518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
|
-
+
|
if upper_bounds
.as_ref()
.map(|ub| ub[i] != Real::infinity())
.unwrap_or(false)
{
return Err(Error::InvalidConvexityUpperBound(i));
}
constraint_sets.entry(k).or_insert_with(|| vec![]).push(i);
constraint_sets.entry(k).or_insert_with(Vec::new).push(i);
}
}
// compute initial y
let mut init_y = dvec![Real::zero(); n];
for convexity_set in constraint_sets.values() {
let value = Real::one() / Real::from_usize(convexity_set.len()).unwrap();
|