pub fn prop(&self, element: &T) -> f64 {
        let size = self.size();

        if size == 0 {
            return 0.0
        }

        let count = self.count(element);
        (count as f64) / (size as f64)
    }
/// Return the proportion of occurrences of `v` in the data.
///
/// # Examples
///
/// ```rust
/// use countrs::Counter;
///
/// let mut counter = Counter::new(5);
///
/// assert_eq!(counter.prop(&'a'), 0.0);
/// counter.add('a');
/// assert_eq!(counter.prop(&'a'), 1.0);
/// ```
Return the proportion of occurrences of `v` in the data.
Return the proportion of occurrences of ` v ` in the data .
pub fn prop(&self, element: &T) -> f64 {
        let size = self.size();
        if size == 0 {
            return 0.0
        }
        let count = self.count(element);
        (count as f64) / (size as f64)
    }
pub fn prop ( & self , element : & T ) -> f64 { let size = self . size ( ) ; if size == 0 { return 0.0 } let count = self . count ( element ) ; ( count as f64 ) / ( size as f64 ) }
Return the proportion of occurrences of `v` in the data.
Return the proportion of occurrences of ` v ` in the data .
&self
element
&T
&self
element
&T
examples
```rust
use countrs::Counter.

let mut counter = Counter::new(5).


` ` ` rust use countrs :: Counter . let mut counter = Counter :: new ( 5 ) .