imoca/count-min-sketch

存储在磁盘上的计数最小Sketch实现。

v1.0.0 2020-08-24 19:10 UTC

This package is auto-updated.

Last update: 2024-09-19 17:29:02 UTC


README

轻量级的计数最小Sketch实现,支持快速磁盘存储。

通过Composer安装

推荐通过Composer进行安装。

  1. 在项目的composer.json文件中将imoca/countminsketch添加为依赖项

        {
            "require": {
                "imoca/countminsketch": "*"
            }
        }

API

    $cms = new Imoca\CountMinSketch\CountMinSketch($nb_hash, $nb_width, 'path_to_file_store');
    $cms->record("word_to_insert");
    $counter = $cms->count("word_to_count");

    echo $cms; //working