[−][src]Struct finance_solution::NpvSolution
The custom solution information of a NPV scenario. The struct values are immutable by the user of the library.
Implementations
impl NpvSolution
[src]
pub fn new(
rates: Vec<f64>,
periods: u32,
initial_investment: f64,
cashflows: Vec<f64>,
sum_of_cashflows: f64,
sum_of_discounted_cashflows: f64,
net_present_value: f64
) -> Self
[src]
rates: Vec<f64>,
periods: u32,
initial_investment: f64,
cashflows: Vec<f64>,
sum_of_cashflows: f64,
sum_of_discounted_cashflows: f64,
net_present_value: f64
) -> Self
Create a new instance of the struct
pub fn series(&self) -> NpvSeries
[src]
pub fn rate_avg(&self) -> f64
[src]
Call rate_avg
on a NpvSolution to get the simple average rate of a schedule;
pub fn rates(&self) -> &[f64]
[src]
Returns the rate schedule
pub fn periods(&self) -> u32
[src]
Returns the number of periods as u32.
pub fn initial_investment(&self) -> f64
[src]
Returns the initial investment as f64.
pub fn cashflows(&self) -> &[f64]
[src]
Returns a Vec
pub fn sum_of_cashflows(&self) -> f64
[src]
Returns the sum of the cashflows at their future value.
pub fn sum_of_discounted_cashflows(&self) -> f64
[src]
Returns the sum of the cashflows at their present value.
pub fn net_present_value(&self) -> f64
[src]
Returns the net present value as f64.
pub fn npv(&self) -> f64
[src]
Alias for net_present_value()
pub fn print_table(&self)
[src]
Pretty-print a table of the calculations at each period for visual analysis.
pub fn print_table_locale(&self, locale: &Locale, precision: usize)
[src]
Pretty-print a table of the calculations at each period for visual analysis, and provide a Locale for monetary formatting and preferred decimal precision.
pub fn max_discounted_cashflow(&self) -> f64
[src]
Return the max discounted cashflow (present value of the cashflow)
pub fn min_discounted_cashflow(&self) -> f64
[src]
Return the min discounted cashflow (present value of the cashflow)
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for NpvSolution
impl Send for NpvSolution
impl Sync for NpvSolution
impl Unpin for NpvSolution
impl UnwindSafe for NpvSolution
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,