use std::fmt::{Display, Debug};
use crate::error::AxionResult;
use crate::series::core::Series;
use crate::dtype::DataTypeTrait;
pub trait SeriesCompareScalar<Rhs>
where
Rhs: Clone + PartialOrd + PartialEq,
{
fn gt_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lt_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn eq_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn neq_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn gte_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lte_scalar(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
}
pub trait SeriesCompareSeries<Rhs> {
fn gt_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lt_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn eq_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn neq_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn gte_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lte_series(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
}
pub trait SeriesCompare<Rhs> {
fn gt(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lt(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn eq(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn neq(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn gte(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
fn lte(&self, rhs: Rhs) -> AxionResult<Series<bool>>;
}
pub trait SeriesArithScalar<Rhs>
where
Rhs: Clone,
{
type AddOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type SubOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type MulOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type DivOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type RemOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
fn add_scalar(&self, rhs: Rhs) -> AxionResult<Series<Self::AddOutput>>;
fn sub_scalar(&self, rhs: Rhs) -> AxionResult<Series<Self::SubOutput>>;
fn mul_scalar(&self, rhs: Rhs) -> AxionResult<Series<Self::MulOutput>>;
fn div_scalar(&self, rhs: Rhs) -> AxionResult<Series<Self::DivOutput>>;
fn rem_scalar(&self, rhs: Rhs) -> AxionResult<Series<Self::RemOutput>>;
}
pub trait SeriesArithSeries<Rhs>
where
Rhs: ?Sized,
{
type AddOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type SubOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type MulOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type DivOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
type RemOutput: DataTypeTrait + Clone + Debug + Display + Send + Sync + 'static;
fn add_series(&self, rhs: Rhs) -> AxionResult<Series<Self::AddOutput>>;
fn sub_series(&self, rhs: Rhs) -> AxionResult<Series<Self::SubOutput>>;
fn mul_series(&self, rhs: Rhs) -> AxionResult<Series<Self::MulOutput>>;
fn div_series(&self, rhs: Rhs) -> AxionResult<Series<Self::DivOutput>>;
fn rem_series(&self, rhs: Rhs) -> AxionResult<Series<Self::RemOutput>>;
}