38
38
39
39
# default_Fun is the default constructor, based on evaluation and transforms
40
40
# last argument is whether to splat or not
41
- default_Fun (T:: Type ,f,d:: Space ,pts:: AbstractArray ,:: Type{ Val{true} } ) =
41
+ default_Fun (T:: Type ,f,d:: Space ,pts:: AbstractArray , shouldsplat :: Val{true} ) =
42
42
Fun (d,transform (d,T[f (x... ) for x in pts]))
43
43
44
- default_Fun (T:: Type ,f,d:: Space ,pts:: AbstractArray ,:: Type{ Val{false} } ) =
44
+ default_Fun (T:: Type ,f,d:: Space ,pts:: AbstractArray , shouldsplat :: Val{false} ) =
45
45
Fun (d,transform (d,broadcast! (f, similar (pts, T), pts)))
46
46
47
47
48
- function default_Fun (f,d:: Space ,n:: Integer ,:: Type{ Val{false} } )
48
+ function default_Fun (f,d:: Space ,n:: Integer , shouldsplat :: Val{false} )
49
49
pts= points (d, n)
50
50
f1= f (pts[1 ])
51
51
if isa (f1,AbstractArray) && size (d) ≠ size (f1)
@@ -54,10 +54,10 @@ function default_Fun(f,d::Space,n::Integer,::Type{Val{false}})
54
54
55
55
# we need 3 eltype calls for the case Interval(Point([1.,1.]))
56
56
Tprom= choosefuncfstype (typeof (f1),prectype (domain (d)))
57
- default_Fun (Tprom,f,d,pts,Val{ false } )
57
+ default_Fun (Tprom,f,d,pts,Val ( false ) )
58
58
end
59
59
60
- function default_Fun (f,d:: Space ,n:: Integer ,:: Type{ Val{true} } )
60
+ function default_Fun (f,d:: Space ,n:: Integer , shouldsplat :: Val{true} )
61
61
pts= points (d, n)
62
62
f1= f (pts[1 ]. .. )
63
63
if isa (f1,AbstractArray) && size (d) ≠ size (f1)
@@ -66,10 +66,10 @@ function default_Fun(f,d::Space,n::Integer,::Type{Val{true}})
66
66
67
67
# we need 3 eltype calls for the case Interval(Point([1.,1.]))
68
68
Tprom= choosefuncfstype (typeof (f1),prectype (domain (d)))
69
- default_Fun (Tprom,f,d,pts,Val{ true } )
69
+ default_Fun (Tprom,f,d,pts,Val ( true ) )
70
70
end
71
71
72
- default_Fun (f,d:: Space ,n:: Integer ) = default_Fun (f,d,n,Val{ ! hasnumargs (f,1 )} )
72
+ default_Fun (f,d:: Space ,n:: Integer ) = default_Fun (f,d,n,Val ( ! hasnumargs (f,1 )) )
73
73
74
74
Fun (f,d:: Space ,n:: Integer ) = default_Fun (dynamic (f),d,n)
75
75
@@ -117,10 +117,10 @@ function _default_Fun(f, d::Space)
117
117
118
118
for logn = 4 : 20
119
119
# cf = Fun(f, d, 2^logn + 1)
120
- cf = default_Fun (f, d, 2 ^ logn)
120
+ cf = default_Fun (f, d, 2 ^ logn, Val ( false ) )
121
121
maxabsc = maximum (abs,cf. coefficients)
122
122
if maxabsc == 0 && maxabsfr == 0
123
- return ( zeros (d) )
123
+ return zeros (d)
124
124
end
125
125
126
126
b = block (d,length (cf. coefficients))
0 commit comments