package camlpdf

  1. Overview
  2. Docs
type calculator =
  1. | If of calculator list
  2. | IfElse of calculator list * calculator list
  3. | Bool of bool
  4. | Float of float
  5. | Int of int32
  6. | Abs
  7. | Add
  8. | Atan
  9. | Ceiling
  10. | Cos
  11. | Cvi
  12. | Cvr
  13. | Div
  14. | Exp
  15. | Floor
  16. | Idiv
  17. | Ln
  18. | Log
  19. | Mod
  20. | Mul
  21. | Neg
  22. | Round
  23. | Sin
  24. | Sqrt
  25. | Sub
  26. | Truncate
  27. | And
  28. | Bitshift
  29. | Eq
  30. | Ge
  31. | Gt
  32. | Le
  33. | Lt
  34. | Ne
  35. | Not
  36. | Or
  37. | Xor
  38. | Copy
  39. | Exch
  40. | Pop
  41. | Dup
  42. | Index
  43. | Roll
type sampled = {
  1. size : int list;
  2. order : int;
  3. encode : float list;
  4. decode : float list;
  5. bps : int;
  6. samples : int32 array;
}
and interpolation = {
  1. c0 : float list;
  2. c1 : float list;
  3. n : float;
}
and stitching = {
  1. functions : t list;
  2. bounds : float list;
  3. stitch_encode : float list;
}
and pdf_fun_kind =
  1. | Interpolation of interpolation
  2. | Stitching of stitching
  3. | Sampled of sampled
  4. | Calculator of calculator list
and t = {
  1. func : pdf_fun_kind;
  2. domain : float list;
  3. range : float list option;
}
val string_of_calculator_inner : calculator -> string
val string_of_calculator : calculator list -> string
val print_function : t -> unit
val keyword_of_string : string -> calculator
val parse_calculator : string -> calculator list
val parse_function : Pdf.t -> Pdf.pdfobject -> t
exception BadFunctionEvaluation of string
val interpolate : float -> float -> float -> float -> float -> float
val eval_function_sampled : t -> sampled -> float list -> float list
val eval_function_calculator : float list -> calculator list -> float list
val eval_function : t -> float list -> float list
val funtype_of_function : t -> int
val mkreal : float -> Pdf.pdfobject
val entries_of_interpolation : interpolation -> (string * Pdf.pdfobject) list
val entries_of_stitching : Pdf.t -> stitching -> (string * Pdf.pdfobject) list
val extra_entries_of_function : Pdf.t -> t -> (string * Pdf.pdfobject) list
val pdfobject_of_function : Pdf.t -> t -> Pdf.pdfobject