Navigation

Operators and Keywords

Function List:

C++ API

test_index-wfi-f.m File Reference


Functions

"query","Octave:fortran-indexing" warning ()
 !warning ("off","Octave:fortran-indexing")
 !assert (isempty(a))
 !warning (wfi.state,"Octave:fortran-indexing")
 !assert (a(1), 1)
 !assert (a(:), 1)
 !assert (a(:,:), 1)
 !assert (a(1,:), 1)
 !assert (a(:, 1), 1)
 !assert (isempty(a(logical(0))))
 !fail ("a(-1)")
 !fail ("a(2);")
 !fail ("a(2,:);")
 !fail ("a(:,2);")
 !fail ("a(-1,:);")
 !fail ("a(:,-1);")
 !fail ("a([1,2,3]);")
 !fail ("a([1;2;3]);")
 !fail ("a([1,2;3,4]);")
 !fail ("a([0,1]);")
 !fail ("a([0;1]);")
 !fail ("a([-1,0]);")
 !fail ("a([-1;0]);")
 !assert (a(1), 4)
 !assert (a(2), 3)
 !assert (all(a(:)==a_prime))
 !assert (all(a(1,:)==a))
 !assert (a(:, 3), 2)
 !assert (all(a(:,:)==a))
 !assert (all(a(logical([0, 1, 1, 0]))==mid_a))
 !fail ("a(0);")
 !fail ("a(5);")
 !fail ("a(0,1);")
 !assert (isempty(a(logical(0),:)))
 !fail ("a(:,0);")
 !assert (isempty(a([])))
 !assert (isempty(a([],:)))
 !assert (isempty(a(:,[])))
 !assert (all(all(a(:,:)==a)))
 !assert (all(a(:)==a_fvec))
 !b (:,:, 2)
 !assert (a(:),[1;3;2;4])
 !assert (a(1:2),[1, 3])
 !assert (a(:,:),[1, 2;3, 4])
 !assert (a(:, 1),[1;3])
 !assert (a(1, 1), 1)
 !assert (a(1:2, 1),[1;3])
 !assert (a(:,:, 1),[1, 2;3, 4])
!test !c (:,:, 1)
 !c (:,:, 2)
 !c (:,:, 1, 2)
 !c (:,:, 2, 1)
 !c (:,:, 2, 2)
 !assert (a(:,:,[1, 1],[1, 1]), c)%!assert(a(1
 zeros (1, 0))
 !assert (a(1,[],[1, 1]), zeros(1, 0, 2))
 !assert (a(1, 1,[]), zeros(1, 1, 0))
!test !c (1:10, 1)
 !assert (c,[1:10]')
 !assert (b(:),[1;3;2;4;5;7;6;8])
 !assert (b(:,:),[1, 2, 5, 6;3, 4, 7, 8])
 !assert (b(:, 1),[1;3])
 !assert (b(:,:,:), reshape([1, 3, 2, 4, 5, 7, 6, 8],[2, 2, 2]))
 !assert (b(:, 1, 1),[1;3])
 !assert (b(:, 1, 1,[1, 1]), reshape([1, 3, 1, 3],[2, 1, 1, 2]))
 !assert (b(1, 3), 5)
 !assert (b(1,[3, 4]),[5, 6])
 !assert (b(1, 1:4),[1, 2, 5, 6])
 !assert (b(1,[],:), zeros(1, 0, 2))
 !assert (b(1,[]), zeros(1, 0))
 !assert (b(:, 3),[5;7])%!assert(b([1
 !assert (b(true(2, 1), 3),[5;7])%!assert(b(false(2
 zeros (0, 1))%!assert(b([]
!test !a (1,:)
 !assert (a,[1, 3])
!test !a (:, 1)
 !b (1,:,:)
 !assert (b, reshape(a,[1, 2, 2]))
!test !a (1, 1:4, 2)
 !assert (a, b)
!test !a (:,:,:)
!test !a (:,:, 1)
 !assert (a,[1:4]')
!test !a (:, 1,:)
 !assert (a, reshape(1:4,[1, 1, 4]))
!test !a (1,:,:)
!test !a (1,:,:,:)
 !assert (a, reshape(1:4,[1, 1, 1, 4]))

Variables

 !a = []
 !a_prime = [4
 !mid_a = [3,2]
 !a_fvec = [1
 !a_col_1 = [1
 !a_col_2 = [2
 !a_row_1 = [1,2]
 !a_row_2 = [3,4]
Additional tests!shared a
 !b = a
 !assert (a(:,:,[1, 1]), c)%!test%!c(
!shared x !x = 1

Function Documentation

!test !a ( ,
,
,
 
)

!test !a ( ,
,
 
)

!test !a ( ,
,
 
)

!test !a ( ,
,
 
)

!test !a ( ,
,
 
)

!test !a ( ,
1:4  ,
 
)

!test !a ( ,
 
)

!test !a ( ,
 
)

!assert ( ,
reshape(1:4,[1, 1, 1, 4])   
)

!assert ( ,
reshape(1:4,[1, 1, 4])   
)

!assert ( ,
[1:4] '   
)

!assert ( ,
 
)

!assert ( ,
reshape(a,[1, 2, 2])   
)

!assert (  ) 

!assert ( b(true(2, 1), 3)   ) 

!assert ( b(:, 3)   ) 

!assert ( b(1,[])  ,
zeros(1, 0)   
)

!assert ( b(1,[],:)  ,
zeros(1, 0, 2)   
)

!assert ( b(1, 1:4)   ) 

!assert ( b(1,[3, 4])   ) 

!assert ( b(1, 3)  ,
 
)

!assert ( b(:, 1, 1,[1, 1])  ,
reshape([1, 3, 1, 3],[2, 1, 1, 2])   
)

!assert ( b(:, 1, 1)   ) 

!assert ( b(:,:,:)  ,
reshape([1, 3, 2, 4, 5, 7, 6, 8],[2, 2, 2])   
)

!assert ( b(:, 1)   ) 

!assert ( b(:,:)   ) 

!assert ( b(:)   ) 

!assert ( ,
[1:10] '   
)

!assert ( a(1, 1,[])  ,
zeros(1, 1, 0)   
)

!assert ( a(1,[],[1, 1])  ,
zeros(1, 0, 2)   
)

!assert ( a(:,:,[1, 1],[1, 1])  ,
 
)

!assert ( a(:,:, 1)   ) 

!assert ( a(1:2, 1)   ) 

!assert ( a(1, 1)  ,
 
)

!assert ( a(:, 1)   ) 

!assert ( a(:,:)   ) 

!assert ( a(1:2)   ) 

!assert ( a(:)   ) 

!assert ( all(a(:)==a_fvec)   ) 

!assert ( all(all(a(:,:)==a))   ) 

!assert ( isempty(a(:,[]))   ) 

!assert ( isempty(a([],:))   ) 

!assert ( isempty(a([]))   ) 

!assert ( isempty(a(logical(0),:))   ) 

!assert ( all(a(logical([0, 1, 1, 0]))==mid_a)   ) 

!assert ( all(a(:,:)==a)   ) 

!assert ( a(:, 3)  ,
 
)

!assert ( all(a(1,:)==a)   ) 

!assert ( all(a(:)==a_prime)   ) 

!assert ( a(2)  ,
 
)

!assert ( a(1)  ,
 
)

!assert ( isempty(a(logical(0)))   ) 

!assert ( a(:, 1)  ,
 
)

!assert ( a(1,:)  ,
 
)

!assert ( a(:,:)  ,
 
)

!assert ( a(:)  ,
 
)

!assert ( a(1)  ,
 
)

!assert ( isempty(a)   ) 

!b ( ,
,
 
)

!b ( ,
,
 
)

!test !c ( 1:10  ,
 
)

!c ( ,
,
,
 
)

!c ( ,
,
,
 
)

Type Constraints

!c ( ,
,
,
 
)

Type Constraints

!c ( ,
,
 
)

!test !c ( ,
,
 
)

!fail ( "a(:,0);"   ) 

!fail ( "a(0,1);"   ) 

!fail ( "a(5);"   ) 

!fail ( "a(0);"   ) 

!fail ( "a([-1;0]);"   ) 

!fail ( "a([-1,0]);"   ) 

!fail ( "a([0;1]);"   ) 

!fail ( "a([0,1]);"   ) 

!fail ( "a([1,2;3,4]);"   ) 

!fail ( "a([1;2;3]);"   ) 

!fail ( "a([1,2,3]);"   ) 

!fail ( "a(:,-1);"   ) 

!fail ( "a(-1,:);"   ) 

!fail ( "a(:,2);"   ) 

!fail ( "a(2,:);"   ) 

!fail ( "a(2);"   ) 

!fail ( "a(-1)"   ) 

!warning ( wfi.  state,
"Octave:fortran-indexing"   
)

!warning ( "off"  ,
"Octave:fortran-indexing"   
)

"query", "Octave:fortran-indexing" warning (  )  [virtual]

zeros ( ,
 
)

zeros ( ,
 
)


Variable Documentation

!test !a = []

!a_col_1 = [1

!a_col_2 = [2

!a_fvec = [1

!a_prime = [4

!a_row_1 = [1,2]

!a_row_2 = [3,4]

!assert(a(:,:, 1,[1, 1]), c)%!test%!c(

!b = a

!mid_a = [3,2]

!shared x !x = 1

Additional tests !shared a