pub trait AsTargets {
type Elem;
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>;
fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>> { ... }
}
Expand description
Return a reference to single or multiple target variables
Associated Types
Required methods
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>
fn as_multi_targets(&self) -> ArrayView2<'_, Self::Elem>
Returns a view on targets as two-dimensional array
Provided methods
fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>>
fn try_single_target(&self) -> Result<ArrayView1<'_, Self::Elem>>
Convert to single target, fails for more than one target
Returns
May return a single target with the same label type, but returns an
Error::MultipleTargets
in case that there are more than a single target.