Skip to content

Commit bc6e30d

Browse files
authored
Update docs and document MAXDEPTH. (#329)
1 parent b98580c commit bc6e30d

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

docs/src/advanced.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ for i=1:10
9999
end
100100
```
101101

102-
Using the tree structure
103-
------------------------
102+
Printing and the tree structure
103+
-------------------------------
104104

105105
A Convex problem is structured as a *tree*, with the *root* being the
106106
problem object, with branches to the objective and the set of constraints.
@@ -110,8 +110,16 @@ constants. Convex provides `children` methods from
110110
[AbstractTrees.jl](https://github.com/Keno/AbstractTrees.jl) so that the
111111
tree-traversal functions of that package can be used with Convex.jl problems
112112
and structures. This is what allows powers the printing of problems, expressions,
113-
and constraints. This can also be used to analyze the structure of a Convex.jl
114-
problem. For example,
113+
and constraints. The depth to which the tree corresponding to a problem,
114+
expression, or constraint is printed is controlled by the global variable
115+
`MAXDEPTH`, which defaults to 3. This can be changed by e.g. setting
116+
117+
```julia
118+
Convex.MAXDEPTH[] = 5
119+
```
120+
121+
The AbstractTrees methods can also be used to analyze the structure
122+
of a Convex.jl problem. For example,
115123

116124
```@repl 1
117125
using Convex, AbstractTrees

0 commit comments

Comments
 (0)