pub struct Instantiation<Identifier = String> {
pub info: MetaInfo<Identifier>,
pub ty: Option<InstantiationType>,
pub cost: Option<IntVal>,
pub list: Vec<VarRef<Identifier>>,
pub values: Vec<IntVal>,
}Expand description
An assignment from a list of variables to a list of values
This structure is used both to represent an elementary constraint in an instance, and to represent the solution to an instance.
Fields§
§info: MetaInfo<Identifier>Optional metadata for the constraint
ty: Option<InstantiationType>The type of instantiation
This field is used to distinguish between different types of solutions,
and signal whether the solution is optimal or not. When this type is used
as a constraint, then this field is ignore and can be set to None.
cost: Option<IntVal>The objective cost of the instantiation
This field is used to represent the cost of a solution, and is only used
when the instantiation type is used to represent a solution. When this
type is used as a constraint, then this field is ignore and can be set to
None.
list: Vec<VarRef<Identifier>>List of variables that are assigned values
values: Vec<IntVal>List of values assigned to the variables
Trait Implementations§
Source§impl<Identifier: Clone> Clone for Instantiation<Identifier>
impl<Identifier: Clone> Clone for Instantiation<Identifier>
Source§fn clone(&self) -> Instantiation<Identifier>
fn clone(&self) -> Instantiation<Identifier>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more