package owl-base

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Owl_countmin_table.NativeSource

Type definition
Sourcetype t

The type of count-min tables

Core functions
Sourceval init : int -> int -> t

``init l w`` generates a table with length ``l`` and width ``w``, all counters initialized to 0.

Sourceval incr : int -> int -> t -> unit

``incr i j t`` increments the counter at length index ``i`` and width index ``j`` in table ``t``.

Sourceval get : int -> int -> t -> int

``get i j t`` gets the value of the counter at length index ``i`` and width index ``j`` in table ``t``.

Sourceval clone : t -> t

``clone t`` returns a new table with the same contents as ``t``.

Sourceval merge : t -> t -> t

``merge t1 t2`` merges tables ``t1`` and ``t2`` element-wise. If ``t1`` and ``t2`` have the same dimensions, returns a new table whose elements are the sums of corresponding elements from ``t1`` and ``t2``. If dimensions do not match, raises ``INVALID_ARGUMENT``.

OCaml

Innovation. Community. Security.