src/subproblem.rs

branch
dev
changeset 63
7a8a55fd41c0
parent 39
6316d68b58af
--- a/src/subproblem.rs	Thu Feb 26 11:38:43 2026 -0500
+++ b/src/subproblem.rs	Thu Feb 26 11:36:22 2026 -0500
@@ -2,25 +2,21 @@
 Iterative algorithms for solving the finite-dimensional subproblem.
 */
 
-use serde::{Serialize, Deserialize};
+use alg_tools::iterate::{AlgIteratorOptions, Verbose};
+use clap::ValueEnum;
 use numeric_literals::replace_float_literals;
-use alg_tools::iterate::{
-    AlgIteratorOptions,
-    Verbose,
-
-};
+use serde::{Deserialize, Serialize};
 
 use crate::types::*;
 
+pub mod l1squared_nonneg;
+pub mod l1squared_unconstrained;
 pub mod nonneg;
 pub mod unconstrained;
-pub mod l1squared_unconstrained;
-pub mod l1squared_nonneg;
-
 
 /// Method for solving finite-dimensional subproblems.
 /// Not all outer methods necessarily support all options.
-#[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug)]
+#[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug, ValueEnum)]
 #[allow(dead_code)]
 pub enum InnerMethod {
     /// Forward-backward
@@ -29,43 +25,48 @@
     SSN,
     /// PDPS
     PDPS,
+    /// Proximal point method
+    PP,
 }
 
 /// Settings for the solution of finite-dimensional subproblems
 #[derive(Clone, Copy, Eq, PartialEq, Serialize, Deserialize, Debug)]
-pub struct InnerSettings<F : Float> {
+pub struct InnerSettings<F: Float> {
     /// Method
-    pub method : InnerMethod,
+    pub method: InnerMethod,
     /// Proportional step length ∈ [0, 1) for `InnerMethod::FB`.
-    pub fb_τ0 : F,
+    pub fb_τ0: F,
     /// Proportional primal and dual step lengths for `InnerMethod::PDPS`.
-    pub pdps_τσ0 : (F, F),
+    pub pdps_τσ0: (F, F),
+    /// Proximal point step length parameter and its growth
+    pub pp_τ: (F, F),
     /// Fraction of `tolerance` given to inner algorithm
-    pub tolerance_mult : F,
+    pub tolerance_mult: F,
     /// Iterator options
     #[serde(flatten)]
-    pub iterator_options : AlgIteratorOptions,
+    pub iterator_options: AlgIteratorOptions,
 }
 
 #[replace_float_literals(F::cast_from(literal))]
-impl<F : Float> Default for InnerSettings<F> {
+impl<F: Float> Default for InnerSettings<F> {
     fn default() -> Self {
         InnerSettings {
-            fb_τ0 : 0.99,
-            pdps_τσ0 : (1.98, 0.5),
-            iterator_options : AlgIteratorOptions {
+            fb_τ0: 0.99,
+            pdps_τσ0: (1.98, 0.5),
+            pp_τ: (100.0, 100.0),
+            iterator_options: AlgIteratorOptions {
                 // max_iter cannot be very small, as initially FB needs many iterations, although
                 // on later invocations even one or two tends to be enough
-                max_iter : 2000,
+                max_iter: 2000,
                 // verbose_iter affects testing of sufficient convergence, so we set it to
                 // a small value…
-                verbose_iter : Verbose::Every(1),
+                verbose_iter: Verbose::Every(1),
                 // … but don't print out anything
-                quiet : true,
-                .. Default::default()
+                quiet: true,
+                ..Default::default()
             },
-            method : InnerMethod::SSN,
-            tolerance_mult : 0.01,
+            method: InnerMethod::SSN,
+            tolerance_mult: 0.01,
         }
     }
 }

mercurial