Skip to content

Commit

Permalink
Tidy nonlinear docs
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Apr 14, 2019
1 parent 776655f commit efdbae0
Showing 1 changed file with 30 additions and 29 deletions.
59 changes: 30 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ The binary function `x^2` (i.e., `^(x, 2)`) is encoded as:
"head": "^",
"args": [
{"head": "variable", "name": "x"},
{"head": "real", "value": 2},
{"head": "real", "value": 2}
]
}
```
Expand All @@ -311,7 +311,7 @@ The n-ary function `x + y + 1` (i.e., `+(x, y, 1)`) is encoded as:
"args": [
{"head": "variable", "name": "x"},
{"head": "variable", "name": "y"},
{"head": "real", "value": 1},
{"head": "real", "value": 1}
]
}
```
Expand Down Expand Up @@ -358,34 +358,35 @@ In Polish notation, the expression graph is:
In MathOptFormat, this expression graph can be encoded as follows:
```json
{
"head": "ScalarNonlinearFunction",
"root": {
"head": "+",
"args": [
{"head": "node", "index": 1},
{"head": "node", "index": 3},
{"head": "variable", "name": "y"}
]
},
"node_list": [
{
"head": "*", "args": [
{"head": "complex", "real": 1, "imag": 3},
{"head": "variable", "name": "x"}
]
}, {
"head": "sin",
"args": [
{"head": "variable", "name": "x"}
]
}, {
"head": "^",
"args": [
{"head": "node", "index": 2},
{"head": "real", "value": 2}
]
}
"head": "ScalarNonlinearFunction",
"root": {
"head": "+",
"args": [
{"head": "node", "index": 1},
{"head": "node", "index": 3},
{"head": "variable", "name": "y"}
]
},
"node_list": [
{
"head": "*",
"args": [
{"head": "complex", "real": 1, "imag": 3},
{"head": "variable", "name": "x"}
]
}, {
"head": "sin",
"args": [
{"head": "variable", "name": "x"}
]
}, {
"head": "^",
"args": [
{"head": "node", "index": 2},
{"head": "real", "value": 2}
]
}
]
}
```

Expand Down

0 comments on commit efdbae0

Please sign in to comment.