You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello, I'd like to evaluate FReps at a vector of inputs as follows:
julia>using Descartes
julia> c =Circle(1.0)
Circle{Float64}(1.0)
julia> x =rand(2,10);
julia>FRep(c,x[1])
-0.8388503806040237
julia> f =FRep(c,x)
1.382979664762074
I would like the final output f to be a vector of size [1,10] with f[i] = FRep(c,x[i]). Could you help me get started with implementing this?
The text was updated successfully, but these errors were encountered:
Something like the following would give you a generator for the points, which can be nice for iterative methods.
julia> using Descartes
julia> c = Circle(1.0)
Circle{Float64}(1.0)
julia> x = rand(2,10);
julia> f(x) = FRep(c, x)
f (generic function with 1 method)
julia> collect(f(x[:,i]) for i in 1:size(x)[2])
10-element Vector{Float64}:
-0.2540315834260186
-0.06483389183029131
-0.8770595028565922
-0.4213730472330932
-0.4748196284624575
-0.40939828690307556
-0.17437016828320873
-0.25766200363764136
-0.11564304875354436
-0.19694540348031064
I'm sure there is a way to do this with broadcasting syntax as well.
Hello, I'd like to evaluate
FRep
s at a vector of inputs as follows:I would like the final output
f
to be a vector of size[1,10]
withf[i] = FRep(c,x[i])
. Could you help me get started with implementing this?The text was updated successfully, but these errors were encountered: