Trait gurobi::model::AttrArray
[−]
[src]
pub trait AttrArray: Into<CString> {
type Out: Clone;
type Buf: Clone + Init + Into<Self::Out> + AsRawPtr<Self::RawGet>;
type RawGet;
type RawSet: From<Self::Out>;
unsafe fn get_attrelement(model: *mut GRBmodel, attrname: c_str, element: c_int, values: Self::RawGet) -> c_int;
unsafe fn set_attrelement(model: *mut GRBmodel, attrname: c_str, element: c_int, values: Self::RawSet) -> c_int;
unsafe fn get_attrlist(model: *mut GRBmodel, attrname: c_str, len: c_int, ind: *const c_int, values: *mut Self::Buf) -> c_int;
unsafe fn set_attrlist(model: *mut GRBmodel, attrname: c_str, len: c_int, ind: *const c_int, values: *const Self::RawSet) -> c_int;
fn get_element(model: &Model, attr: Self, element: i32) -> Result<Self::Out> { ... }
fn set_element(model: &mut Model, attr: Self, element: i32, value: Self::Out) -> Result<()> { ... }
fn get_list(model: &Model, attr: Self, ind: &[i32]) -> Result<Vec<Self::Out>> { ... }
fn set_list(model: &mut Model, attr: Self, ind: &[i32], values: &[Self::Out]) -> Result<()> { ... }
fn to_rawsets(values: &[Self::Out]) -> Result<Vec<Self::RawSet>> { ... }
}provides function to query/set the value of vectorized attribute.
Associated Types
type Out: Clone
type Buf: Clone + Init + Into<Self::Out> + AsRawPtr<Self::RawGet>
type RawGet
type RawSet: From<Self::Out>
Required Methods
unsafe fn get_attrelement(model: *mut GRBmodel, attrname: c_str, element: c_int, values: Self::RawGet) -> c_int
unsafe fn set_attrelement(model: *mut GRBmodel, attrname: c_str, element: c_int, values: Self::RawSet) -> c_int
unsafe fn get_attrlist(model: *mut GRBmodel, attrname: c_str, len: c_int, ind: *const c_int, values: *mut Self::Buf) -> c_int
unsafe fn set_attrlist(model: *mut GRBmodel, attrname: c_str, len: c_int, ind: *const c_int, values: *const Self::RawSet) -> c_int
Provided Methods
fn get_element(model: &Model, attr: Self, element: i32) -> Result<Self::Out>
fn set_element(model: &mut Model, attr: Self, element: i32, value: Self::Out) -> Result<()>
fn get_list(model: &Model, attr: Self, ind: &[i32]) -> Result<Vec<Self::Out>>
fn set_list(model: &mut Model, attr: Self, ind: &[i32], values: &[Self::Out]) -> Result<()>
fn to_rawsets(values: &[Self::Out]) -> Result<Vec<Self::RawSet>>
Implementors
impl AttrArray for IntAttrimpl AttrArray for DoubleAttrimpl AttrArray for CharAttrimpl AttrArray for StringAttr