package gsl

  1. Overview
  2. Docs

Module Gsl.Vector_flatSource

Vector of floats implemented with a float array

Sourcetype double_vector_flat = private {
  1. data : float array;
  2. off : int;
  3. len : int;
  4. stride : int;
}
Sourceval check : vector -> vector
  • raises Failure

    if off, len or stride designate an invalid subvector of data

Operations

Sourceval create : ?init:float -> int -> vector
Sourceval of_array : float array -> vector
Sourceval to_array : vector -> float array
Sourceval length : vector -> int
Sourceval get : vector -> int -> float
Sourceval set : vector -> int -> float -> unit
Sourceval set_all : vector -> float -> unit
Sourceval set_zero : vector -> unit
Sourceval set_basis : vector -> int -> unit
Sourceval memcpy : src:vector -> dst:vector -> unit
Sourceval copy : vector -> vector
Sourceval swap_element : vector -> int -> int -> unit
Sourceval reverse : vector -> unit
Sourceval add : vector -> vector -> unit
Sourceval sub : vector -> vector -> unit
Sourceval mul : vector -> vector -> unit
Sourceval div : vector -> vector -> unit
Sourceval scale : vector -> float -> unit
Sourceval add_constant : vector -> float -> unit
Sourceval is_null : vector -> bool
Sourceval max : vector -> float
Sourceval min : vector -> float
Sourceval minmax : vector -> float * float
Sourceval max_index : vector -> int
Sourceval min_index : vector -> int
Sourceval minmax_index : vector -> int * int

No-copy operations

Sourceval subvector : ?stride:int -> vector -> off:int -> len:int -> vector
Sourceval view_array : ?stride:int -> ?off:int -> ?len:int -> float array -> vector
OCaml

Innovation. Community. Security.