@@ -14,9 +14,9 @@ mutable struct RaggedMatrix{T} <: AbstractMatrix{T}
1414 # make sure the cols are monitonically increasing
1515 @assert 1 == cols[1 ]
1616 for j= 1 : length (cols)- 1
17- @assert cols[j] ≤ cols[j+ 1 ]
17+ @assert cols[j] ≤ cols[j+ 1 ]
1818 end
19- @assert cols[end ] == length (data)+ 1
19+ @assert cols[end ] == length (data)+ 1
2020
2121 # make sure we have less entries than the size of the matrix
2222 @assert length (data) ≤ m* (length (cols)- 1 )
@@ -58,7 +58,7 @@ function Base.setindex!(A::RaggedMatrix,v,k::Int,j::Int)
5858
5959 if A. cols[j]+ k- 1 < A. cols[j+ 1 ]
6060 A. data[A. cols[j]+ k- 1 ]= v
61- elseif v ≠ 0
61+ elseif v ≠ 0
6262 throw (BoundsError (A,(k,j)))
6363 end
6464 v
@@ -115,7 +115,7 @@ for (op,bop) in ((:(Base.rand), :rrand),)
115115end
116116
117117function RaggedMatrix {T} (Z:: Zeros , colns:: AbstractVector{Int} ) where {T}
118- if size (Z,2 ) ≠ length (colns)
118+ if size (Z,2 ) ≠ length (colns)
119119 throw (DimensionMismatch ())
120120 end
121121 RaggedMatrix (zeros (T,sum (colns)), [1 ; (1 .+ cumsum (colns))], size (Z,1 ))
@@ -137,7 +137,7 @@ RaggedMatrix(A::AbstractMatrix, colns::AbstractVector{Int}) = RaggedMatrix{eltyp
137137function mul! (y:: Vector , A:: RaggedMatrix , b:: Vector )
138138 m= size (A,2 )
139139
140- if m ≠ length (b) || size (A,1 ) ≠ length (y)
140+ if m ≠ length (b) || size (A,1 ) ≠ length (y)
141141 throw (BoundsError ())
142142 end
143143 T= eltype (y)
151151
152152
153153function BLAS. axpy! (a, X:: RaggedMatrix , Y:: RaggedMatrix )
154- if size (X) ≠ size (Y)
154+ if size (X) ≠ size (Y)
155155 throw (BoundsError ())
156156 end
157157
@@ -181,7 +181,7 @@ colstop(X::SubArray{T,2,RaggedMatrix{T},Tuple{UnitRange{Int},UnitRange{Int}}},
181181
182182function BLAS. axpy! (a,X:: RaggedMatrix ,
183183 Y:: SubArray{T,2,RaggedMatrix{T},Tuple{UnitRange{Int},UnitRange{Int}}} ) where T
184- if size (X) ≠ size (Y)
184+ if size (X) ≠ size (Y)
185185 throw (BoundsError ())
186186 end
187187
@@ -194,7 +194,7 @@ function BLAS.axpy!(a,X::RaggedMatrix,
194194 cy= colstop (Y,j)
195195 if cx > cy
196196 for k= cy+ 1 : cx
197- if X[k,j] ≠ 0
197+ if X[k,j] ≠ 0
198198 throw (BoundsError (" Trying to add a non-zero to a zero." ))
199199 end
200200 end
@@ -239,7 +239,7 @@ function mul!(Y::RaggedMatrix,A::RaggedMatrix,B::RaggedMatrix)
239239 col = max (col,colstop (A,k))
240240 end
241241
242- if col > colstop (Y,j)
242+ if col > colstop (Y,j)
243243 throw (BoundsError ())
244244 end
245245 end
0 commit comments