pub fn to_other_types<I2>(&self) -> CsVecI<N, I2>
    where N: Clone,
          I2: SpIndex,
    {
        let indices = self.indices.iter()
                                  .map(|i| I2::from_usize(i.index()))
                                  .collect();
        let data = self.data.iter()
                            .map(|x| x.clone().into())
                            .collect();
        CsVecI {
            dim: self.dim,
            indices: indices,
            data: data,
        }
    }
/// Clone the vector with another integer type for its indices
///
/// # Panics
///
/// If the indices cannot be represented by the requested integer type.
Clone the vector with another integer type for its indices
Clone the vector with another integer type for its indices
pub fn to_other_types<I2>(&self) -> CsVecI<N, I2>
    where N: Clone,
          I2: SpIndex,
    {
        let indices = self.indices.iter()
                                  .map(|i| I2::from_usize(i.index()))
                                  .collect();
        let data = self.data.iter()
                            .map(|x| x.clone().into())
                            .collect();
        CsVecI {
            dim: self.dim,
            indices: indices,
            data: data,
        }
    }
pub fn to_other_types < I2 > ( & self ) -> CsVecI < N , I2 > where N : Clone , I2 : SpIndex , { let indices = self . indices . iter ( ) . map ( | i | I2 :: from_usize ( i . index ( ) ) ) . collect ( ) ; let data = self . data . iter ( ) . map ( | x | x . clone ( ) . into ( ) ) . collect ( ) ; CsVecI { dim : self . dim , indices : indices , data : data , } }
Clone the vector with another integer type for its indices
Clone the vector with another integer type for its indices
&self
&self
panics
If the indices cannot be represented by the requested integer type.
If the indices cannot be represented by the requested integer type .