package phylogenetics

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
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.Array.t -> t
val of_array : float Core.Array.t -> t option
val map2 : t -> t -> f:(float -> float -> float) -> t
val mapi : t -> f:(int -> float -> float) -> t
val foldi : t -> init:'a -> f:(int -> 'a -> float -> 'a) -> 'a
val fold : t -> init:'a -> f:('a -> float -> 'a) -> 'a
val counti : t -> f:(int -> float -> bool) -> int
val count : t -> f:(float -> bool) -> int
val maxi : t -> int * Core.Float.t

Element with maximum value. In case of ties, it is the first one encountered

OCaml

Innovation. Community. Security.