File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -18,16 +18,15 @@ struct LinearTransform{T<:AbstractMatrix{<:Real}} <: Transform
18
18
end
19
19
20
20
function set! (t:: LinearTransform{<:AbstractMatrix{T}} , A:: AbstractMatrix{T} ) where {T<: Real }
21
- @assert size (t. A) == size (A) " Size of the given matrix $(size (A)) and the transformation matrix $(size (t. A)) are not the same"
21
+ size (t. A) == size (A) ||
22
+ error (" Size of the given matrix $(size (A)) and the transformation matrix $(size (t. A)) are not the same" )
22
23
t. A .= A
23
24
end
24
25
25
26
(t:: LinearTransform )(x:: Real ) = vec (t. A * x)
26
27
(t:: LinearTransform )(x:: AbstractVector{<:Real} ) = t. A * x
27
28
28
- function Base. map (t:: LinearTransform , x:: AbstractVector{<:Real} )
29
- return ColVecs (t. A * x' )
30
- end
29
+ Base. map (t:: LinearTransform , x:: AbstractVector{<:Real} ) = ColVecs (t. A * x' )
31
30
Base. map (t:: LinearTransform , x:: ColVecs ) = ColVecs (t. A * x. X)
32
31
Base. map (t:: LinearTransform , x:: RowVecs ) = RowVecs (x. X * t. A' )
33
32
You can’t perform that action at this time.
0 commit comments