package phylogenetics

  1. Overview
  2. Docs
type t = vec
val init : int -> f:(int -> float) -> vec

Initialises a vector from a int->float function.

val add : vec -> vec -> vec

Vector addition.

val mul : vec -> vec -> vec

Element-wise product of two vectors.

val sum : vec -> float

Sum of the elements of a vector.

val log : vec -> vec

Element-wise logarithm of vector

val exp : vec -> vec

Element-wise exponential of matrix

val min : vec -> float

Minimum element in a vector.

val max : vec -> float

Maximum element in a vector.

val get : vec -> int -> float

Access a specific element of a vector.

val pp : Format.formatter -> vec -> unit

Prints a vector to the standard output.