Struct PyInflationCurve
pub struct PyInflationCurve {
pub(crate) inner: Arc<Inflation>,
pub(crate) provenance: Option<Arc<CurveProvenance>>,
}Expand description
An inflation index-level curve.
Fields§
§inner: Arc<Inflation>§provenance: Option<Arc<CurveProvenance>>The ladder the curve was calibrated from, when it was; carried into
with_inflation_curve so a par-basis reading on the inflation axis can flip
through it, as a DiscountCurve carries its own.
Implementations§
§impl PyInflationCurve
impl PyInflationCurve
pub(crate) fn __repr__(&self) -> String
pub(crate) fn new(
reference: NaiveDate,
nodes: Vec<(NaiveDate, f64)>,
level_interpolation: Named<LevelInterpolation>,
day_count: Option<Named<DayCountFraction>>,
seasonality: Option<Vec<f64>>,
seasonality_base_month: u32,
) -> PyResult<Self>
pub(crate) fn new( reference: NaiveDate, nodes: Vec<(NaiveDate, f64)>, level_interpolation: Named<LevelInterpolation>, day_count: Option<Named<DayCountFraction>>, seasonality: Option<Vec<f64>>, seasonality_base_month: u32, ) -> PyResult<Self>
Builds a curve from (date, index_level) nodes, interpolated
"linear" or "log_linear" in the level.
pub(crate) fn index_level(&self, at: NaiveDate) -> PyResult<f64>
pub(crate) fn index_level(&self, at: NaiveDate) -> PyResult<f64>
The index level at a date.
Trait Implementations§
§impl Clone for PyInflationCurve
impl Clone for PyInflationCurve
§fn clone(&self) -> PyInflationCurve
fn clone(&self) -> PyInflationCurve
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl DerefToPyAny for PyInflationCurve
§impl IntoPy<Py<PyAny>> for PyInflationCurve
impl IntoPy<Py<PyAny>> for PyInflationCurve
§impl PyClass for PyInflationCurve
impl PyClass for PyInflationCurve
§impl PyClassImpl for PyInflationCurve
impl PyClassImpl for PyInflationCurve
§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
#[pyclass(sequence)]
§type ThreadChecker = SendablePyClass<PyInflationCurve>
type ThreadChecker = SendablePyClass<PyInflationCurve>
This handles following two situations: Read more
§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::ImmutableChild
Immutable or mutable
§type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
§impl PyClassNewTextSignature<PyInflationCurve> for PyClassImplCollector<PyInflationCurve>
impl PyClassNewTextSignature<PyInflationCurve> for PyClassImplCollector<PyInflationCurve>
fn new_text_signature(self) -> Option<&'static str>
§impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyInflationCurve
impl<'a, 'py> PyFunctionArgument<'a, 'py> for &'a PyInflationCurve
§impl PyMethods<PyInflationCurve> for PyClassImplCollector<PyInflationCurve>
impl PyMethods<PyInflationCurve> for PyClassImplCollector<PyInflationCurve>
fn py_methods(self) -> &'static PyClassItems
§impl PyTypeInfo for PyInflationCurve
impl PyTypeInfo for PyInflationCurve
§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
Returns the PyTypeObject instance for this type.
§fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
fn type_object_bound(py: Python<'_>) -> Bound<'_, PyType>
Returns the safe abstraction over the type object.
§fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object is an instance of this type or a subclass of this type.§fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of_bound(object: &Bound<'_, PyAny>) -> bool
Checks if
object is an instance of this type.Auto Trait Implementations§
impl Freeze for PyInflationCurve
impl RefUnwindSafe for PyInflationCurve
impl Send for PyInflationCurve
impl Sync for PyInflationCurve
impl Unpin for PyInflationCurve
impl UnsafeUnpin for PyInflationCurve
impl UnwindSafe for PyInflationCurve
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