diff --git a/docs/src/.vitepress/theme/components/AtomTable.vue b/docs/src/.vitepress/theme/components/AtomTable.vue new file mode 100644 index 0000000..1b756cd --- /dev/null +++ b/docs/src/.vitepress/theme/components/AtomTable.vue @@ -0,0 +1,909 @@ + + + + + diff --git a/docs/src/.vitepress/theme/index.ts b/docs/src/.vitepress/theme/index.ts index 463b5d8..80520e2 100644 --- a/docs/src/.vitepress/theme/index.ts +++ b/docs/src/.vitepress/theme/index.ts @@ -4,6 +4,7 @@ import type { Theme } from 'vitepress' import DefaultTheme from 'vitepress/theme' import { enhanceAppWithTabs } from 'vitepress-plugin-tabs/client' +import AtomTable from './components/AtomTable.vue' import './style.css' export default { @@ -15,5 +16,6 @@ export default { }, enhanceApp({ app, router, siteData }) { enhanceAppWithTabs(app) + app.component('AtomTable', AtomTable) } } satisfies Theme \ No newline at end of file diff --git a/docs/src/atoms.md b/docs/src/atoms.md index 4bb1018..4b6ce16 100644 --- a/docs/src/atoms.md +++ b/docs/src/atoms.md @@ -2,110 +2,32 @@ This page is intended to be a reference for the atoms that are currently implemented in this package with their respective properties. As much as possible atoms are created with functions from base, standard libraries and popular packages, but we also inherit a few functions from the CVX family of packages such as `quad_form`, `quad_over_lin` etc. and also introduce some new functions in this package. Description of all such special functions implemented in this package is available in the [Special functions](@ref) section of the documentation. +Use the **dropdown menus** to filter by curvature, sign, or monotonicity. Click any **column header** to sort. Atom names link to their documentation — external links (marked with ↗) open in a new tab. + ## DCP Atoms -| Atom | Domain | Sign | Curvature | Monotonicity | -|:------------------------- |:------------------------------------------------------------------------------ |:--------- |:--------- |:------------------------------------------- | -| dot | (array_domain(ℝ), array_domain(ℝ)) | AnySign | Affine | Increasing | -| dotsort | (array_domain(ℝ, 1), array_domain(ℝ, 1)) | AnySign | Convex | (AnyMono, increasing_if_positive ∘ minimum) | -| StatsBase.geomean | array_domain(HalfLine{Real,:open}(), 1) | Positive | Concave | Increasing | -| StatsBase.harmmean | array_domain(HalfLine{Real,:open}(), 1) | Positive | Concave | Increasing | -| invprod | array_domain(HalfLine{Real,:open}()) | Positive | Convex | Decreasing | -| eigmax | symmetric_domain() | AnySign | Convex | AnyMono | -| eigmin | symmetric_domain() | AnySign | Concave | AnyMono | -| eigsummax | (array_domain(ℝ, 2), ℝ) | AnySign | Convex | AnyMono | -| eigsummin | (array_domain(ℝ, 2), ℝ) | AnySign | Concave | AnyMono | -| logdet | semidefinite_domain() | AnySign | Concave | AnyMono | -| LogExpFunctions.logsumexp | array_domain(ℝ, 2) | AnySign | Convex | Increasing | -| matrix_frac | (array_domain(ℝ, 1), definite_domain()) | AnySign | Convex | AnyMono | -| maximum | array_domain(ℝ) | AnySign | Convex | Increasing | -| minimum | array_domain(ℝ) | AnySign | Concave | Increasing | -| norm | (array_domain(ℝ), Interval{:closed, :open}(1, Inf)) | Positive | Convex | increasing_if_positive | -| norm | (array_domain(ℝ), Interval{:closed, :open}(0, 1)) | Positive | Convex | increasing_if_positive | -| perspective(f, x, s) | (function_domain(), ℝ, Positive) | Same as f | Same as f | AnyMono | -| quad_form | (array_domain(ℝ, 1), semidefinite_domain()) | Positive | Convex | (increasing_if_positive, Increasing) | -| quad_over_lin | (array_domain(ℝ), HalfLine{Real,:open}()) | Positive | Convex | (increasing_if_positive, Decreasing) | -| quad_over_lin | (ℝ, HalfLine{Real,:open}()) | Positive | Convex | (increasing_if_positive, Decreasing) | -| sum | array_domain(ℝ, 2) | AnySign | Affine | Increasing | -| sum_largest | (array_domain(ℝ, 2), ℤ) | AnySign | Convex | Increasing | -| sum_smallest | (array_domain(ℝ, 2), ℤ) | AnySign | Concave | Increasing | -| tr | array_domain(ℝ, 2) | AnySign | Affine | Increasing | -| trinv | definite_domain() | Positive | Convex | AnyMono | -| tv | array_domain(ℝ, 1) | Positive | Convex | AnyMono | -| tv | array_domain(array_domain(ℝ, 2), 1) | Positive | Convex | AnyMono | -| abs | ℂ | Positive | Convex | increasing_if_positive | -| conj | ℂ | AnySign | Affine | AnyMono | -| exp | ℝ | Positive | Convex | Increasing | -| xlogx | ℝ | AnySign | Convex | AnyMono | -| huber | (ℝ, HalfLine()) | Positive | Convex | increasing_if_positive | -| imag | ℂ | AnySign | Affine | AnyMono | -| inv | HalfLine{Real,:open}() | Positive | Convex | Decreasing | -| log | HalfLine{Real,:open}() | AnySign | Concave | Increasing | -| log | array_domain(ℝ, 2) | Positive | Concave | Increasing | -| inv | semidefinite_domain() | AnySign | Convex | Decreasing | -| sqrt | semidefinite_domain() | Positive | Concave | Increasing | -| kldivergence | (array_domain(HalfLine{Real,:open}, 1), array_domain(HalfLine{Real,:open}, 1)) | Positive | Convex | AnyMono | -| lognormcdf | ℝ | Negative | Concave | Increasing | -| log1p | Interval{:open,:open}(-1, Inf) | Negative | Concave | Increasing | -| logistic | ℝ | Positive | Convex | Increasing | -| max | (ℝ, ℝ) | AnySign | Convex | Increasing | -| min | (ℝ, ℝ) | AnySign | Concave | Increasing | -| ^(x, i) | See below | See below | See below | See below | -| real | ℂ | AnySign | Affine | Increasing | -| rel_entr | (HalfLine{Real,:open}(), HalfLine{Real,:open}()) | AnySign | Convex | (AnyMono, Decreasing) | -| sqrt | HalfLine() | Positive | Concave | Increasing | -| xexpx | HalfLine | Positive | Convex | Increasing | -| conv | (array_domain(ℝ, 1), array_domain(ℝ, 1)) | AnySign | Affine | AnyMono | -| cumsum | array_domain(ℝ) | AnySign | Affine | Increasing | -| diagm | array_domain(ℝ, 1) | AnySign | Affine | Increasing | -| diag | array_domain(ℝ, 2) | AnySign | Affine | Increasing | -| diff | array_domain(ℝ) | AnySign | Affine | Increasing | -| kron | (array_domain(ℝ, 2), array_domain(ℝ, 2)) | AnySign | Affine | Increasing | +```@raw html + +``` -### Special Cases for ^(x, i) +### Special Cases for `^(x, i)` -| Condition on i | Domain | Sign | Curvature | Monotonicity | -|:----------------- |:--------------------------- |:-------- |:--------- |:---------------------- | -| i = 1 | ℝ | AnySign | Affine | Increasing | -| i is even integer | ℝ | Positive | Convex | increasing_if_positive | -| i is odd integer | HalfLine() | Positive | Convex | Increasing | -| i ≥ 1 | HalfLine() | Positive | Convex | Increasing | -| 0 < i < 1 | HalfLine() | Positive | Concave | Increasing | -| i < 0 | HalfLine{Float64,:closed}() | Positive | Convex | Increasing | +```@raw html + +``` -## DGCP Atoms (Symmetric Positive Definite) +## DGCP Atoms (SPD) -| Atom | Sign | Geodesic Curvature | Monotonicity | -|:-------------------------- |:-------- |:------------------ |:------------ | -| LinearAlgebra.logdet | Positive | GLinear | GIncreasing | -| conjugation | Positive | GConvex | GIncreasing | -| LinearAlgebra.tr | Positive | GConvex | GIncreasing | -| sum | Positive | GConvex | GIncreasing | -| adjoint | Positive | GLinear | GIncreasing | -| scalar_mat | Positive | GConvex | GIncreasing | -| LinearAlgebra.diag | Positive | GConvex | GIncreasing | -| sdivergence | Positive | GConvex | GIncreasing | -| Manifolds.distance | Positive | GConvex | GAnyMono | -| SymbolicAnalysis.quad_form | Positive | GConvex | GIncreasing | -| LinearAlgebra.eigmax | Positive | GConvex | GIncreasing | -| log_quad_form | Positive | GConvex | GIncreasing | -| inv | Positive | GConvex | GDecreasing | -| diag | Positive | GConvex | GIncreasing | -| eigsummax | Positive | GConvex | GIncreasing | -| schatten_norm | Positive | GConvex | GIncreasing | -| sum_log_eigmax | Positive | GConvex | GIncreasing | -| affine_map | Positive | GConvex | GIncreasing | -| hadamard_product | Positive | GConvex | GIncreasing | +```@raw html + +``` -## DGCP Atoms (Lorentz Model) +## DGCP Atoms (Lorentz) -| Atom | Sign | Geodesic Curvature | Monotonicity | -|:----------------------------- |:-------- |:------------------ |:------------ | -| lorentz_distance | Positive | GConvex | GAnyMono | -| lorentz_log_barrier | Positive | GConvex | GIncreasing | -| lorentz_homogeneous_quadratic | Positive | GConvex | GAnyMono | -| lorentz_homogeneous_diagonal | Positive | GConvex | GAnyMono | -| lorentz_least_squares | Positive | GConvex | GAnyMono | -| lorentz_transform | - | - | - | +```@raw html + +``` -Note: `lorentz_transform` does not have specific geodesic curvature properties by itself, but it preserves geodesic convexity when applied to geodesically convex functions. +!!! note + `lorentz_transform` does not have specific geodesic curvature properties by itself, + but it preserves geodesic convexity when applied to geodesically convex functions. diff --git a/docs/src/data/dcp_atoms.json b/docs/src/data/dcp_atoms.json new file mode 100644 index 0000000..39ba613 --- /dev/null +++ b/docs/src/data/dcp_atoms.json @@ -0,0 +1,471 @@ +[ + { + "atom": "dot", + "meaning": "x^\\top y", + "domain": "\\mathbb{R}^n \\times \\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.dot" + }, + { + "atom": "dotsort", + "meaning": "\\operatorname{sort}(x)^\\top \\operatorname{sort}(y)", + "domain": "\\mathbb{R}^n \\times \\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "(Any, Incr. if pos. ∘ minimum)" + }, + { + "atom": "geomean", + "meaning": "\\left(\\prod_{i=1}^n x_i\\right)^{1/n}", + "domain": "\\mathbb{R}_{++}^n", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://juliastats.org/StatsBase.jl/stable/scalarstats/#StatsBase.geomean" + }, + { + "atom": "harmmean", + "meaning": "\\frac{n}{\\sum_{i=1}^n x_i^{-1}}", + "domain": "\\mathbb{R}_{++}^n", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://juliastats.org/StatsBase.jl/stable/scalarstats/#StatsBase.harmmean" + }, + { + "atom": "invprod", + "meaning": "\\frac{1}{\\prod_{i} x_i}", + "domain": "\\mathbb{R}_{++}^n", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Decreasing" + }, + { + "atom": "eigmax", + "meaning": "\\lambda_{\\max}(X)", + "domain": "\\mathbb{S}^n", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Any", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.eigmax" + }, + { + "atom": "eigmin", + "meaning": "\\lambda_{\\min}(X)", + "domain": "\\mathbb{S}^n", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Any", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.eigmin" + }, + { + "atom": "eigsummax", + "meaning": "\\sum_{i=1}^{k} \\lambda_i^{\\downarrow}(X)", + "domain": "\\mathbb{R}^{m \\times n} \\times \\mathbb{R}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Any" + }, + { + "atom": "eigsummin", + "meaning": "\\sum_{i=1}^{k} \\lambda_i^{\\uparrow}(X)", + "domain": "\\mathbb{R}^{m \\times n} \\times \\mathbb{R}", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Any" + }, + { + "atom": "logdet", + "meaning": "\\log \\det(X)", + "domain": "\\mathbb{S}_+^n", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Any", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.logdet" + }, + { + "atom": "logsumexp", + "meaning": "\\log \\sum_{i} e^{x_i}", + "domain": "\\mathbb{R}^{m \\times n}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://juliastats.org/LogExpFunctions.jl/stable/api/#LogExpFunctions.logsumexp" + }, + { + "atom": "matrix_frac", + "meaning": "x^\\top P^{-1} x", + "domain": "\\mathbb{R}^n \\times \\mathbb{S}_{++}^n", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Any" + }, + { + "atom": "maximum", + "meaning": "\\max_i\\, x_i", + "domain": "\\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/collections/#Base.maximum" + }, + { + "atom": "minimum", + "meaning": "\\min_i\\, x_i", + "domain": "\\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/collections/#Base.minimum" + }, + { + "atom": "norm (p ≥ 1)", + "meaning": "\\|x\\|_p", + "domain": "\\mathbb{R}^n \\times [1, \\infty)", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Incr. if pos.", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.norm" + }, + { + "atom": "norm (0 < p < 1)", + "meaning": "\\|x\\|_p", + "domain": "\\mathbb{R}^n \\times [0, 1)", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Incr. if pos.", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.norm" + }, + { + "atom": "perspective(f, x, s)", + "meaning": "s \\cdot f(x/s)", + "domain": "f \\times \\mathbb{R} \\times \\mathbb{R}_+", + "sign": "Same as f", + "curvature": "Same as f", + "monotonicity": "Any" + }, + { + "atom": "quad_form", + "meaning": "x^\\top P x", + "domain": "\\mathbb{R}^n \\times \\mathbb{S}_+^n", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "(Incr. if pos., Increasing)" + }, + { + "atom": "quad_over_lin", + "meaning": "\\|x\\|_2^2 / y", + "domain": "\\mathbb{R}^n \\times \\mathbb{R}_{++}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "(Incr. if pos., Decreasing)" + }, + { + "atom": "quad_over_lin", + "meaning": "x^2 / y", + "domain": "\\mathbb{R} \\times \\mathbb{R}_{++}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "(Incr. if pos., Decreasing)" + }, + { + "atom": "sum", + "meaning": "\\sum_{ij} X_{ij}", + "domain": "\\mathbb{R}^{m \\times n}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/collections/#Base.sum" + }, + { + "atom": "sum_largest", + "meaning": "\\sum_{i=1}^{k} x_i^{\\downarrow}", + "domain": "\\mathbb{R}^{m \\times n} \\times \\mathbb{Z}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Increasing" + }, + { + "atom": "sum_smallest", + "meaning": "\\sum_{i=1}^{k} x_i^{\\uparrow}", + "domain": "\\mathbb{R}^{m \\times n} \\times \\mathbb{Z}", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Increasing" + }, + { + "atom": "tr", + "meaning": "\\operatorname{tr}(X)", + "domain": "\\mathbb{R}^{m \\times n}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.tr" + }, + { + "atom": "trinv", + "meaning": "\\operatorname{tr}(X^{-1})", + "domain": "\\mathbb{S}_{++}^n", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Any" + }, + { + "atom": "tv (vector)", + "meaning": "\\sum_i |x_{i+1} - x_i|", + "domain": "\\mathbb{R}^n", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Any" + }, + { + "atom": "tv (matrix)", + "meaning": "\\sum_{i,j} \\|x_{i+1,j} - x_{i,j}\\|_2", + "domain": "(\\mathbb{R}^{m \\times n})^k", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Any" + }, + { + "atom": "abs", + "meaning": "|x|", + "domain": "\\mathbb{C}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Incr. if pos.", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.abs" + }, + { + "atom": "conj", + "meaning": "\\bar{x}", + "domain": "\\mathbb{C}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Any", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.conj" + }, + { + "atom": "exp", + "meaning": "e^x", + "domain": "\\mathbb{R}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.exp-Tuple{Float64}" + }, + { + "atom": "xlogx", + "meaning": "x \\log x", + "domain": "\\mathbb{R}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Any", + "docUrl": "https://juliastats.org/LogExpFunctions.jl/stable/api/#LogExpFunctions.xlogx" + }, + { + "atom": "huber", + "meaning": "\\begin{cases} x^2 \\quad |x|\\le M & \\\\ 2M|x|-M^2 & \\text{else} \\end{cases}", + "domain": "\\mathbb{R} \\times \\mathbb{R}_+", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Incr. if pos." + }, + { + "atom": "imag", + "meaning": "\\operatorname{Im}(x)", + "domain": "\\mathbb{C}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Any", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.imag" + }, + { + "atom": "inv (scalar)", + "meaning": "1/x", + "domain": "\\mathbb{R}_{++}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Decreasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.inv-Tuple{Number}" + }, + { + "atom": "log (scalar)", + "meaning": "\\log x", + "domain": "\\mathbb{R}_{++}", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.log-Tuple{Number}" + }, + { + "atom": "log (matrix)", + "meaning": "\\log(X)", + "domain": "\\mathbb{R}^{m \\times n}", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.log-Tuple{Number}" + }, + { + "atom": "inv (matrix)", + "meaning": "X^{-1}", + "domain": "\\mathbb{S}_+^n", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Decreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.inv-Tuple{AbstractMatrix}" + }, + { + "atom": "sqrt (matrix)", + "meaning": "X^{1/2}", + "domain": "\\mathbb{S}_+^n", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.sqrt-Tuple{AbstractMatrix}" + }, + { + "atom": "kldivergence", + "meaning": "\\sum_i x_i \\log\\!\\left(\\frac{x_i}{y_i}\\right)", + "domain": "\\mathbb{R}_{++}^n \\times \\mathbb{R}_{++}^n", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Any", + "docUrl": "https://juliastats.org/StatsBase.jl/stable/signalcorr/#StatsBase.kldivergence" + }, + { + "atom": "lognormcdf", + "meaning": "\\log \\Phi(x)", + "domain": "\\mathbb{R}", + "sign": "Negative", + "curvature": "Concave", + "monotonicity": "Increasing" + }, + { + "atom": "log1p", + "meaning": "\\log(1 + x)", + "domain": "(-1, \\infty)", + "sign": "Negative", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.log1p" + }, + { + "atom": "logistic", + "meaning": "\\log(1 + e^x)", + "domain": "\\mathbb{R}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://juliastats.org/LogExpFunctions.jl/stable/api/#LogExpFunctions.logistic" + }, + { + "atom": "max", + "meaning": "\\max(x, y)", + "domain": "\\mathbb{R} \\times \\mathbb{R}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.max" + }, + { + "atom": "min", + "meaning": "\\min(x, y)", + "domain": "\\mathbb{R} \\times \\mathbb{R}", + "sign": "AnySign", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.min" + }, + { + "atom": "real", + "meaning": "\\operatorname{Re}(x)", + "domain": "\\mathbb{C}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.real" + }, + { + "atom": "rel_entr", + "meaning": "x \\log(x / y)", + "domain": "\\mathbb{R}_{++} \\times \\mathbb{R}_{++}", + "sign": "AnySign", + "curvature": "Convex", + "monotonicity": "(Any, Decreasing)" + }, + { + "atom": "sqrt (scalar)", + "meaning": "\\sqrt{x}", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/math/#Base.sqrt-Tuple{Real}" + }, + { + "atom": "xexpx", + "meaning": "x e^x", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing", + "docUrl": "https://juliastats.org/LogExpFunctions.jl/stable/api/#LogExpFunctions.xexpx" + }, + { + "atom": "conv", + "meaning": "x * y", + "domain": "\\mathbb{R}^n \\times \\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Any", + "docUrl": "https://docs.juliadsp.org/stable/convolutions/#DSP.conv" + }, + { + "atom": "cumsum", + "meaning": "\\left[\\sum_{j=1}^{i} x_j\\right]_i", + "domain": "\\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/arrays/#Base.cumsum" + }, + { + "atom": "diagm", + "meaning": "\\left[\\begin{smallmatrix}x_1 & & \\\\ & \\ddots & \\\\ & & x_n\\end{smallmatrix}\\right]", + "domain": "\\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.diagm" + }, + { + "atom": "diag", + "meaning": "[X_{11}, \\ldots, X_{nn}]", + "domain": "\\mathbb{R}^{m \\times n}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.diag" + }, + { + "atom": "diff", + "meaning": "[x_{i+1} - x_i]_i", + "domain": "\\mathbb{R}^n", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/base/arrays/#Base.diff" + }, + { + "atom": "kron", + "meaning": "X \\otimes Y", + "domain": "\\mathbb{R}^{m \\times n} \\times \\mathbb{R}^{m \\times n}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.kron" + } +] diff --git a/docs/src/data/dcp_power_atoms.json b/docs/src/data/dcp_power_atoms.json new file mode 100644 index 0000000..735d834 --- /dev/null +++ b/docs/src/data/dcp_power_atoms.json @@ -0,0 +1,50 @@ +[ + { + "condition": "i = 1", + "meaning": "x", + "domain": "\\mathbb{R}", + "sign": "AnySign", + "curvature": "Affine", + "monotonicity": "Increasing" + }, + { + "condition": "i \\text{ even integer}", + "meaning": "x^i", + "domain": "\\mathbb{R}", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Incr. if pos." + }, + { + "condition": "i \\text{ odd integer}", + "meaning": "x^i", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing" + }, + { + "condition": "i \\geq 1", + "meaning": "x^i", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing" + }, + { + "condition": "0 < i < 1", + "meaning": "x^i", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Concave", + "monotonicity": "Increasing" + }, + { + "condition": "i < 0", + "meaning": "x^i", + "domain": "\\mathbb{R}_+", + "sign": "Positive", + "curvature": "Convex", + "monotonicity": "Increasing" + } +] \ No newline at end of file diff --git a/docs/src/data/dgcp_lorentz_atoms.json b/docs/src/data/dgcp_lorentz_atoms.json new file mode 100644 index 0000000..4bc7863 --- /dev/null +++ b/docs/src/data/dgcp_lorentz_atoms.json @@ -0,0 +1,45 @@ +[ + { + "atom": "lorentz_distance", + "meaning": "d_{\\mathbb{H}}(p, q)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GAny", + "docUrl": "https://juliamanifolds.github.io/Manifolds.jl/stable/interface/#ManifoldsBase.distance-Tuple{AbstractManifold,%20Any,%20Any}" + }, + { + "atom": "lorentz_log_barrier", + "meaning": "-\\log(-1 + p_{d+1})", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "lorentz_homogeneous_quadratic", + "meaning": "p^\\top A\\, p", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GAny" + }, + { + "atom": "lorentz_homogeneous_diagonal", + "meaning": "\\sum_i a_i\\, p_i^2", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GAny" + }, + { + "atom": "lorentz_least_squares", + "meaning": "\\|y - Xp\\|_2^2", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GAny" + }, + { + "atom": "lorentz_transform", + "meaning": "Op", + "sign": "—", + "curvature": "—", + "monotonicity": "—" + } +] diff --git a/docs/src/data/dgcp_spd_atoms.json b/docs/src/data/dgcp_spd_atoms.json new file mode 100644 index 0000000..6577d6f --- /dev/null +++ b/docs/src/data/dgcp_spd_atoms.json @@ -0,0 +1,144 @@ +[ + { + "atom": "logdet", + "meaning": "\\log \\det(X)", + "sign": "Positive", + "curvature": "GLinear", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.logdet" + }, + { + "atom": "conjugation", + "meaning": "B^\\top X B", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "tr", + "meaning": "\\operatorname{tr}(X)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.tr" + }, + { + "atom": "sum", + "meaning": "\\sum_{ij} X_{ij}", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/base/collections/#Base.sum" + }, + { + "atom": "adjoint", + "meaning": "X^\\top", + "sign": "Positive", + "curvature": "GLinear", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#Base.adjoint" + }, + { + "atom": "scalar_mat", + "meaning": "\\operatorname{tr}(X) \\cdot I_k", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "diag", + "meaning": "[X_{11}, \\ldots, X_{nn}]", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.diag" + }, + { + "atom": "sdivergence", + "meaning": "\\log\\!\\det\\!\\tfrac{X+Y}{2} - \\tfrac{1}{2}\\log\\!\\det(XY)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "distance", + "meaning": "d_{\\mathbb{S}_{++}^n}(X, Y)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GAny", + "docUrl": "https://juliamanifolds.github.io/Manifolds.jl/stable/interface/#ManifoldsBase.distance-Tuple{AbstractManifold,%20Any,%20Any}" + }, + { + "atom": "quad_form", + "meaning": "x^\\top X x", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "eigmax", + "meaning": "\\lambda_{\\max}(X)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.eigmax" + }, + { + "atom": "log_quad_form", + "meaning": "\\log(y^\\top X y)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "inv", + "meaning": "X^{-1}", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GDecreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.inv-Tuple{AbstractMatrix}" + }, + { + "atom": "diag", + "meaning": "[X_{11}, \\ldots, X_{nn}]", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing", + "docUrl": "https://docs.julialang.org/en/v1/stdlib/LinearAlgebra/#LinearAlgebra.diag" + }, + { + "atom": "eigsummax", + "meaning": "\\sum_{i=1}^{k} \\lambda_i^{\\downarrow}(X)", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "schatten_norm", + "meaning": "\\left(\\sum_i \\sigma_i^p\\right)^{1/p}", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "sum_log_eigmax", + "meaning": "\\sum_{i=1}^{k} f(\\log \\lambda_i^{\\downarrow}(X))", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "affine_map", + "meaning": "g(B^\\top X B) + C", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + }, + { + "atom": "hadamard_product", + "meaning": "X \\circ Y", + "sign": "Positive", + "curvature": "GConvex", + "monotonicity": "GIncreasing" + } +]