| 1410 I, |
1410 I, |
| 1411 Plot, |
1411 Plot, |
| 1412 (Option<DiscreteMeasure<U, F>>, Z, Y), |
1412 (Option<DiscreteMeasure<U, F>>, Z, Y), |
| 1413 String, |
1413 String, |
| 1414 ), |
1414 ), |
| 1415 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>>, |
1415 ) -> DynResult<MeasureZ<F, Z, U>>, |
| 1416 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>> |
1416 ) -> DynResult<MeasureZ<F, Z, U>> |
| 1417 where |
1417 where |
| 1418 F: Float + ToNalgebraRealField, |
1418 F: Float + ToNalgebraRealField, |
| 1419 U: Space + Clone + Dist<L2, F>, |
1419 U: Space + Clone + Dist<L2, F>, |
| 1420 for<'a> &'a U: Instance<U>, |
1420 for<'a> &'a U: Instance<U>, |
| 1421 I: AlgIteratorFactory<IterInfo<F>>, |
1421 I: AlgIteratorFactory<IterInfo<F>>, |
| 1422 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1422 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1423 + BoundedCurvature<F>, |
1423 + BoundedCurvature<F>, |
| 1424 S: DifferentiableMapping<U, Codomain = F> + ClosedMul<F> + MinMaxMapping<U, F>, |
1424 S: ClosedMul<F>, |
| 1425 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1425 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1426 //Pair<S, Z>: ClosedMul<F>, |
1426 //Pair<S, Z>: ClosedMul<F>, |
| 1427 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1427 DiscreteMeasure<U, F>: SpikeMerging<F>, |
| 1428 Reg: SlidingRegTerm<U, F>, |
1428 Reg: SlidingRegTerm<U, F>, |
| 1429 P: TransportProxPenalty<U, S, Reg, F>, |
1429 P: TransportProxPenalty<U, S, Reg, F>, |
| 1474 I, |
1474 I, |
| 1475 Plot, |
1475 Plot, |
| 1476 (Option<DiscreteMeasure<U, F>>, Z, Y), |
1476 (Option<DiscreteMeasure<U, F>>, Z, Y), |
| 1477 String, |
1477 String, |
| 1478 ), |
1478 ), |
| 1479 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>>, |
1479 ) -> DynResult<MeasureZ<F, Z, U>>, |
| 1480 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>> |
1480 ) -> DynResult<MeasureZ<F, Z, U>> |
| 1481 where |
1481 where |
| 1482 F: Float + ToNalgebraRealField, |
1482 F: Float + ToNalgebraRealField, |
| 1483 U: Space + Clone + Dist<L2, F>, |
1483 U: Space + Clone + Dist<L2, F>, |
| 1484 for<'a> &'a U: Instance<U>, |
1484 for<'a> &'a U: Instance<U>, |
| 1485 I: AlgIteratorFactory<IterInfo<F>>, |
1485 I: AlgIteratorFactory<IterInfo<F>>, |
| 1486 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1486 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1487 + BoundedCurvature<F>, |
1487 + BoundedCurvature<F>, |
| 1488 S: DifferentiableMapping<U, Codomain = F> + ClosedMul<F> + MinMaxMapping<U, F>, |
1488 S: ClosedMul<F>, |
| 1489 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1489 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1490 //Pair<S, Z>: ClosedMul<F>, |
1490 //Pair<S, Z>: ClosedMul<F>, |
| 1491 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1491 DiscreteMeasure<U, F>: SpikeMerging<F>, |
| 1492 Reg: SlidingRegTerm<U, F>, |
1492 Reg: SlidingRegTerm<U, F>, |
| 1493 P: TransportProxPenalty<U, S, Reg, F>, |
1493 P: TransportProxPenalty<U, S, Reg, F>, |
| 1561 I, |
1561 I, |
| 1562 Plot, |
1562 Plot, |
| 1563 (Option<DiscreteMeasure<U, F>>, Z), |
1563 (Option<DiscreteMeasure<U, F>>, Z), |
| 1564 String, |
1564 String, |
| 1565 ), |
1565 ), |
| 1566 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>>, |
1566 ) -> DynResult<MeasureZ<F, Z, U>>, |
| 1567 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>> |
1567 ) -> DynResult<MeasureZ<F, Z, U>> |
| 1568 where |
1568 where |
| 1569 F: Float + ToNalgebraRealField, |
1569 F: Float + ToNalgebraRealField, |
| 1570 U: Space + Clone + Dist<L2, F>, |
1570 U: Space + Clone + Dist<L2, F>, |
| 1571 for<'a> &'a U: Instance<U>, |
1571 for<'a> &'a U: Instance<U>, |
| 1572 I: AlgIteratorFactory<IterInfo<F>>, |
1572 I: AlgIteratorFactory<IterInfo<F>>, |
| 1573 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1573 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1574 + BoundedCurvature<F>, |
1574 + BoundedCurvature<F>, |
| 1575 S: DifferentiableMapping<U, Codomain = F> + ClosedMul<F> + MinMaxMapping<U, F>, |
1575 S: ClosedMul<F>, |
| 1576 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1576 DiscreteMeasure<U, F>: SpikeMerging<F>, |
| 1577 Reg: SlidingRegTerm<U, F>, |
1577 Reg: SlidingRegTerm<U, F>, |
| 1578 P: TransportProxPenalty<U, S, Reg, F>, |
1578 P: TransportProxPenalty<U, S, Reg, F>, |
| 1579 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1579 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1580 Z: ClosedEuclidean<F> + AXPY + Clone, |
1580 Z: ClosedEuclidean<F> + AXPY + Clone, |
| 1581 for<'b> &'b Z: Instance<Z>, |
1581 for<'b> &'b Z: Instance<Z>, |
| 1582 R: Prox<Z, Codomain = F>, |
1582 R: Prox<Z, Codomain = F>, |
| 1583 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1583 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1584 // We should not need to explicitly require this: |
|
| 1585 for<'b> &'b Loc<0, F>: Instance<Loc<0, F>>, |
|
| 1586 { |
1584 { |
| 1587 run_fb_pair_dom(f, reg, prox_penalty, fnR, init, &mut FullSpace, cont) |
1585 run_fb_pair_dom(f, reg, prox_penalty, fnR, init, &mut FullSpace, cont) |
| 1588 } |
1586 } |
| 1589 |
1587 |
| 1590 pub fn run_fb_pair_dom<F, S, Dat, Reg, Z, R, P, I, Plot, U>( |
1588 pub fn run_fb_pair_dom<F, S, Dat, Reg, Z, R, P, I, Plot, U>( |
| 1606 I, |
1604 I, |
| 1607 Plot, |
1605 Plot, |
| 1608 (Option<DiscreteMeasure<U, F>>, Z), |
1606 (Option<DiscreteMeasure<U, F>>, Z), |
| 1609 String, |
1607 String, |
| 1610 ), |
1608 ), |
| 1611 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>>, |
1609 ) -> DynResult<MeasureZ<F, Z, U>>, |
| 1612 ) -> DynResult<Pair<DiscreteMeasure<U, F>, Z>> |
1610 ) -> DynResult<MeasureZ<F, Z, U>> |
| 1613 where |
1611 where |
| 1614 F: Float + ToNalgebraRealField, |
1612 F: Float + ToNalgebraRealField, |
| 1615 U: Space + Clone + Dist<L2, F>, |
1613 U: Space + Clone + Dist<L2, F>, |
| 1616 for<'a> &'a U: Instance<U>, |
1614 for<'a> &'a U: Instance<U>, |
| 1617 I: AlgIteratorFactory<IterInfo<F>>, |
1615 I: AlgIteratorFactory<IterInfo<F>>, |
| 1618 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1616 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1619 + BoundedCurvature<F>, |
1617 + BoundedCurvature<F>, |
| 1620 S: DifferentiableMapping<U, Codomain = F> + ClosedMul<F> + MinMaxMapping<U, F>, |
1618 S: ClosedMul<F>, |
| 1621 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1619 DiscreteMeasure<U, F>: SpikeMerging<F>, |
| 1622 Reg: SlidingRegTerm<U, F>, |
1620 Reg: SlidingRegTerm<U, F>, |
| 1623 P: TransportProxPenalty<U, S, Reg, F>, |
1621 P: TransportProxPenalty<U, S, Reg, F>, |
| 1624 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1622 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1625 Z: ClosedEuclidean<F> + AXPY + Clone, |
1623 Z: ClosedEuclidean<F> + AXPY + Clone, |
| 1626 for<'b> &'b Z: Instance<Z>, |
1624 for<'b> &'b Z: Instance<Z>, |
| 1627 R: Prox<Z, Codomain = F>, |
1625 R: Prox<Z, Codomain = F>, |
| 1628 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1626 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1629 // We should not need to explicitly require this: |
|
| 1630 for<'b> &'b Loc<0, F>: Instance<Loc<0, F>>, |
|
| 1631 { |
1627 { |
| 1632 let pt = P::prox_type(); |
1628 let pt = P::prox_type(); |
| 1633 |
1629 |
| 1634 match alg { |
1630 match alg { |
| 1635 &AlgorithmConfig::FB(ref algconfig, prox_type) if prox_type == pt => { |
1631 &AlgorithmConfig::FB(ref algconfig, prox_type) if prox_type == pt => { |