# sburdiug/my_optimization_methods architecture

> Architecture diagram of the GitHub repository sburdiug/my_optimization_methods, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sburdiug/my_optimization_methods
- Repository: https://github.com/sburdiug/my_optimization_methods

## Overview

This repository is a collection of numerical-analysis and optimization methods, rather than a single application. Its optimization work includes standalone methods and a reusable `cw/optimization` implementation with numerical gradients, line searches, and experiment/plotting support. Other branches cover root finding, linear systems, interpolation, and differential-equation solving; the sampled Kolmogorov example uses RK4 and plots state probabilities. The README is empty, so capabilities and relationships beyond the sampled code and source index are not documented here.

Main entry points: [`cw/optimization/partan_steepest_descent.py`](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/partan_steepest_descent.py) (PARTAN descent), [`cw/optimization/line_search.py`](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/line_search.py) (Line search), [`cw/optimization/experiments.py`](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/experiments.py) (Optimization experiments), [`cw/optimization/steepest_descent.py`](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/steepest_descent.py) (Steepest descent)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cw_opt["Reusable optimization"]
  node_cw_sd["Steepest descent"]
  node_cw_partan["PARTAN descent"]
  node_function_tools["Objective functions<br/>[functions.py]"]
  node_gradients["Numerical gradients<br/>[gradients.py]"]
  node_line_search["Line search<br/>[line_search.py]"]
  node_sven["Sven interval<br/>[sven.py]"]
  node_golden["Golden section"]
  node_powell1d["Powell search<br/>[powell_method.py]"]
  node_penalty["Penalty methods<br/>[penalty.py]"]
  node_experiments["Optimization experiments<br/>[experiments.py]"]
  node_plots["Optimization plots<br/>[plots.py]"]
end

subgraph group_standalone_opt["Standalone optimization"]
  node_optimal_step["Optimal-step descent"]
  node_constant_step["Constant-step descent"]
  node_partan_standalone["PARTAN method"]
  node_powell_method["Powell method<br/>[powell_method.py]"]
  node_dfp["DFP method<br/>[dfp_method.py]"]
  node_fletcher["Fletcher–Reeves"]
  node_other_opt["Other optimization methods"]
end

subgraph group_numerical["Numerical methods"]
  node_root_methods["Root finding"]
  node_linear_methods["Linear systems"]
  node_spline["Spline interpolation<br/>[splayn.py]"]
  node_tridiagonal["Progonki solver<br/>[method_progonki.py]"]
end

subgraph group_dynamics["ODE and probability"]
  node_kolmogorov["Kolmogorov model<br/>[main.py]"]
  node_rk4["RK4 integrator<br/>[rk4.py]"]
  node_probability_plot["Probability plots<br/>[main.py]"]
end

node_user(("Method user"))

node_user -.->|"runs"| node_cw_sd
node_user -.->|"runs"| node_cw_partan
node_user -.->|"runs"| node_optimal_step
node_user -->|"runs"| node_kolmogorov
node_cw_sd -->|"counts calls"| node_function_tools
node_cw_sd -->|"computes gradient"| node_gradients
node_cw_sd -->|"searches step"| node_line_search
node_cw_partan -->|"counts calls"| node_function_tools
node_cw_partan -->|"computes gradient"| node_gradients
node_cw_partan -->|"searches step"| node_line_search
node_line_search -->|"brackets interval"| node_sven
node_line_search -->|"minimizes"| node_golden
node_line_search -->|"minimizes"| node_powell1d
node_experiments -->|"runs experiments"| node_cw_partan
node_experiments -->|"compares methods"| node_optimal_step
node_experiments -->|"tests penalties"| node_penalty
node_experiments -->|"visualizes results"| node_plots
node_spline -->|"solves system"| node_tridiagonal
node_kolmogorov -->|"integrates model"| node_rk4
node_kolmogorov -->|"plots states"| node_probability_plot
node_user -.->|"runs"| node_dfp
node_user -.->|"runs"| node_fletcher
node_user -.->|"runs"| node_root_methods
node_user -.->|"runs"| node_linear_methods

click node_cw_sd "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/steepest_descent.py"
click node_cw_partan "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/partan_steepest_descent.py"
click node_function_tools "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/functions.py"
click node_gradients "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/gradients.py"
click node_line_search "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/line_search.py"
click node_sven "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/sven.py"
click node_golden "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/golden_section_method.py"
click node_powell1d "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/powell_method.py"
click node_penalty "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/penalty.py"
click node_experiments "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/experiments.py"
click node_plots "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/plots.py"
click node_optimal_step "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/steepest_descent_optimal_step.py"
click node_constant_step "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/steepest_descent_constant_step.py"
click node_partan_standalone "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/partan_steepest_descent_method.py"
click node_powell_method "https://github.com/sburdiug/my_optimization_methods/blob/main/cw/powell_method.py"
click node_dfp "https://github.com/sburdiug/my_optimization_methods/blob/main/opt%20methods/dfp_method.py"
click node_fletcher "https://github.com/sburdiug/my_optimization_methods/blob/main/opt%20methods/fletcher_reeves_method.py"
click node_other_opt "https://github.com/sburdiug/my_optimization_methods/tree/main/opt%20methods"
click node_root_methods "https://github.com/sburdiug/my_optimization_methods/tree/main/numb%20methods"
click node_linear_methods "https://github.com/sburdiug/my_optimization_methods/tree/main/numb%20methods"
click node_spline "https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/splayn.py"
click node_tridiagonal "https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/method_progonki.py"
click node_kolmogorov "https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/main.py"
click node_rk4 "https://github.com/sburdiug/my_optimization_methods/blob/main/randoms/rk4.py"
click node_probability_plot "https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/main.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cw_sd,node_cw_partan,node_function_tools,node_gradients,node_line_search,node_sven,node_golden,node_powell1d,node_penalty,node_experiments,node_plots,node_user toneBlue
class node_optimal_step,node_constant_step,node_partan_standalone,node_powell_method,node_dfp,node_fletcher,node_other_opt toneAmber
class node_root_methods,node_linear_methods,node_spline,node_tridiagonal toneMint
class node_kolmogorov,node_rk4,node_probability_plot toneRose
```

## Components

### Reusable optimization

- [Steepest descent](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/steepest_descent.py): `cw/optimization/steepest_descent.py`
- [PARTAN descent](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/partan_steepest_descent.py): `cw/optimization/partan_steepest_descent.py`
- [Objective functions](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/functions.py): `cw/optimization/functions.py`
- [Numerical gradients](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/gradients.py): `cw/optimization/gradients.py`
- [Line search](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/line_search.py): `cw/optimization/line_search.py`
- [Sven interval](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/sven.py): `cw/sven.py`
- [Golden section](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/golden_section_method.py): `cw/golden_section_method.py`
- [Powell search](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/powell_method.py): `cw/powell_method.py`
- [Penalty methods](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/penalty.py): `cw/optimization/penalty.py`
- [Optimization experiments](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/experiments.py): `cw/optimization/experiments.py`
- [Optimization plots](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/optimization/plots.py): `cw/optimization/plots.py`

### Standalone optimization

- [Optimal-step descent](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/steepest_descent_optimal_step.py): `cw/steepest_descent_optimal_step.py`
- [Constant-step descent](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/steepest_descent_constant_step.py): `cw/steepest_descent_constant_step.py`
- [PARTAN method](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/partan_steepest_descent_method.py): `cw/partan_steepest_descent_method.py`
- [Powell method](https://github.com/sburdiug/my_optimization_methods/blob/main/cw/powell_method.py): `cw/powell_method.py`
- [DFP method](https://github.com/sburdiug/my_optimization_methods/blob/main/opt%20methods/dfp_method.py): `opt methods/dfp_method.py`
- [Fletcher–Reeves](https://github.com/sburdiug/my_optimization_methods/blob/main/opt%20methods/fletcher_reeves_method.py): `opt methods/fletcher_reeves_method.py`
- [Other optimization methods](https://github.com/sburdiug/my_optimization_methods/tree/main/opt%20methods): `opt methods`

### Numerical methods

- [Root finding](https://github.com/sburdiug/my_optimization_methods/tree/main/numb%20methods): `numb methods`
- [Linear systems](https://github.com/sburdiug/my_optimization_methods/tree/main/numb%20methods): `numb methods`
- [Spline interpolation](https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/splayn.py): `numb methods/splayn.py`
- [Progonki solver](https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/method_progonki.py): `numb methods/method_progonki.py`

### ODE and probability

- [Kolmogorov model](https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/main.py): `numb methods/main.py`
- [RK4 integrator](https://github.com/sburdiug/my_optimization_methods/blob/main/randoms/rk4.py): `randoms/rk4.py`
- [Probability plots](https://github.com/sburdiug/my_optimization_methods/blob/main/numb%20methods/main.py): `numb methods/main.py`

### Other components

- **Method user**

## Connections

- Method user → Steepest descent: runs
- Method user → PARTAN descent: runs
- Method user → Optimal-step descent: runs
- Method user → Kolmogorov model: runs (evidence: `numb methods/main.py`)
- Steepest descent → Objective functions: counts calls (evidence: `cw/optimization/steepest_descent.py`)
- Steepest descent → Numerical gradients: computes gradient (evidence: `cw/optimization/steepest_descent.py`)
- Steepest descent → Line search: searches step (evidence: `cw/optimization/steepest_descent.py`)
- PARTAN descent → Objective functions: counts calls (evidence: `cw/optimization/partan_steepest_descent.py`)
- PARTAN descent → Numerical gradients: computes gradient (evidence: `cw/optimization/partan_steepest_descent.py`)
- PARTAN descent → Line search: searches step (evidence: `cw/optimization/partan_steepest_descent.py`)
- Line search → Sven interval: brackets interval (evidence: `cw/optimization/line_search.py`)
- Line search → Golden section: minimizes (evidence: `cw/optimization/line_search.py`)
- Line search → Powell search: minimizes (evidence: `cw/optimization/line_search.py`)
- Optimization experiments → PARTAN descent: runs experiments (evidence: `cw/optimization/experiments.py`)
- Optimization experiments → Optimal-step descent: compares methods (evidence: `cw/optimization/experiments.py`)
- Optimization experiments → Penalty methods: tests penalties (evidence: `cw/optimization/experiments.py`)
- Optimization experiments → Optimization plots: visualizes results (evidence: `cw/optimization/experiments.py`)
- Spline interpolation → Progonki solver: solves system (evidence: `numb methods/splayn.py`)
- Kolmogorov model → RK4 integrator: integrates model (evidence: `numb methods/main.py`)
- Kolmogorov model → Probability plots: plots states (evidence: `numb methods/main.py`)
- Method user → DFP method: runs
- Method user → Fletcher–Reeves: runs
- Method user → Root finding: runs
- Method user → Linear systems: runs
