pub fn unitary<I>(dim: usize, indices: I) -> Features
    where
        I: IntoIterator<Item = IndexT>,
    {
        Features::sparse(dim, indices.into_iter().map(|i| (i, 1.0)))
    }
/// Construct a `Sparse` feature vector with given dimensionality from an
/// iterable collection of feature indices.
Construct a `Sparse` feature vector with given dimensionality from an
iterable collection of feature indices.
Construct a ` Sparse ` feature vector with given dimensionality from an iterable collection of feature indices .
pub fn unitary<I>(dim: usize, indices: I) -> Features
    where
        I: IntoIterator<Item = IndexT>,
    {
        Features::sparse(dim, indices.into_iter().map(|i| (i, 1.0)))
    }
pub fn unitary < I > ( dim : usize , indices : I ) -> Features where I : IntoIterator < Item = IndexT > , { Features :: sparse ( dim , indices . into_iter ( ) . map ( | i | ( i , 1.0 ) ) ) }
Construct a `Sparse` feature vector with given dimensionality from an
iterable collection of feature indices.
Construct a ` Sparse ` feature vector with given dimensionality from an iterable collection of feature indices .
dim
usize
indices
I
dim
usize
indices
I