pub enum Dist {
Uniform,
Normal {
cut: f64,
},
End,
DiscX {
normal: Option<f64>,
},
DiscY {
normal: Option<f64>,
},
}Expand description
分布。設定の JSON では名前の文字列(“uniform”・“normal”・“normal:σの数”・“end”・“disc_x”・“disc_y:normal” など)
Variants§
Uniform
Normal
範囲の半分が cut σ の正規分布を範囲で切ったもの
End
lo か hi を半々
DiscX
隣り合う 2 つの公差(x・y の組。pair_disc)を、中心 (lo+hi)/2・半径 (hi−lo)/2 の円(楕円)の中で引く
組の x。次の公差は同じ normal の Dist::DiscY。偏心・傾きの大きさが公差以下になる(x・y 別々の一様分布は角で √2 倍まで)。
normal が None なら円の中で一様、Some(cut) なら半径が cut σ の等方の 2 次元正規分布を円で切ったもの
DiscY
Dist::DiscX の組の y
Implementations§
Trait Implementations§
impl Copy for Dist
Source§impl<'de> Deserialize<'de> for Dist
impl<'de> Deserialize<'de> for Dist
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl JsonSchema for Dist
impl JsonSchema for Dist
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Returns a string that uniquely identifies the schema produced by this type. Read more
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Generates a JSON Schema for this type. Read more
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
Whether JSON Schemas generated for this type should be included directly in parent schemas,
rather than being re-used where possible using the
$ref keyword. Read moreimpl StructuralPartialEq for Dist
Auto Trait Implementations§
impl Freeze for Dist
impl RefUnwindSafe for Dist
impl Send for Dist
impl Sync for Dist
impl Unpin for Dist
impl UnsafeUnpin for Dist
impl UnwindSafe for Dist
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more