graph LR A[("vโ")] -->|"-2"| B[("vโ")] B -->|"1"| C[("vโ")] C -->|"1"| A style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#2ecc71,color:#fff
graph LR subgraph Input["Input Constraints"] A1("Edge Weights\nw(i,j)") end subgraph Detection["Cycle Detection"] B1{"Negative\nCycle?"} end subgraph Output["Result"] C1("Feasible โ ") C2("Infeasible โ\nโ Cutting Plane") end Input --> Detection Detection -->|"No"| C1 Detection -->|"Yes"| C2 style Input fill:#e3f2fd style Detection fill:#fff3e0 style Output fill:#e8f5e9
graph LR Start("Initialize\ndist = 0") --> Relax{"Relaxation\nchanged dist?"} Relax -->|"Yes"| FindCycle{"Find cycle\nin predecessor\ngraph"} FindCycle -->|"Cycle found"| Verify{"Is cycle\nnegative?"} Verify -->|"Yes"| Yield("Yield cycle ๐ค") Yield --> Relax Verify -->|"No"| Relax FindCycle -->|"No cycle"| Done("Done โ ") Relax -->|"No"| Done style Start fill:#2196f3,color:#fff style Relax fill:#ff9800,color:#fff style FindCycle fill:#9c27b0,color:#fff style Verify fill:#f44336,color:#fff style Yield fill:#4caf50,color:#fff style Done fill:#607d8b,color:#fff
graph LR A[("a")] -->|"cost=2\ntime=1"| B[("b")] B -->|"cost=3\ntime=2"| C[("c")] C -->|"cost=1\ntime=1"| A style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#2ecc71,color:#fff
graph LR Guess("Guess r") --> Weights("Compute\nwแตฃ(e) = c(e) - rยทt(e)") Weights --> NCF{"Negative\nCycle?"} NCF -->|"Yes โ r is too low"| Raise("Increase r") NCF -->|"No โ r is feasible"| Lower("Decrease r") Raise --> Weights Lower --> Weights style Guess fill:#9c27b0,color:#fff style Weights fill:#2196f3,color:#fff style NCF fill:#ff9800,color:#fff style Raise fill:#e74c3c,color:#fff style Lower fill:#4caf50,color:#fff
graph LR A[("a")] -->|"d(5,r)"| B[("b")] A -->|"d(2,r)"| C[("c")] B -->|"d(3,r)"| D[("d")] C -->|"d(4,r)"| D style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#2ecc71,color:#fff style D fill:#f39c12,color:#fff
graph LR Input("Current point x") --> Oracle("NetworkOracle") Oracle --> Decision{"Negative\nCycle?"} Decision -->|"No โ Feasible โ "| Done("Return empty") Decision -->|"Yes โ Infeasible โ"| Cut("Build cutting plane\n(gradient, intercept)") Cut --> Return("Return cut\nfor ellipsoid update") style Input fill:#2196f3,color:#fff style Oracle fill:#9c27b0,color:#fff style Decision fill:#ff9800,color:#fff style Done fill:#4caf50,color:#fff style Cut fill:#f44336,color:#fff style Return fill:#e91e63,color:#fff
graph LR A[("vโ")] -->|"|aโโ|"| B[("vโ")] B -->|"|aโโ|"| A A -->|"|aโโ|"| C[("vโ")] C -->|"|aโโ|"| A B -->|"|aโโ|"| C C -->|"|aโโ|"| B style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#2ecc71,color:#fff
graph LR A("Matrix A") --> B("Graph\n(sparsity)") B --> C("OptScaling\nOracle") C --> D("Cutting-Plane\n(Ellipsoid)") D --> E("Optimal\nScaling โ ") style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#9c27b0,color:#fff style D fill:#ff9800,color:#fff style E fill:#4caf50,color:#fff
graph LR FF1["FFโ\n(clk at tโ)"] -->|"D_max"| FF2["FFโ\n(clk at tโ)"] subgraph Constraints["Timing Constraints"] C1("tโ - tโ โค T_clk - D_max") C2("tโ - tโ โค D_min - T_hold") end FF1 --> Constraints FF2 --> Constraints style FF1 fill:#e74c3c,color:#fff style FF2 fill:#3498db,color:#fff style Constraints fill:#e3f2fd
graph LR A["Rโ"] -->|"2ns"| B["Rโ"] B -->|"3ns"| C["Rโ"] C -->|"1ns"| D["Rโ"] D -->|"2ns"| A B -->|"1ns"| D style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff style C fill:#2ecc71,color:#fff style D fill:#f39c12,color:#fff
graph LR subgraph Before["Before Scaling"] M1["|aโโ| |aโโ| |aโโ|\n|aโโ| |aโโ| |aโโ|\n|aโโ| |aโโ| |aโโ|"] end subgraph After["After Scaling"] M2["uโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน\nuโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน\nuโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน uโยท|aโโ|ยทuโโปยน"] end Before -->|"Find uแตข\nto minimize\nฯ/ฯ"| After style Before fill:#fff3e0 style After fill:#e8f5e9
graph TD NETOPTIM["netoptim-cpp\n๐๏ธ Network Oracles"] --> DIGRAPHX["digraphx-cpp\n๐ NegCycleFinder"] NETOPTIM --> ELLALGO["ellalgo-cpp\n๐ฏ Ellipsoid Method"] DIGRAPHX --> PY2CPP["py2cpp\n๐ฆ Python-like containers"] DIGRAPHX --> CPPCORO["cppcoro\n๐ Coroutine generators"] NETOPTIM --> XNETWORK["xnetwork-cpp\n๐ Graph structures"] style NETOPTIM fill:#e74c3c,color:#fff style DIGRAPHX fill:#3498db,color:#fff style ELLALGO fill:#2ecc71,color:#fff style PY2CPP fill:#f39c12,color:#fff style CPPCORO fill:#9c27b0,color:#fff style XNETWORK fill:#1abc9c,color:#fff
graph TD subgraph Cost["Cost Breakdown"] A("Parametric Search\n5-20 iterations") --> B("NCF per iteration\nO(VยทEยทC)") B --> C("Total O(VยทEยทCยทiters)") end style Cost fill:#e3f2fd style A fill:#2196f3,color:#fff style B fill:#ff9800,color:#fff style C fill:#f44336,color:#fff
graph LR A[("2")] -->|"eโ: 2.0"| B[("0")] A -->|"eโ: 1.0"| B style A fill:#e74c3c,color:#fff style B fill:#3498db,color:#fff
graph TD subgraph Fast["โก Fast Variants"] FAST_NET["netoptim-fast\n๐๏ธ Network Oracles"] --> FAST_DIGRAPH["digraphx-fast\n๐ CSR NegCycleFinder"] FAST_NET -.->|"runtime"| ELLALGO["ellalgo-cpp\n๐ฏ Ellipsoid Method"] end subgraph Original["๐ฆ Original"] NETOPTIM["netoptim-cpp\n๐๏ธ Network Oracles"] --> DIGRAPHX["digraphx-cpp\n๐ NegCycleFinder (generator)"] DIGRAPHX --> CPPCORO["cppcoro\n๐ Coroutines"] end FAST_DIGRAPH -->|"no deps"| STL["C++20 STL only"] NETOPTIM --> ELLALGO DIGRAPHX --> PY2CPP["py2cpp\n๐ฆ Containers"] NETOPTIM --> XNETWORK["xnetwork-cpp\n๐ Graph structures"] style FAST_NET fill:#e74c3c,color:#fff style FAST_DIGRAPH fill:#e74c3c,color:#fff style NETOPTIM fill:#3498db,color:#fff style DIGRAPHX fill:#3498db,color:#fff style ELLALGO fill:#2ecc71,color:#fff style STL fill:#9c27b0,color:#fff