Module Cgr.Square_base


module Square_base: Cgr_square_base

type coord = float * float 

type interval =
| Rectangle of coord * coord (*bottom left point, up right point*)
| Circle of coord * float (*center, diameter/2*)
| Compl of (coord * coord)
* interval list
(*rectangle bound * intervals for which the interval is the complementary*)
| Fun of string * (coord -> bool) * Cgr_types.nucleotide list (*name of function, predicate, nucs-transformations to apply on coordinates before using the predicate*)
| And of interval * interval

type zone = {
   zone_name : string option;
   zone_intervals : interval list;
}
type zone_kind = [ `Circle | `Rectangle ] 
val zone_kinds : (char * string * [> `Circle | `Rectangle ]) list
val empty_zone : zone
val zone_is_empty : zone -> bool
val zone_name : zone -> string option
val string_of_coord : float * float -> string
val coord_of_string : string -> float * float
val intervals_of_string : string -> interval list
val zone_of_string : string -> zone
val string_of_interval : interval -> string
val string_of_interval_list : interval list -> string
val string_of_zone : zone -> string
val simple_string_of_zone : zone -> string
val string_descr_of_zone : zone -> string
val zone_list_of_channel : Pervasives.in_channel -> zone list
val zone_list_of_file : string -> zone list
val get_pred_fun : (string -> coord -> bool) Pervasives.ref
val trans_coord_for_fun : coord -> Cgr_types.nucleotide -> coord