#[non_exhaustive]pub struct UniqueOptions {
pub dim: Option<isize>,
pub return_inverse: bool,
pub return_counts: bool,
}Expand description
unique_with_options/unique_consecutive のオプション
(torch.unique/torch.unique_consecutive の dim/
return_inverse/return_counts 引数相当)。既定(dim=None・
追加出力なし)を Default とする。
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.dim: Option<isize>対象軸(None は入力全体を平坦化。負値は末尾からの相対指定)。
return_inverse: booltrue なら UniqueOutput::inverse を計算する。
return_counts: booltrue なら UniqueOutput::counts を計算する。
Implementations§
Source§impl UniqueOptions
impl UniqueOptions
Sourcepub fn with_dim(self, dim: isize) -> UniqueOptions
pub fn with_dim(self, dim: isize) -> UniqueOptions
対象軸を設定する(torch.unique/torch.unique_consecutive の
dim 相当。負値可)。
Sourcepub fn with_return_inverse(self, return_inverse: bool) -> UniqueOptions
pub fn with_return_inverse(self, return_inverse: bool) -> UniqueOptions
return_inverse を設定する。
Sourcepub fn with_return_counts(self, return_counts: bool) -> UniqueOptions
pub fn with_return_counts(self, return_counts: bool) -> UniqueOptions
return_counts を設定する。
Trait Implementations§
Source§impl Clone for UniqueOptions
impl Clone for UniqueOptions
Source§fn clone(&self) -> UniqueOptions
fn clone(&self) -> UniqueOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for UniqueOptions
Source§impl Debug for UniqueOptions
impl Debug for UniqueOptions
Source§impl Default for UniqueOptions
impl Default for UniqueOptions
Source§fn default() -> UniqueOptions
fn default() -> UniqueOptions
Returns the “default value” for a type. Read more
Source§impl PartialEq for UniqueOptions
impl PartialEq for UniqueOptions
impl StructuralPartialEq for UniqueOptions
Auto Trait Implementations§
impl Freeze for UniqueOptions
impl RefUnwindSafe for UniqueOptions
impl Send for UniqueOptions
impl Sync for UniqueOptions
impl Unpin for UniqueOptions
impl UnsafeUnpin for UniqueOptions
impl UnwindSafe for UniqueOptions
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,
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