Struct clingo::Statistics
[−]
[src]
pub struct Statistics(_);
Handle for to the solver statistics.
Methods
impl Statistics
[src]
pub fn root(&self) -> Option<u64>
[src]
Get the root key of the statistics.
pub fn statistics_type(&self, key: u64) -> Option<StatisticsType>
[src]
Get the type of a key.
pub fn array_size(&self, key: u64) -> Option<usize>
[src]
Get the size of an array entry.
Pre-condition
The statistics type of the entry must be
StatisticsType::Array
.
pub fn statistics_array_at(&self, key: u64, offset: usize) -> Option<u64>
[src]
Get the subkey at the given offset of an array entry.
Pre-condition
The statistics type of the entry must be
StatisticsType::Array
.
Arguments
key
- the keyoffset
- the offset in the array
pub fn map_size(&self, key: u64) -> Option<usize>
[src]
Get the number of subkeys of a map entry.
Pre-condition
The statistics type of the entry must
be StatisticsType::Map
.
pub fn map_subkey_name(&self, key: u64, offset: usize) -> Result<&str, Error>
[src]
Get the name associated with the offset-th subkey.
Pre-condition
The statistics type of the entry must be
StatisticsType::Map
.
Arguments
key
- the keyoffset
- the offset of the name
pub fn map_at(&self, key: u64, name: &str) -> Option<u64>
[src]
Lookup a subkey under the given name.
Pre-condition
The statistics type of the entry must be
StatisticsType::Map
.
Note: Multiple levels can be looked up by concatenating keys with a period.
Arguments
key
- the keyname
- the name to lookup the subkey
pub fn value_get(&self, key: u64) -> Option<f64>
[src]
Get the value of the given entry.
Pre-condition
The statistics type of the entry must be
StatisticsType::Value
.
Trait Implementations
impl Debug for Statistics
[src]
fn fmt(&self, __arg_0: &mut Formatter) -> Result
[src]
Formats the value using the given formatter. Read more
impl Copy for Statistics
[src]
impl Clone for Statistics
[src]
fn clone(&self) -> Statistics
[src]
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Performs copy-assignment from source
. Read more