Merge pull request #3668 from TirelessClock/documentation

Changes to binding.md
This commit is contained in:
Ryan Curtin
2024-03-29 16:00:05 -04:00
committed by GitHub
+4 -4
View File
@@ -777,8 +777,8 @@ PARAM_MODEL_OUT(LinearRegression, "output_model", "The randomly generated "
"linear regression output model.", "M");
```
Note that even the parameter documentation strings must be a little be agnostic
to the binding type, because the command-line interface is so different than the
Note that even the parameter documentation strings must be a little agnostic
to the binding type, because the command-line interface is so different from the
Python interface to the user.
### Using `Params` in a `BINDING_FUNCTION()` function
@@ -815,7 +815,7 @@ To access a string that a user passed in to the `string` parameter, the
following code could be used:
```c++
const std::string& str = params.Has<std::string>("string");
const std::string& str = params.Get<std::string>("string");
```
Matrix types are accessed in the same way:
@@ -943,7 +943,7 @@ populating them with the correct options for the given binding, then calls
`BINDING_FUNCTION()` with those instantiated objects.
In order to do this, each parameter and the program documentation must make
themselves known to the IO singleton. This is accomplished by having the @c
themselves known to the IO singleton. This is accomplished by having the
`BINDING_USER_NAME()`, `BINDING_SHORT_DESC()`, `BINDING_LONG_DESC()`,
`BINDING_EXAMPLE()`, `BINDING_SEE_ALSO()` and `PARAM_*()` macros declare global
variables that, in their constructors, register themselves with the `IO`