Skip to content

Commit efdbae0

Browse files
committed
Tidy nonlinear docs
1 parent 776655f commit efdbae0

File tree

1 file changed

+30
-29
lines changed

1 file changed

+30
-29
lines changed

README.md

Lines changed: 30 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ The binary function `x^2` (i.e., `^(x, 2)`) is encoded as:
300300
"head": "^",
301301
"args": [
302302
{"head": "variable", "name": "x"},
303-
{"head": "real", "value": 2},
303+
{"head": "real", "value": 2}
304304
]
305305
}
306306
```
@@ -311,7 +311,7 @@ The n-ary function `x + y + 1` (i.e., `+(x, y, 1)`) is encoded as:
311311
"args": [
312312
{"head": "variable", "name": "x"},
313313
{"head": "variable", "name": "y"},
314-
{"head": "real", "value": 1},
314+
{"head": "real", "value": 1}
315315
]
316316
}
317317
```
@@ -358,34 +358,35 @@ In Polish notation, the expression graph is:
358358
In MathOptFormat, this expression graph can be encoded as follows:
359359
```json
360360
{
361-
"head": "ScalarNonlinearFunction",
362-
"root": {
363-
"head": "+",
364-
"args": [
365-
{"head": "node", "index": 1},
366-
{"head": "node", "index": 3},
367-
{"head": "variable", "name": "y"}
368-
]
369-
},
370-
"node_list": [
371-
{
372-
"head": "*", "args": [
373-
{"head": "complex", "real": 1, "imag": 3},
374-
{"head": "variable", "name": "x"}
375-
]
376-
}, {
377-
"head": "sin",
378-
"args": [
379-
{"head": "variable", "name": "x"}
380-
]
381-
}, {
382-
"head": "^",
383-
"args": [
384-
{"head": "node", "index": 2},
385-
{"head": "real", "value": 2}
386-
]
387-
}
361+
"head": "ScalarNonlinearFunction",
362+
"root": {
363+
"head": "+",
364+
"args": [
365+
{"head": "node", "index": 1},
366+
{"head": "node", "index": 3},
367+
{"head": "variable", "name": "y"}
388368
]
369+
},
370+
"node_list": [
371+
{
372+
"head": "*",
373+
"args": [
374+
{"head": "complex", "real": 1, "imag": 3},
375+
{"head": "variable", "name": "x"}
376+
]
377+
}, {
378+
"head": "sin",
379+
"args": [
380+
{"head": "variable", "name": "x"}
381+
]
382+
}, {
383+
"head": "^",
384+
"args": [
385+
{"head": "node", "index": 2},
386+
{"head": "real", "value": 2}
387+
]
388+
}
389+
]
389390
}
390391
```
391392

0 commit comments

Comments
 (0)