Teuchos::ParameterList params; // create a new ParameterList object params.set("n_iterations", 100); // set the value of "n_iterations" to 100
Teuchos::ParameterList params; // create a new ParameterList object Teuchos::ArrayIn this example, we create a new ParameterList object called "params". We also create a new array of double values using the Teuchos::Array class. We then use the set() function to set the value of the "my_values" parameter to this array. Overall, these examples show how the set() member function of the Teuchos ParameterList class can be used to manage parameters and their values in a C++ software system. The package library used in this case is Teuchos.values = {1.0, 2.0, 3.0}; // create a new array of values params.set("my_values", values); // set the value of "my_values" to the array