package phylogenetics

  1. Overview
  2. Docs
type symbol = t
include module type of struct include Linear_algebra.Vector end
val length : t -> int
val map : t -> f:(float -> float) -> t
val inplace_scal_mul : float -> t -> unit

Scalar-vector product (in-place).

val scal_mul : float -> t -> t

Scalar-vector product

val scal_add : float -> t -> t

Scalar-vector addition.

val add : t -> t -> t

Vector addition.

val mul : t -> t -> t

Element-wise product of two vectors.

val sum : t -> float

Sum of the elements of a vector.

val log : t -> t

Element-wise logarithm of vector

val exp : t -> t

Element-wise exponential of matrix

val min : t -> float

Minimum element in a vector.

val max : t -> float

Maximum element in a vector.

val get : t -> int -> float

Access a specific element of a vector.

val set : t -> int -> float -> unit

Set a specific element of a vector.

val robust_equal : tol:float -> t -> t -> bool
val to_array : t -> float array
val pp : Stdlib.Format.formatter -> t -> unit

Prints a vector to the standard output.

val iteri : t -> f:(int -> float -> 'a) -> unit
val init : (int -> float) -> t
val normalize : t -> t
val of_array_exn : float Core_kernel.Array.t -> t
val of_array : float Core_kernel.Array.t -> t option
OCaml

Innovation. Community. Security.