2013-06-16 04:16:44 +08:00
|
|
|
/**
|
|
|
|
* Trait of objects having a right multiplication with another element.
|
|
|
|
*/
|
|
|
|
pub trait RMul<V>
|
|
|
|
{
|
2013-08-05 15:44:56 +08:00
|
|
|
/// Computes self * v
|
|
|
|
fn rmul(&self, v : &V) -> V;
|
2013-06-16 04:16:44 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Trait of objects having a left multiplication with another element.
|
|
|
|
*/
|
|
|
|
pub trait LMul<V>
|
|
|
|
{
|
2013-08-05 15:44:56 +08:00
|
|
|
/// Computes v * self
|
|
|
|
fn lmul(&self, &V) -> V;
|
2013-06-16 04:16:44 +08:00
|
|
|
}
|