 
 (s/def ::value float?)
 
-(s/def ::time int?)
-
 (s/def ::dimensions pos-int?)
 
-(s/def ::position (s/and vector? #(= ::dimensions (count %))))
+(s/def ::position-value (s/and vector?
+                               ;#(= ::dimensions (count %))
+                               ;#(doseq [v %] (float? v))
+                               ))
 
+(s/def ::position-index (s/and vector?
+                               ;#(= ::dimensions (count %))
+                               ;#(doseq [v %] (int? v))
+                               ))
 (s/def ::domain-start float?)
 (s/def ::domain-end float?)
 (s/def ::domain-interval (s/and float? pos?))
 (s/def ::domain (s/keys :req [::domain-start ::domain-end ::domain-interval]))
 (s/def ::domains (s/coll-of ::domain))
 
+(s/def ::t int?)
+
 (s/def ::time-point (s/keys :req [::t
                                   ::value
                                   ::status
-                                  ::label]
-                            :opt [::cluster]))
+                                  ::label
+                                  ::cluster-label]))
 
 (s/def ::time-points (s/coll-of ::time-point))
 
-(s/def ::cluster (s/coll-of ::grid-cell))
-
-(s/def ::clusters (s/coll-of ::cluster))
-
-(s/def ::grid-cell (s/keys :req [::position ::time-points]))
+(s/def ::grid-cell (s/keys :req [::position-value ::position-index ::time-points]))
 
 (s/def ::grid-cells (s/coll-of ::grid-cell))
+
+(s/def ::gap_time pos-int?)
+
+(s/def ::beta float?)
+(s/def ::lambda float?)
+(s/def ::c_l float?)
+(s/def ::c_m float?)
+
 
 (s/def ::properties (s/keys :req [::c_m
                                   ::c_l


(s/def ::initialized-clusters boolean?)

(s/def ::state (s/keys :req [::clusters
                             ::grid-cells
                             ::properties
                             ::initialized-clusters]))


;;TODO create an fdef and instrument to register specs

(defn dstream [{:keys [::state]}]
  ;(println (s/explain ::state state))
  state
  )

(s/fdef dstream
        :args ::state
        :ret ::state)

(stest/instrument `dstream)

  [& args]
  (println "Hello, World!"))

;;;TODO thought i needed to spec these "enums" for spec, but doesnt make it work
;(s/def ::dense string?)
;(s/def ::sparse string?)
;(s/def ::transitional string?)
;(s/def ::sporadic string?)
;(s/def ::normal string?)

(s/def ::cluster-label (s/or :string string? :nil nil?))

(s/def ::label #{::dense ::sparse ::transitional})

