@@ -2,7 +2,7 @@ immutable Butterfly{T} <: Factorization{T}
2
2
columns:: Vector{Matrix{T}}
3
3
factors:: Vector{Vector{IDPackedV{T}}}
4
4
permutations:: Vector{Vector{ColumnPermutation}}
5
- indices:: Vector{Vector{Int64 }}
5
+ indices:: Vector{Vector{Int }}
6
6
temp1:: Vector{T}
7
7
temp2:: Vector{T}
8
8
temp3:: Vector{T}
28
28
29
29
size (B:: Butterfly ) = size (B, 1 ), size (B, 2 )
30
30
31
- function Butterfly {T} (A:: AbstractMatrix{T} , L:: Int64 ; isorthogonal:: Bool = false , opts... )
31
+ function Butterfly {T} (A:: AbstractMatrix{T} , L:: Int ; isorthogonal:: Bool = false , opts... )
32
32
m, n = size (A)
33
33
tL = 2 ^ L
34
34
@@ -38,13 +38,13 @@ function Butterfly{T}(A::AbstractMatrix{T}, L::Int64; isorthogonal::Bool = false
38
38
columns = Vector {Matrix{T}} (tL)
39
39
factors = Vector {Vector{IDPackedV{T}}} (L+ 1 )
40
40
permutations = Vector {Vector{ColumnPermutation}} (L+ 1 )
41
- indices = Vector {Vector{Int64 }} (L+ 1 )
42
- cs = Vector {Vector{Vector{Int64 }}} (L+ 1 )
41
+ indices = Vector {Vector{Int }} (L+ 1 )
42
+ cs = Vector {Vector{Vector{Int }}} (L+ 1 )
43
43
44
44
factors[1 ] = Vector {IDPackedV{T}} (tL)
45
45
permutations[1 ] = Vector {ColumnPermutation} (tL)
46
- indices[1 ] = Vector {Int64 } (tL+ 1 )
47
- cs[1 ] = Vector {Vector{Int64 }} (tL)
46
+ indices[1 ] = Vector {Int } (tL+ 1 )
47
+ cs[1 ] = Vector {Vector{Int }} (tL)
48
48
49
49
ninds = linspace (1 , n+ 1 , tL+ 1 )
50
50
indices[1 ][1 ] = 1
@@ -53,7 +53,7 @@ function Butterfly{T}(A::AbstractMatrix{T}, L::Int64; isorthogonal::Bool = false
53
53
nu = round (Int, ninds[j+ 1 ]) - 1
54
54
nd = nu- nl+ 1
55
55
if isorthogonal
56
- factors[1 ][j] = IDPackedV {T} (collect (1 : nd),Int64 [],Array {T} (nd,0 ))
56
+ factors[1 ][j] = IDPackedV {T} (collect (1 : nd),Int [],Array {T} (nd,0 ))
57
57
else
58
58
factors[1 ][j] = idfact! (A[:,nl: nu], LRAOpts)
59
59
end
@@ -66,8 +66,8 @@ function Butterfly{T}(A::AbstractMatrix{T}, L::Int64; isorthogonal::Bool = false
66
66
for l = 2 : L+ 1
67
67
factors[l] = Vector {IDPackedV{T}} (tL)
68
68
permutations[l] = Vector {ColumnPermutation} (tL)
69
- indices[l] = Vector {Int64 } (tL+ 1 )
70
- cs[l] = Vector {Vector{Int64 }} (tL)
69
+ indices[l] = Vector {Int } (tL+ 1 )
70
+ cs[l] = Vector {Vector{Int }} (tL)
71
71
72
72
ctr = 0
73
73
minds = linspace (1 , m+ 1 , ii+ 1 )
@@ -81,7 +81,7 @@ function Butterfly{T}(A::AbstractMatrix{T}, L::Int64; isorthogonal::Bool = false
81
81
lc = length (cols)
82
82
Av = A[ml: mu,cols]
83
83
if maximum (abs, Av) < realmin (real (T))/ eps (real (T))
84
- factors[l][j+ ctr] = IDPackedV {T} (Int64 [], collect (1 : lc), Array {T} (0 ,lc))
84
+ factors[l][j+ ctr] = IDPackedV {T} (Int [], collect (1 : lc), Array {T} (0 ,lc))
85
85
else
86
86
LRAOpts. rtol = eps (real (T))* max (mu- ml+ 1 , lc)
87
87
factors[l][j+ ctr] = idfact! (Av, LRAOpts)
@@ -108,7 +108,7 @@ function Butterfly{T}(A::AbstractMatrix{T}, L::Int64; isorthogonal::Bool = false
108
108
Butterfly (columns, factors, permutations, indices, zeros (T, kk), zeros (T, kk), zeros (T, kk))
109
109
end
110
110
111
- function sumkmax (indices:: Vector{Vector{Int64 }} )
111
+ function sumkmax (indices:: Vector{Vector{Int }} )
112
112
ret = 0
113
113
@inbounds for j = 1 : length (indices)
114
114
ret = max (ret, indices[j][end ])
313
313
function allranks (B:: Butterfly )
314
314
L = length (B. factors)- 1
315
315
tL = 2 ^ L
316
- ret = zeros (Int64 , tL, L+ 1 )
316
+ ret = zeros (Int , tL, L+ 1 )
317
317
@inbounds for l = 1 : L+ 1
318
318
for j = 1 : tL
319
319
ret[j,l] = size (B. factors[l][j], 1 )
0 commit comments