pub trait Loss<A, B = A> { type Output; // Required method fn loss(&self, a: &A, cmp: &B) -> Self::Output; }