To focus the search input from anywhere on the page, press the 'S' key.
in-package search v0.1.0
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Parameters
Signature
module Boltzmann : sig ... end
Tree representation of the definition of a combinatorial class
Note: the functions in Map should be bijections whenever possible. Not doing so is not a problem in itself, but we can predict what will happen:
- without injectivity, some elements will have a greater probability of occurence;
- without surjectivity, the sampling will not be exhaustive. Please keep this notion in mind when manually creating
class_tree
s.
val unbounded_seq : sequence_kind
val bounded_seq : int -> int option -> sequence_kind
type _ class_tree =
| One : unit class_tree
| Scalar : K.t -> unit class_tree
| Z : unit class_tree
| Empty : 'a class_tree
| Sampler : 'a Sampler.t -> 'a class_tree
| Class : 'a combi_class -> 'a class_tree
| Union : 'a class_tree list -> 'a class_tree
| Product : 'a class_tree * 'b class_tree -> ('a * 'b) class_tree
| Sequence : sequence_kind * 'a class_tree -> 'a list class_tree
| Map : 'a class_tree * ('a -> 'b) -> 'b class_tree
and 'a stub =
| S_One : unit stub
| S_Z : unit stub
| S_Sampler : 'a Sampler.t -> 'a stub
| S_Empty : 'a stub
| S_Class : 'a combi_class -> 'a stub
| S_Union : 'a solved_tree list -> 'a stub
| S_Product : 'a solved_tree * 'b solved_tree -> ('a * 'b) stub
| S_Sequence : sequence_kind * 'a solved_tree -> 'a list stub
| S_Map : 'a solved_tree * ('a -> 'b) -> 'b stub
and 'a combi_class = {
name : Literal.Class.t;
mutable class_tree : 'a class_tree option;
mutable solved_tree : 'a solved_tree option;
}
Reference to a class_tree
with a name. Allows for mutual recursion.
val get_name : 'a combi_class -> Literal.Class.t
val get_class : 'a combi_class -> 'a class_tree option
val get_solved : 'a combi_class -> 'a solved_tree option
val new_class : Literal.Class.t -> 'a combi_class
val new_class_of_str : string -> 'a combi_class
val reset_class : 'a combi_class -> unit
val update_class : 'a combi_class -> 'a class_tree -> unit
val reset_solved : 'a combi_class -> unit
val update_solved : 'a combi_class -> 'a solved_tree -> unit
val tup2 : 'a class_tree -> 'b class_tree -> ('a * 'b) class_tree
tupn
generates a t class_tree
where t
is a tuple of size n
Useful before a Map to build records.
val tup3 :
'a class_tree ->
'b class_tree ->
'c class_tree ->
('d * 'e * 'f) class_tree
val tup4 :
'a class_tree ->
'b class_tree ->
'c class_tree ->
'd class_tree ->
('e * 'f * 'g * 'h) class_tree
val tup5 :
'a class_tree ->
'b class_tree ->
'c class_tree ->
'd class_tree ->
'e class_tree ->
('f * 'g * 'h * 'i * 'j) class_tree
val mul_scalar : K.t -> 'a class_tree -> 'b class_tree
mul_scalar k t
multiplies the given tree t
with a weight k
. Used to skew the distribution without changing the generated objects.
val (+) : 'a class_tree -> 'a class_tree -> 'b class_tree
val (*) : 'a class_tree -> 'b class_tree -> ('a * 'b) class_tree
val z : 'a class_tree -> 'b class_tree
val seq : 'a class_tree -> 'a list class_tree
val seq_bounded : min:int -> ?max:int -> 'a class_tree -> 'a list class_tree
val option : 'a class_tree -> 'b option class_tree
val stub_node_to_string : 'a. 'a stub -> string
val solved_node_to_string : 'a. 'a solved_tree -> string
val solved_to_strings : 'a. 'a solved_tree -> string list
val pp_solved_tree : Format.formatter -> 'a solved_tree -> unit
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page