use core::marker::PhantomData;
use num::complex::Complex;
use num::traits::real::Real;
pub trait Field {
const RANK: Option<usize> = None;
type Elem: ?Sized;
fn kind(&self) -> Fields;
fn rank(&self) -> usize;
fn size(&self) -> usize;
}
pub enum Fields {
Real(R),
Complex(C),
}
pub struct R<T = f64>
where
T: Real,
{
_elem: PhantomData<T>,
}
pub struct C<T = f64>
where
T: Real,
{
_elem: PhantomData<Complex<T>>,
}
pub trait ComplexField {
type DType;
}
pub trait Scalar {
type Complex: ComplexField<DType = Self::Real>;
type Real: Scalar<Real = Self::Real>;
}
#[cfg(test)]
mod tests {}