pub fn to_dense(&self) -> DenseActivations {
        match self {
            Features::Dense(da) => da.clone(),
            Features::Sparse(sa) => {
                let mut phi = Array1::zeros(sa.dim);

                for (&idx, &act) in sa.iter() {
                    phi[idx] = act;
                }

                phi
            }
        }
    }
/// Clone the features and convert into a raw, dense vector of activations.
Clone the features and convert into a raw, dense vector of activations.
Clone the features and convert into a raw dense vector of activations .
pub fn to_dense(&self) -> DenseActivations {
        match self {
            Features::Dense(da) => da.clone(),
            Features::Sparse(sa) => {
                let mut phi = Array1::zeros(sa.dim);
                for (&idx, &act) in sa.iter() {
                    phi[idx] = act;
                }
                phi
            }
        }
    }
pub fn to_dense ( & self ) -> DenseActivations { match self { Features :: Dense ( da ) => da . clone ( ) , Features :: Sparse ( sa ) => { let mut phi = Array1 :: zeros ( sa . dim ) ; for ( & idx , & act ) in sa . iter ( ) { phi [ idx ] = act ; } phi } } }
Clone the features and convert into a raw, dense vector of activations.
Clone the features and convert into a raw dense vector of activations .
&self
&self