package orf

  1. Overview
  2. Docs

Module Orf.Feature_vectorSource

Sourcetype feature = int

A feature is accessed via its (integer) index.

Sourcetype 'a t

'a t is the type of a feature vector with feature indexes of type int and values of type 'a.

Sourceval iter : (feature -> 'a -> unit) -> 'a t -> unit

Iterate on a feature vector.

Sourceval zero : unit -> 'a t

The zero feature vector.

Sourceval get : feature -> int t -> int

get feat vec returns the value associated to feat in the integer-valued vector vec.

Sourceval set : feature -> 'a -> 'a t -> unit

set feat val vec sets the feature at index feat to value val in vector vec.