~ubuntu-branches/ubuntu/saucy/cuyo/saucy

« back to all changes in this revision

Viewing changes to datasrc/pics/vektor.mli

  • Committer: Bazaar Package Importer
  • Author(s): Angel Abad
  • Date: 2010-07-19 09:54:44 UTC
  • mfrom: (4.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20100719095444-ecoegzo1vvvdwra9
Tags: 2.~-1.1.brl3-1ubuntu1
* Merge from debian unstable (LP: #607106). Remaining changes:
  - Don't register MimeType=application/x-executable in
    the .desktop file.
  - Remove UTF-8 in the .desktop file
  - 

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
(*
2
 
   Copyright 2006 by Mark Weyer
3
 
 
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.
8
 
 
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.
13
 
 
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
17
 
*)
18
 
 
19
 
open Natmod
20
 
 
21
 
exception Falsche_Dimension
22
 
 
23
 
module Vektor : functor(D : Nat) -> sig
24
 
  (* Vektoren der L�nge D.n *)
25
 
 
26
 
  type t
27
 
 
28
 
  val compare : t -> t -> int
29
 
  val to_string : t -> string
30
 
 
31
 
  val koord : t -> int -> float
32
 
  val setz_koord : t -> int -> float -> t
33
 
 
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
38
 
 
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
45
 
 
46
 
end
47
 
 
48
 
module Laenger : functor(D : Nat) -> functor(D' : Nat) -> sig
49
 
  val laenger : Vektor(D).t -> Vektor(D').t
50
 
end
51
 
 
52
 
module Kuerzer : functor(D : Nat) -> functor(D' : Nat) -> sig
53
 
  val kuerzer : Vektor(D).t -> Vektor(D').t
54
 
end
55
 
 
56
 
 
57
 
 
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 *)
61
 
 
62
 
  type t
63
 
 
64
 
  val aus_funktion : (int -> int -> float) -> t
65
 
 
66
 
  val plus : t -> t -> t
67
 
  val mal_skalar : float -> t -> t
68
 
  val mal_vektor : t -> Vektor(D2).t -> Vektor(D1).t
69
 
 
70
 
end
71
 
 
72
 
 
73
 
 
74
 
module QuadMatrix : functor(D:Nat) -> sig
75
 
  (* Zeug f�r quadratische Matrizen *)
76
 
 
77
 
  val eigenvektor1 : Matrix(D)(D).t -> Vektor(D).t
78
 
    (* Liefert einen normierten Eigenvektor zum betragsgr��ten Eigenwert *)
79
 
 
80
 
end
81