2
Copyright 2006 by Mark Weyer
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21
exception Falsche_Dimension
23
module Vektor : functor(D : Nat) -> sig
24
(* Vektoren der L�nge D.n *)
28
val compare : t -> t -> int
29
val to_string : t -> string
31
val koord : t -> int -> float
32
val setz_koord : t -> int -> float -> t
34
val einheit : int -> t
35
val aus_funktion : (int -> float) -> t
36
val aus_array : float array -> t
37
val zu_array : t -> float array
39
val plus : t -> t -> t
40
val mal : float -> t -> t
41
val produkt : t -> t -> float
42
val abstand2 : t -> t -> float
43
(* euklidischer Abstand im Quadrat *)
44
val laenge : t -> float
48
module Laenger : functor(D : Nat) -> functor(D' : Nat) -> sig
49
val laenger : Vektor(D).t -> Vektor(D').t
52
module Kuerzer : functor(D : Nat) -> functor(D' : Nat) -> sig
53
val kuerzer : Vektor(D).t -> Vektor(D').t
58
module Matrix : functor(D1:Nat) -> functor(D2:Nat) -> sig
59
(* Matrizen mit D1.n Zeilen und D2.n Spalten
60
Zeilenindices kommen immer zuerst *)
64
val aus_funktion : (int -> int -> float) -> t
66
val plus : t -> t -> t
67
val mal_skalar : float -> t -> t
68
val mal_vektor : t -> Vektor(D2).t -> Vektor(D1).t
74
module QuadMatrix : functor(D:Nat) -> sig
75
(* Zeug f�r quadratische Matrizen *)
77
val eigenvektor1 : Matrix(D)(D).t -> Vektor(D).t
78
(* Liefert einen normierten Eigenvektor zum betragsgr��ten Eigenwert *)