Struct Calculator

Source
pub struct Calculator { /* private fields */ }

Implementations§

Source§

impl Calculator

Source

pub fn new() -> GcalcResult<Self>

Source

pub fn no_header(self, tv: bool) -> Self

Source

pub fn column_map(self, column_map: HashMap<String, String>) -> Self

Source

pub fn strict_csv(self, tv: bool) -> Self

Source

pub fn target_probability(self, target_probability: f32) -> Self

Source

pub fn value(self, value: f32) -> Self

Source

pub fn budget(self, budget: f32) -> Self

Source

pub fn table_format(self, format: TableFormat) -> Self

Source

pub fn prob_type(self, prob_type: ProbType) -> Self

Source

pub fn probability(self, probability: f32) -> GcalcResult<Self>

Source

pub fn constant(self, constant: f32) -> GcalcResult<Self>

Source

pub fn precision(self, precision: usize) -> Self

Source

pub fn csv_ref(self, csv_reference: CsvRef) -> Self

Source

pub fn cost(self, cost: f32) -> Self

Source

pub fn out_file(self, path: impl AsRef<Path>) -> Self

Source

pub fn csv_fallback(self, behaviour: &str) -> GcalcResult<Self>

Source

pub fn plot(self, tv: bool) -> Self

Source

pub fn set_column_map(&mut self, column_map: HashMap<String, String>)

Source

pub fn set_no_header(&mut self, tv: bool)

Source

pub fn set_probability( &mut self, probability: f32, update_initial_value: bool, ) -> GcalcResult<()>

Source

pub fn set_cost(&mut self, cost: f32, update_initial_value: bool)

Source

pub fn set_constant( &mut self, constant: f32, update_initial_value: bool, ) -> GcalcResult<()>

Source

pub fn set_strict_csv(&mut self, tv: bool)

Source

pub fn set_target_probability( &mut self, target_probability: f32, ) -> GcalcResult<()>

Source

pub fn set_value(&mut self, value: f32)

Source

pub fn set_budget(&mut self, budget: f32)

Source

pub fn set_offset(&mut self, offset: usize)

Source

pub fn set_table_format(&mut self, format: TableFormat)

Source

pub fn set_prob_type(&mut self, prob_type: ProbType)

Source

pub fn set_precision(&mut self, precision: usize)

Source

pub fn set_csv_file(&mut self, csv_reference: CsvRef)

Source

pub fn set_out_file(&mut self, path: &Path)

Source

pub fn set_csv_value_fallback(&mut self, behaviour: &str) -> GcalcResult<()>

Source

pub fn set_plot(&mut self, tv: bool)

Source

pub fn print_range( &mut self, count: Option<usize>, start_index: Option<usize>, ) -> GcalcResult<()>

Source

pub fn print_conditional(&mut self) -> GcalcResult<()>

Source

pub fn print_qualfication(&mut self) -> GcalcResult<()>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.