[][src]Struct kurobako_core::domain::VariableBuilder

pub struct VariableBuilder { /* fields omitted */ }

Variable builder.

Implementations

impl VariableBuilder[src]

pub fn new(name: &str) -> Self[src]

Makes a new VariableBuilder with the given variable name.

pub fn name(self, name: &str) -> Self[src]

Sets the name of this variable.

pub fn uniform(self) -> Self[src]

Sets the distribution of this variable to Distribution::Uniform.

Note that Distribution::Uniform is the default distribution.

pub fn log_uniform(self) -> Self[src]

Sets the distribution of this variable to Distribution::LogUniform.

pub fn continuous(self, low: f64, high: f64) -> Self[src]

Sets the range of this variable to the given continuous numerical range.

pub fn discrete(self, low: i64, high: i64) -> Self[src]

Sets the range of this variable to the given discrete numerical range.

pub fn categorical<I, T>(self, choices: I) -> Self where
    I: IntoIterator<Item = T>,
    T: AsRef<str>, 
[src]

Sets the range of this variable to the given categorical range.

pub fn boolean(self) -> Self[src]

Sets the range of this variable to boolean.

This is equivalent to self.categorical(&["false", "true"]).

pub fn range(self, range: Range) -> Self[src]

Sets the range of this variable.

pub fn constraint(self, constraint: Constraint) -> Self[src]

Sets the evaluation constraint to this variable.

pub fn finish(self) -> Result<Variable>[src]

Builds a Variable instance with the given settings.

Trait Implementations

impl Debug for VariableBuilder[src]

impl From<Variable> for VariableBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> Same<T> for T

type Output = T

Should always be Self

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,