pub struct Addition<VStore>where
VStore: VStoreConcept,
VStore::Item: Collection,{ /* private fields */ }
Implementations§
source§impl<VStore, Domain, Bound> Addition<VStore>where
VStore: VStoreConcept<Item = Domain>,
Domain: Collection<Item = Bound>,
impl<VStore, Domain, Bound> Addition<VStore>where
VStore: VStoreConcept<Item = Domain>,
Domain: Collection<Item = Bound>,
sourcepub fn new(x: Var<VStore>, v: Bound) -> Self
pub fn new(x: Var<VStore>, v: Bound) -> Self
Examples found in repository?
More examples
src/libpcp/propagators/cmp/mod.rs (line 49)
44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
pub fn x_geq_y<VStore, Domain, Bound>(x: Var<VStore>, y: Var<VStore>) -> XGreaterEqY<VStore> where
VStore: VStoreConcept<Item=Domain> + 'static,
Domain: Collection<Item=Bound> + IntDomain,
Bound: IntBound
{
x_greater_y(Box::new(Addition::new(x, Bound::one())), y)
}
pub fn x_leq_y<VStore, Domain, Bound>(x: Var<VStore>, y: Var<VStore>) -> XLessEqY<VStore> where
VStore: VStoreConcept<Item=Domain> + 'static,
Domain: Collection<Item=Bound> + IntDomain,
Bound: IntBound
{
XLessY::new(x, Box::new(Addition::new(y, Bound::one())))
}
pub fn x_geq_y_plus_z<VStore, Domain, Bound>(x: Var<VStore>, y: Var<VStore>, z: Var<VStore>)
-> XGreaterEqYPlusZ<VStore> where
VStore: VStoreConcept<Item=Domain> + 'static,
Domain: Collection<Item=Bound> + IntDomain,
Bound: IntBound
{
XGreaterYPlusZ::new(Box::new(Addition::new(x, Bound::one())), y, z)
}
pub fn x_leq_y_plus_z<VStore, Domain, Bound>(x: Var<VStore>, y: Var<VStore>, z: Var<VStore>)
-> XLessEqYPlusZ<VStore> where
VStore: VStoreConcept<Item=Domain> + 'static,
Domain: Collection<Item=Bound> + IntDomain,
Bound: IntBound
{
XLessYPlusZ::new(Box::new(Addition::new(x, -Bound::one())), y, z)
}