Updated types for density' and
kde'
This commit is contained in:
parent
db05e20980
commit
9a6cdf420b
|
@ -4,5 +4,8 @@
|
|||
|
||||
(require/typed/provide
|
||||
plot/private/contracted/kde
|
||||
[kde ((Listof Real) Real -> (Values mapped-function (Option Real) (Option Real)))]
|
||||
[kde (case-> ((Listof Real) Real
|
||||
-> (Values mapped-function (Option Real) (Option Real)))
|
||||
((Listof Real) Real (U (Listof Real) #f)
|
||||
-> (Values mapped-function (Option Real) (Option Real))))]
|
||||
)
|
||||
|
|
|
@ -78,6 +78,7 @@
|
|||
|
||||
[density (((Sequenceof Real))
|
||||
(Real
|
||||
(Option (Sequenceof Real))
|
||||
[#:x-min (Option Real)]
|
||||
[#:x-max (Option Real)]
|
||||
[#:y-min (Option Real)]
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
(function (λ: ([x : Real]) x) -1.5 (- (exp 1.5) 1) #:color 0 #:style 'dot)))
|
||||
|
||||
(plot (density xs 1))
|
||||
(plot (density xs 1 (map (λ: ([x : Flonum]) (sqr x)) xs)))
|
||||
|
||||
(plot (lines-interval
|
||||
(map (λ: ([x : Real] [y : Real]) (list x y 5.0))
|
||||
|
|
Loading…
Reference in New Issue
Block a user