Skip to content

Add frequency count / histogram to extra::stat #8281

Closed
@emberian

Description

@emberian

The way I see it working is it takes an Iterator<T: Clone> and creates some sort of Map<T, uint>. It iterates over the iterator and if it finds the value in the map, bumps the count, elsewise inserts the value into the map with a count of 1.

It needs to be Clone so it can be copied into the map. There might be other traits needed depending on the map the implementation uses. At the very least probably Eq or TotalEq.

comments, @graydon?

dibs to @mihneadb

Metadata

Metadata

Assignees

No one assigned

    Labels

    E-easyCall for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions