[−][src]Struct kurobako_core::domain::VariableBuilder
Variable
builder.
Methods
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]
I: IntoIterator<Item = T>,
T: AsRef<str>,
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
impl RefUnwindSafe for VariableBuilder
impl Send for VariableBuilder
impl Sync for VariableBuilder
impl Unpin for VariableBuilder
impl UnwindSafe for VariableBuilder
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 = !
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,