pub struct OptionsList { /* private fields */ }Expand description
Mirrors Ipopt::OptionsList.
Implementations§
Source§impl OptionsList
impl OptionsList
pub fn new() -> Self
pub fn with_registered(reg: Rc<RegisteredOptions>) -> Self
pub fn set_registered_options(&mut self, reg: Rc<RegisteredOptions>)
pub fn registered_options(&self) -> Option<Rc<RegisteredOptions>>
pub fn clear(&mut self)
Sourcepub fn names(&self) -> impl Iterator<Item = &str>
pub fn names(&self) -> impl Iterator<Item = &str>
Every option name present in the list, lowercased, in sorted order.
“Present” means someone called a set_*_value for it — an unset
option is absent here even though it reads back as its
registered default. That distinction is the whole point of the
accessor: it answers “what did this run actually mention?”,
which is not a question get_*_value can answer.
Sourcepub fn set_string_value(
&mut self,
tag: &str,
value: &str,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_string_value( &mut self, tag: &str, value: &str, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetStringValue.
Sourcepub fn set_numeric_value(
&mut self,
tag: &str,
value: Number,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_numeric_value( &mut self, tag: &str, value: Number, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetNumericValue.
Sourcepub fn set_integer_value(
&mut self,
tag: &str,
value: Index,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_integer_value( &mut self, tag: &str, value: Index, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetIntegerValue.
Sourcepub fn set_bool_value(
&mut self,
tag: &str,
value: bool,
allow_clobber: bool,
dont_print: bool,
) -> Result<bool, SolverException>
pub fn set_bool_value( &mut self, tag: &str, value: bool, allow_clobber: bool, dont_print: bool, ) -> Result<bool, SolverException>
Mirrors SetBoolValue.
Sourcepub fn unset_value(&mut self, tag: &str) -> bool
pub fn unset_value(&mut self, tag: &str) -> bool
Mirrors UnsetValue. Returns true if the value was removed.
Sourcepub fn get_string_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(String, bool), SolverException>
pub fn get_string_value( &self, tag: &str, prefix: &str, ) -> Result<(String, bool), SolverException>
Mirrors GetStringValue. Returns true if found in the list.
Falls back to the registered default when not found.
Sourcepub fn get_numeric_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Number, bool), SolverException>
pub fn get_numeric_value( &self, tag: &str, prefix: &str, ) -> Result<(Number, bool), SolverException>
Mirrors GetNumericValue.
Sourcepub fn get_integer_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Index, bool), SolverException>
pub fn get_integer_value( &self, tag: &str, prefix: &str, ) -> Result<(Index, bool), SolverException>
Mirrors GetIntegerValue.
Sourcepub fn get_bool_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(bool, bool), SolverException>
pub fn get_bool_value( &self, tag: &str, prefix: &str, ) -> Result<(bool, bool), SolverException>
Mirrors GetBoolValue. Accepts "yes"/"no".
Sourcepub fn get_enum_value(
&self,
tag: &str,
prefix: &str,
) -> Result<(Index, bool), SolverException>
pub fn get_enum_value( &self, tag: &str, prefix: &str, ) -> Result<(Index, bool), SolverException>
Mirrors GetEnumValue. Returns the index of the value in the
registered string list.
Sourcepub fn read_from_stream<R: Read>(
&mut self,
r: R,
allow_clobber: bool,
) -> Result<(), SolverException>
pub fn read_from_stream<R: Read>( &mut self, r: R, allow_clobber: bool, ) -> Result<(), SolverException>
Mirrors ReadFromStream. Parses an ipopt.opt-style file:
whitespace-separated tag value pairs, # line comments,
double-quoted tokens permitted.
pub fn read_from_str( &mut self, s: &str, allow_clobber: bool, ) -> Result<(), SolverException>
Sourcepub fn print_list(&self) -> String
pub fn print_list(&self) -> String
Mirrors PrintList. One option per line: name value # used N times.
Sourcepub fn print_user_options(&self) -> String
pub fn print_user_options(&self) -> String
Mirrors PrintUserOptions.
Trait Implementations§
Source§impl Clone for OptionsList
impl Clone for OptionsList
Source§fn clone(&self) -> OptionsList
fn clone(&self) -> OptionsList
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more