| 53 use alg_tools::mapping::{ |
53 use alg_tools::mapping::{ |
| 54 DataTerm, DifferentiableMapping, DifferentiableRealMapping, Instance, RealMapping, |
54 DataTerm, DifferentiableMapping, DifferentiableRealMapping, Instance, RealMapping, |
| 55 }; |
55 }; |
| 56 use alg_tools::maputil::map3; |
56 use alg_tools::maputil::map3; |
| 57 use alg_tools::nalgebra_support::ToNalgebraRealField; |
57 use alg_tools::nalgebra_support::ToNalgebraRealField; |
| 58 use alg_tools::norms::{Dist, NormExponent, L1, L2}; |
58 use alg_tools::norms::{Dist, Norm, NormExponent, L1, L2}; |
| 59 use alg_tools::operator_arithmetic::Weighted; |
59 use alg_tools::operator_arithmetic::Weighted; |
| 60 use alg_tools::sets::Cube; |
60 use alg_tools::sets::Cube; |
| 61 use alg_tools::sets::SetOrd; |
61 use alg_tools::sets::SetOrd; |
| 62 use alg_tools::tabledump::TableDump; |
62 use alg_tools::tabledump::TableDump; |
| 63 use anyhow::anyhow; |
63 use anyhow::anyhow; |
| 972 for<'b> Phi::Conjugate<'b>: Prox<A::Observable>, |
977 for<'b> Phi::Conjugate<'b>: Prox<A::Observable>, |
| 973 for<'b> &'b A::Observable: Instance<A::Observable>, |
978 for<'b> &'b A::Observable: Instance<A::Observable>, |
| 974 A::Observable: AXPY, |
979 A::Observable: AXPY, |
| 975 Reg: SlidingRegTerm<Loc<N, F>, F>, |
980 Reg: SlidingRegTerm<Loc<N, F>, F>, |
| 976 P: ProxPenalty<Loc<N, F>, A::PreadjointCodomain, Reg, F> + StepLengthBoundPD<F, A, RNDM<N, F>>, |
981 P: ProxPenalty<Loc<N, F>, A::PreadjointCodomain, Reg, F> + StepLengthBoundPD<F, A, RNDM<N, F>>, |
| 977 RNDM<N, F>: SpikeMerging<F>, |
982 RNDM<N, F>: SpikeMerging<F> + Norm<Radon, F>, |
| 978 I: AlgIteratorFactory<IterInfo<F>>, |
983 I: AlgIteratorFactory<IterInfo<F>>, |
| 979 Plot: Plotter<P::ReturnMapping, A::PreadjointCodomain, RNDM<N, F>>, |
984 Plot: Plotter<P::ReturnMapping, A::PreadjointCodomain, RNDM<N, F>>, |
| 980 { |
985 { |
| 981 match alg { |
986 match alg { |
| 982 &AlgorithmConfig::PDPS(ref algconfig, prox_type) if prox_type == P::prox_type() => { |
987 &AlgorithmConfig::PDPS(ref algconfig, prox_type) if prox_type == P::prox_type() => { |
| 1419 U: Space + Clone + Dist<L2, F>, |
1424 U: Space + Clone + Dist<L2, F>, |
| 1420 for<'a> &'a U: Instance<U>, |
1425 for<'a> &'a U: Instance<U>, |
| 1421 I: AlgIteratorFactory<IterInfo<F>>, |
1426 I: AlgIteratorFactory<IterInfo<F>>, |
| 1422 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1427 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1423 + BoundedCurvature<F>, |
1428 + BoundedCurvature<F>, |
| 1424 S: ClosedMul<F>, |
1429 S: ClosedMul<F> + MinMaxMapping<U, F>, |
| 1425 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1430 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1426 //Pair<S, Z>: ClosedMul<F>, |
1431 //Pair<S, Z>: ClosedMul<F>, |
| 1427 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1432 DiscreteMeasure<U, F>: SpikeMerging<F> + Norm<Radon, F>, |
| 1428 Reg: SlidingRegTerm<U, F>, |
1433 Reg: SlidingRegTerm<U, F>, |
| 1429 P: TransportProxPenalty<U, S, Reg, F>, |
1434 P: TransportProxPenalty<U, S, Reg, F>, |
| 1430 KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> |
1435 KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> |
| 1431 + GEMV<F, Z> |
1436 + GEMV<F, Z> |
| 1432 + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, |
1437 + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, |
| 1433 KOpZ::SimpleAdjoint: GEMV<F, Y>, |
1438 KOpZ::SimpleAdjoint: GEMV<F, Y>, |
| 1434 Y: ClosedEuclidean<F> + Clone, |
1439 Y: ClosedEuclidean<F> + Clone, |
| 1435 for<'b> &'b Y: Instance<Y>, |
1440 for<'b> &'b Y: Instance<Y>, |
| 1436 Z: ClosedEuclidean<F> + Clone + ClosedMul<F> + AXPY, |
1441 Z: ClosedEuclidean<F> + Clone + ClosedMul<F> + AXPY, |
| 1437 for<'b> &'b Z: Instance<Z>, |
1442 for<'b> &'b Z: Instance<Z>, // compiler overflow + Mul<F, Output = Z>, |
| 1438 R: Prox<Z, Codomain = F>, |
1443 R: Prox<Z, Codomain = F>, |
| 1439 H: Conjugable<Y, F, Codomain = F>, |
1444 H: Conjugable<Y, F, Codomain = F>, |
| 1440 for<'b> H::Conjugate<'b>: Prox<Y>, |
1445 for<'b> H::Conjugate<'b>: Prox<Y>, |
| 1441 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1446 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1442 { |
1447 { |
| 1483 U: Space + Clone + Dist<L2, F>, |
1488 U: Space + Clone + Dist<L2, F>, |
| 1484 for<'a> &'a U: Instance<U>, |
1489 for<'a> &'a U: Instance<U>, |
| 1485 I: AlgIteratorFactory<IterInfo<F>>, |
1490 I: AlgIteratorFactory<IterInfo<F>>, |
| 1486 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1491 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1487 + BoundedCurvature<F>, |
1492 + BoundedCurvature<F>, |
| 1488 S: ClosedMul<F>, |
1493 S: ClosedMul<F> + MinMaxMapping<U, F>, |
| 1489 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1494 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1490 //Pair<S, Z>: ClosedMul<F>, |
1495 //Pair<S, Z>: ClosedMul<F>, |
| 1491 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1496 DiscreteMeasure<U, F>: SpikeMerging<F> + Norm<Radon, F>, |
| 1492 Reg: SlidingRegTerm<U, F>, |
1497 Reg: SlidingRegTerm<U, F>, |
| 1493 P: TransportProxPenalty<U, S, Reg, F>, |
1498 P: TransportProxPenalty<U, S, Reg, F>, |
| 1494 KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> |
1499 KOpZ: BoundedLinear<Z, L2, L2, F, Codomain = Y> |
| 1495 + GEMV<F, Z> |
1500 + GEMV<F, Z> |
| 1496 + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, |
1501 + SimplyAdjointable<Z, Y, AdjointCodomain = Z>, |
| 1497 KOpZ::SimpleAdjoint: GEMV<F, Y>, |
1502 KOpZ::SimpleAdjoint: GEMV<F, Y>, |
| 1498 Y: ClosedEuclidean<F> + Clone, |
1503 Y: ClosedEuclidean<F> + Clone, |
| 1499 for<'b> &'b Y: Instance<Y>, |
1504 for<'b> &'b Y: Instance<Y>, |
| 1500 Z: ClosedEuclidean<F> + Clone + ClosedMul<F> + AXPY, |
1505 Z: ClosedEuclidean<F> + Clone + ClosedMul<F> + AXPY, |
| 1501 for<'b> &'b Z: Instance<Z>, |
1506 for<'b> &'b Z: Instance<Z>, // compiler overflow + Mul<F, Output = Z>, |
| 1502 R: Prox<Z, Codomain = F>, |
1507 R: Prox<Z, Codomain = F>, |
| 1503 H: Conjugable<Y, F, Codomain = F>, |
1508 H: Conjugable<Y, F, Codomain = F>, |
| 1504 for<'b> H::Conjugate<'b>: Prox<Y>, |
1509 for<'b> H::Conjugate<'b>: Prox<Y>, |
| 1505 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1510 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1506 { |
1511 { |
| 1570 U: Space + Clone + Dist<L2, F>, |
1575 U: Space + Clone + Dist<L2, F>, |
| 1571 for<'a> &'a U: Instance<U>, |
1576 for<'a> &'a U: Instance<U>, |
| 1572 I: AlgIteratorFactory<IterInfo<F>>, |
1577 I: AlgIteratorFactory<IterInfo<F>>, |
| 1573 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1578 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1574 + BoundedCurvature<F>, |
1579 + BoundedCurvature<F>, |
| 1575 S: ClosedMul<F>, |
1580 S: ClosedMul<F> + MinMaxMapping<U, F>, |
| 1576 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1581 DiscreteMeasure<U, F>: SpikeMerging<F> + Norm<Radon, F>, |
| 1577 Reg: SlidingRegTerm<U, F>, |
1582 Reg: SlidingRegTerm<U, F>, |
| 1578 P: TransportProxPenalty<U, S, Reg, F>, |
1583 P: TransportProxPenalty<U, S, Reg, F>, |
| 1579 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1584 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1580 Z: ClosedEuclidean<F> + AXPY + Clone, |
1585 Z: ClosedEuclidean<F> + AXPY + Clone, |
| 1581 for<'b> &'b Z: Instance<Z>, |
1586 for<'b> &'b Z: Instance<Z>, // compiler overflow + Mul<F, Output = Z>, |
| 1582 R: Prox<Z, Codomain = F>, |
1587 R: Prox<Z, Codomain = F>, |
| 1583 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1588 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1584 { |
1589 { |
| 1585 run_fb_pair_dom(f, reg, prox_penalty, fnR, init, &mut FullSpace, cont) |
1590 run_fb_pair_dom(f, reg, prox_penalty, fnR, init, &mut FullSpace, cont) |
| 1586 } |
1591 } |
| 1613 U: Space + Clone + Dist<L2, F>, |
1618 U: Space + Clone + Dist<L2, F>, |
| 1614 for<'a> &'a U: Instance<U>, |
1619 for<'a> &'a U: Instance<U>, |
| 1615 I: AlgIteratorFactory<IterInfo<F>>, |
1620 I: AlgIteratorFactory<IterInfo<F>>, |
| 1616 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
1621 Dat: DifferentiableMapping<MeasureZ<F, Z, U>, Codomain = F, DerivativeDomain = Pair<S, Z>> |
| 1617 + BoundedCurvature<F>, |
1622 + BoundedCurvature<F>, |
| 1618 S: ClosedMul<F>, |
1623 S: ClosedMul<F> + MinMaxMapping<U, F>, |
| 1619 DiscreteMeasure<U, F>: SpikeMerging<F>, |
1624 DiscreteMeasure<U, F>: SpikeMerging<F> + Norm<Radon, F>, |
| 1620 Reg: SlidingRegTerm<U, F>, |
1625 Reg: SlidingRegTerm<U, F>, |
| 1621 P: TransportProxPenalty<U, S, Reg, F>, |
1626 P: TransportProxPenalty<U, S, Reg, F>, |
| 1622 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
1627 for<'a> Pair<&'a P, &'a IdOp<Z>>: StepLengthBoundPair<F, Dat>, |
| 1623 Z: ClosedEuclidean<F> + AXPY + Clone, |
1628 Z: ClosedEuclidean<F> + AXPY + Clone, |
| 1624 for<'b> &'b Z: Instance<Z>, |
1629 for<'b> &'b Z: Instance<Z>, // compiler overflow + Mul<F, Output = Z>, |
| 1625 R: Prox<Z, Codomain = F>, |
1630 R: Prox<Z, Codomain = F>, |
| 1626 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
1631 Plot: Plotter<P::ReturnMapping, S, DiscreteMeasure<U, F>>, |
| 1627 { |
1632 { |
| 1628 let pt = P::prox_type(); |
1633 let pt = P::prox_type(); |
| 1629 |
1634 |