File: gsl_vector_complex_flat.mli

package info (click to toggle)
ocamlgsl 0.3.5-3
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 3,444 kB
  • ctags: 2,901
  • sloc: ml: 7,956; ansic: 6,796; makefile: 303; sh: 87; awk: 13
file content (47 lines) | stat: -rw-r--r-- 1,320 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
(* ocamlgsl - OCaml interface to GSL                        *)
(* Copyright () 2002 - Olivier Andrieu                     *)
(* distributed under the terms of the GPL version 2         *)

(** Vector of complex numbers implemented with a [float array] *)

type complex_vector_flat = 
    { data   : float array ;
      off    : int ;
      len    : int ;
      stride : int ; }

type vector = complex_vector_flat

(** {3 Operations} *)

open Gsl_complex

val create   : ?init:complex -> int -> vector
val of_array : complex array -> vector
val to_array : vector -> complex array

val of_complex_array : complex_array -> vector
val to_complex_array : vector -> complex_array

val length : vector -> int
val get : vector -> int -> complex
val set : vector -> int -> complex -> unit

val set_all   : vector -> complex -> unit
val set_zero  : vector -> unit
val set_basis : vector -> int -> unit

val memcpy : vector -> vector -> unit
val copy   : vector -> vector

val swap_element : vector -> int -> int -> unit
val reverse : vector -> unit

(** {3 No-copy operations} *)

val subvector : ?stride:int -> vector -> off:int -> len:int -> vector
val view_complex_array : ?stride:int -> ?off:int -> ?len:int -> complex_array -> vector

val real : vector -> Gsl_vector_flat.vector
val imag : vector -> Gsl_vector_flat.vector