(*
This file is part of the dpll(t) engine sammy
Copyright (C) 2004  The University of Iowa
Cesare Tinelli
George Hagen

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
*)

(** Circular array data structure. 

These are similar to normal arrays, but the "first" element can be 
arbitrarily changed.  Used in clauses.
*)

type 'a c_array

val length : 'a c_array -> int
(** Returns the lenght (number of elements) in the c_array. *)

val get : 'a c_array -> int -> 'a 
(** Returns the n-th element of the c_array. *)

val set : 'a c_array -> int -> 'a -> unit
(** [C_array.set a i x] sets the i-th element of c_array [a] to [x] *)

val make : int -> 'a -> 'a c_array
(** Creates a new c_array of length n *)

val of_list : 'a list -> 'a c_array
(** Creates a new c_array from a list. *)

val set_start : 'a c_array -> int -> unit
(** Sets the (internal) start index of a c_array.  (Externally the array always begins at index 0.) *)
