use ffi::{CPXPARAM_Preprocessing_Aggregator, CPXPARAM_Preprocessing_Fill};
use crate::parameters::{private, Parameter, ParameterValue};
impl private::Parameter for Fill {}
impl private::Parameter for Aggregator {}
#[derive(Copy, Clone, Debug)]
pub struct Fill(pub u32);
impl Parameter for Fill {
fn value(&self) -> ParameterValue {
ParameterValue::Integer(self.0 as i32)
}
fn id(&self) -> u32 {
CPXPARAM_Preprocessing_Fill
}
}
#[derive(Copy, Clone, Debug)]
pub enum Aggregator {
Automatic,
NbOfTimesToApply(u32),
}
impl Parameter for Aggregator {
fn value(&self) -> ParameterValue {
ParameterValue::Integer(match self {
Self::Automatic => -1,
&Self::NbOfTimesToApply(times) => times as i32,
})
}
fn id(&self) -> u32 {
CPXPARAM_Preprocessing_Aggregator
}
}