fixes incorrect type hinting that was causing the method not to be found
This commit is contained in:
parent
aa4048c580
commit
af47246368
1 changed files with 6 additions and 4 deletions
|
@ -139,7 +139,9 @@
|
||||||
ik (int (instance-index-attr inst k))]
|
ik (int (instance-index-attr inst k))]
|
||||||
(if (or (keyword? val) (string? val))
|
(if (or (keyword? val) (string? val))
|
||||||
;; this is a nominal entry in keyword or string form
|
;; this is a nominal entry in keyword or string form
|
||||||
(.setValue inst ik ^String (name val))
|
(do
|
||||||
|
(prn {:val val :inst inst :doubles (vec (.toDoubleArray inst)) :ik ik})
|
||||||
|
(.setValue inst ik ^String (name val)))
|
||||||
(.setValue inst ik (double val))))
|
(.setValue inst ik (double val))))
|
||||||
;; A double value for the entry
|
;; A double value for the entry
|
||||||
(.setValue inst (int c) (double (first vs)))))
|
(.setValue inst (int c) (double (first vs)))))
|
||||||
|
@ -292,9 +294,9 @@ If the class is nominal then the string value (not keyword) is returned."
|
||||||
;; manipulation of instances
|
;; manipulation of instances
|
||||||
|
|
||||||
(defn instance-set-class
|
(defn instance-set-class
|
||||||
"Sets the index of the class attribute for this instance"
|
"Sets the value (label) of the class attribute for this instance"
|
||||||
[^Instance instance pos]
|
[^Instance instance ^String val]
|
||||||
(doto instance (.setClassValue (int pos))))
|
(doto instance (.setClassValue val)))
|
||||||
|
|
||||||
(defn instance-get-class
|
(defn instance-get-class
|
||||||
"Get the index of the class attribute for this instance"
|
"Get the index of the class attribute for this instance"
|
||||||
|
|
Loading…
Reference in a new issue