File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -871,6 +871,7 @@ r = randn(n)
871871
872872# with sign
873873T = AffineAdd (opA,d,false )
874+ @test sign (T) == - 1
874875
875876println (T)
876877x1 = randn (m)
@@ -881,6 +882,7 @@ r = randn(n)
881882
882883# with scalar
883884T = AffineAdd (opA,pi )
885+ @test sign (T) == 1
884886
885887println (T)
886888x1 = randn (m)
@@ -893,3 +895,15 @@ r = randn(n)
893895@test_throws ErrorException AffineAdd (DFT (4 ),randn (4 ))
894896AffineAdd (DFT (4 ),pi )
895897@test_throws ErrorException AffineAdd (Eye (4 ),im* pi )
898+
899+ # permute AddAffine
900+ n,m = 5 ,6
901+ A = randn (n,m)
902+ d = randn (n)
903+ opH = HCAT (Eye (n),MatrixOp (A))
904+ x = (randn (n),randn (m))
905+ opHT = AffineAdd (opH,d)
906+
907+ @test norm (opHT* x- (x[1 ]+ A* x[2 ]+ d)) < 1e-12
908+ p = [2 ;1 ]
909+ @test norm (permute (opHT,p)* x[p]- (x[1 ]+ A* x[2 ]+ d)) < 1e-12
You can’t perform that action at this time.
0 commit comments