6
6
7
7
pairwise (d:: PreMetric , X:: AbstractVector ) = pairwise (d, X, X)
8
8
9
- function pairwise! (out :: AbstractMatrix , d :: PreMetric , X:: AbstractVector , Y:: AbstractVector )
9
+ function pairwise! (d :: PreMetric , out :: AbstractMatrix , X:: AbstractVector , Y:: AbstractVector )
10
10
return broadcast! (d, out, X, permutedims (Y))
11
11
end
12
12
13
- pairwise! (out :: AbstractMatrix , d :: PreMetric , X:: AbstractVector ) = pairwise! (out, d , X, X)
13
+ pairwise! (d :: PreMetric , out :: AbstractMatrix , X:: AbstractVector ) = pairwise! (d, out , X, X)
14
14
15
15
function pairwise (d:: PreMetric , x:: AbstractVector{<:Real} )
16
16
return Distances_pairwise (d, reshape (x, :, 1 ); dims= 1 )
@@ -20,14 +20,14 @@ function pairwise(d::PreMetric, x::AbstractVector{<:Real}, y::AbstractVector{<:R
20
20
return Distances_pairwise (d, reshape (x, :, 1 ), reshape (y, :, 1 ); dims= 1 )
21
21
end
22
22
23
- function pairwise! (out :: AbstractMatrix , d :: PreMetric , x:: AbstractVector{<:Real} )
24
- return Distances. pairwise! (out, d , reshape (x, :, 1 ); dims= 1 )
23
+ function pairwise! (d :: PreMetric , out :: AbstractMatrix , x:: AbstractVector{<:Real} )
24
+ return Distances. pairwise! (d, out , reshape (x, :, 1 ); dims= 1 )
25
25
end
26
26
27
27
function pairwise! (
28
- out :: AbstractMatrix , d :: PreMetric , x:: AbstractVector{<:Real} , y:: AbstractVector{<:Real}
28
+ d :: PreMetric , out :: AbstractMatrix , x:: AbstractVector{<:Real} , y:: AbstractVector{<:Real}
29
29
)
30
- return Distances. pairwise! (out, d , reshape (x, :, 1 ), reshape (y, :, 1 ); dims= 1 )
30
+ return Distances. pairwise! (d, out , reshape (x, :, 1 ), reshape (y, :, 1 ); dims= 1 )
31
31
end
32
32
33
33
# Also defines the colwise method for abstractvectors
0 commit comments