-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadd.mli
73 lines (52 loc) · 1.81 KB
/
add.mli
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
(** Interface to ADD *)
(** type for ADDs *)
type t
(** Cudd_IsConstant. Is the ADD constant ? *)
val isConstant : t -> bool
(** Cudd_NodeReadIndex. Returns the index of the ADD (65535 for a constant ADD)*)
(*val nodeReadIndex : t -> int*)
(** Cudd_T. Returns the positive subnode of the ADD *)
val t : t -> t
(** Cudd_E. Returns the negative subnode of the ADD *)
val e : t -> t
(** Cudd_V. Returns the value of the assumed constant ADD *)
val v : t -> float
(** Cudd_addIthVar. *)
val ithVar : int -> t
(** Cudd_addPlus. *)
val plus : t -> t -> t
(** Cudd_addMinus. *)
val minus : t -> t -> t
(** Cudd_addTimes. *)
val times : t -> t -> t
(** Cudd_addDivide. *)
val divide : t -> t -> t
(** Cudd_addMinimum. *)
val minimum : t -> t -> t
(** Cudd_addMaximum. *)
val maximum : t -> t -> t
(** Cudd_addAgreement. *)
val agreement : t -> t -> t
(** Cudd_addDiff. *)
val diff : t -> t -> t
(** Cudd_addThreshold. *)
val threshold : t -> t -> t
(** Cudd_addSetNZ. *)
val setNZ : t -> t -> t
(** Cudd_addLog. *)
val log : t -> t
(** Cudd_addConst. Return a constant ADD with the given value. *)
val const : float -> t
(** Write the ADD in a dot file *)
val dumpDot : string -> t -> unit
(** Operations that can be used in matrix multiplication *)
type operation =
| Plus | Minimum | Times | Threshold | Divide | Minus | Maximum
| OneZeroMaximum | Diff | Agreement | Or | Nand | Nor | Xor | Xnor
(** Ring to be used matrix multiplication *)
type ring = { sum : operation ; product : operation ; zero : float }
(** matrix multiplication:
the two first arguments are the matrices to multiply,
the third is an array containing the variable on which to multiply (columns of the first matrix and lines of the second one)
the last argument is the ring to use for multiplication *)
val matrixMultiply : ring -> t -> t -> t array -> t