View source: R/255_zzz_R_specific_visualize.R
| visualize | R Documentation |
Displays the Smith form decomposition of a convex optimization problem, showing each stage of the DCP canonicalization pipeline: expression tree, Smith form, relaxed Smith form, conic form, and (optionally) standard cone form and solver data.
visualize(
problem,
output = c("text", "json", "html", "latex", "tikz"),
solver = NULL,
digits = 4L,
file = NULL,
open = interactive(),
doc_base = "https://cvxr.rbind.io/reference/"
)
problem |
A Problem object. |
output |
Character: output format.
|
solver |
Solver specification for matrix stuffing stages (4-5).
|
digits |
Integer: significant digits for displaying scalar constants. Integer-valued constants (0, 1, -3) always display without decimals regardless of this setting. Defaults to 4. |
file |
Character: path for HTML output file. If |
open |
Logical: whether to open the HTML file in a browser.
Defaults to |
doc_base |
Character: base URL for atom documentation links. Defaults to the CVXR pkgdown site. |
For "text": invisible model list.
For "json": a JSON string (or list if jsonlite not available).
For "html": the file path (invisibly).
For other formats: the rendered output (Phase 2+).
## Not run:
x <- Variable(3, name = "x")
prob <- Problem(Minimize(p_norm(x, 2)), list(x >= 1))
visualize(prob) # Stages 0-3 only
visualize(prob, solver = TRUE) # Stages 0-5, default solver
visualize(prob, solver = "Clarabel") # Stages 0-5, specific solver
visualize(prob, output = "html", solver = TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.