1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#![allow(non_snake_case, deprecated)]
#![cfg_attr(has_deprecated, deprecated(note="`linalg` is not in good shape."))]
use libnum::{Zero, One};
use std::ops::{Add, Sub, Mul, Div};
pub trait Ring : Clone + Zero + Add<Output=Self> + Sub<Output=Self>
+ One + Mul<Output=Self> { }
impl<A: Clone + Zero + Add<Output=A> + Sub<Output=A> + One + Mul<Output=A>> Ring for A { }
pub trait Field : Ring + Div<Output=Self> { }
impl<A: Ring + Div<Output=A>> Field for A { }