pub enum AssignmentError {
DimensionsNotSet,
CostNotSet,
GroupLengthMismatch,
InvalidPin {
row: usize,
col: i32,
},
Infeasible,
}Expand description
Errors from AssignmentBuilder::solve.
Variants§
DimensionsNotSet
.rows() or .cols() was not called before .solve() (or
either was set to zero).
CostNotSet
.cost() was not called before .solve().
GroupLengthMismatch
A custom row_group / col_group slice did not match the
declared dimensions.
InvalidPin
A pin references an out-of-range row or a column that is
neither SENTINEL nor a valid 0..n_cols index, or whose
row-group does not match its target column’s group.
Fields
row: usizeRow index supplied to AssignmentBuilder::pin.
col: i32Column index (or SENTINEL) supplied to
AssignmentBuilder::pin.
Infeasible
The CSP has no feasible solution under the supplied
constraints. Note that with SENTINEL always available a
pure assignment problem is always feasible; this variant
surfaces when pins or group constraints are mutually
incompatible.
Trait Implementations§
Source§impl Debug for AssignmentError
impl Debug for AssignmentError
Source§impl Display for AssignmentError
impl Display for AssignmentError
Source§impl Error for AssignmentError
impl Error for AssignmentError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()