sig
type calculator =
If of Pdffun.calculator list
| IfElse of Pdffun.calculator list * Pdffun.calculator list
| Bool of bool
| Float of float
| Int of int32
| Abs
| Add
| Atan
| Ceiling
| Cos
| Cvi
| Cvr
| Div
| Exp
| Floor
| Idiv
| Ln
| Log
| Mod
| Mul
| Neg
| Round
| Sin
| Sqrt
| Sub
| Truncate
| And
| Bitshift
| Eq
| Ge
| Gt
| Le
| Lt
| Ne
| Not
| Or
| Xor
| Copy
| Exch
| Pop
| Dup
| Index
| Roll
type sampled = {
size : int list;
order : int;
encode : float list;
decode : float list;
bps : int;
samples : int32 array;
}
and interpolation = { c0 : float list; c1 : float list; n : float; }
and stitching = {
functions : Pdffun.t list;
bounds : float list;
stitch_encode : float list;
}
and pdf_fun_kind =
Interpolation of Pdffun.interpolation
| Stitching of Pdffun.stitching
| Sampled of Pdffun.sampled
| Calculator of Pdffun.calculator list
and t = {
func : Pdffun.pdf_fun_kind;
domain : float list;
range : float list option;
}
val parse_function : Pdf.t -> Pdf.pdfobject -> Pdffun.t
exception BadFunctionEvaluation of string
val eval_function : Pdffun.t -> float list -> float list
val pdfobject_of_function : Pdf.t -> Pdffun.t -> Pdf.pdfobject
val print_function : Pdffun.t -> unit
end