pub struct CurveDF<T: CurveInterpolation, U: DateRoll> { /* private fields */ }
Expand description
Default struct for storing datetime indexed discount factors (DFs).
Implementations§
Source§impl<T: CurveInterpolation, U: DateRoll> CurveDF<T, U>
impl<T: CurveInterpolation, U: DateRoll> CurveDF<T, U>
pub fn try_new( nodes: Nodes, interpolator: T, id: &str, convention: Convention, modifier: Modifier, index_base: Option<f64>, calendar: U, ) -> Result<Self, PyErr>
pub fn interpolated_value(&self, date: &NaiveDateTime) -> Number
pub fn node_index(&self, date_timestamp: i64) -> usize
pub fn set_ad_order(&mut self, ad: ADOrder) -> Result<(), PyErr>
pub fn index_value(&self, date: &NaiveDateTime) -> Result<Number, PyErr>
Trait Implementations§
Source§impl<'de, T, U> Deserialize<'de> for CurveDF<T, U>
impl<'de, T, U> Deserialize<'de> for CurveDF<T, U>
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<T, U> JSON for CurveDF<T, U>where
T: CurveInterpolation + for<'a> Deserialize<'a> + Serialize,
U: DateRoll + for<'a> Deserialize<'a> + Serialize,
impl<T, U> JSON for CurveDF<T, U>where
T: CurveInterpolation + for<'a> Deserialize<'a> + Serialize,
U: DateRoll + for<'a> Deserialize<'a> + Serialize,
impl<T: CurveInterpolation, U: DateRoll> StructuralPartialEq for CurveDF<T, U>
Auto Trait Implementations§
impl<T, U> Freeze for CurveDF<T, U>
impl<T, U> RefUnwindSafe for CurveDF<T, U>where
T: RefUnwindSafe,
U: RefUnwindSafe,
impl<T, U> Send for CurveDF<T, U>
impl<T, U> Sync for CurveDF<T, U>
impl<T, U> Unpin for CurveDF<T, U>
impl<T, U> UnwindSafe for CurveDF<T, U>where
T: UnwindSafe,
U: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self
from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self
is actually part of its subset T
(and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset
but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self
to the equivalent element of its superset.