Trait grb::attribute::ObjAttrGet[][src]

pub trait ObjAttrGet<O, V> {
    fn get(&self, model: &Model, idx: i32) -> Result<V>;
fn get_batch<I: IntoIterator<Item = Result<i32>>>(
        &self,
        model: &Model,
        idx: I
    ) -> Result<Vec<V>>; }
Expand description

A queryable ModelObject attribute (eg Var or Constr)

Required methods

Get the value for this attribute

Get multiple values for this attribute at once

Implementors

From the Gurobi manual regarding string attributes:

Note that all interface routines that return string-valued attributes are returning pointers into internal Gurobi data structures. The user should copy the contents of the pointer to a different data structure before the next call to a Gurobi library routine. The user should also be careful to never modify the data pointed to by the returned character pointer.