1function z = GB_spec_binop_positional (op, ia, ja, ib, jb)
2%GB_SPEC_BINOP_POSITIONAL compute a binary positional op
3
4% SuiteSparse:GraphBLAS, Timothy A. Davis, (c) 2017-2021, All Rights Reserved.
5% SPDX-License-Identifier: Apache-2.0
6
7switch (op)
8    case { 'firsti'   , '1sti'  }
9        z = ia - 1 ;
10    case { 'firsti1'  , '1sti1' }
11        z = ia ;
12    case { 'firstj'   , '1stj'  }
13        z = ja - 1 ;
14    case { 'firstj1'  , '1stj1' }
15        z = ja ;
16    case { 'secondi'  , '2ndi'  }
17        z = ib - 1 ;
18    case { 'secondi1' , '2ndi1' }
19        z = ib ;
20    case { 'secondj'  , '2ndj'  }
21        z = jb - 1 ;
22    case { 'secondj1' , '2ndj1' }
23        z = jb ;
24    otherwise
25        error ('unknown binary positional op') ;
26end
27
28z = int64 (z) ;
29
30