2 indices - indices for specified matrix or association element
8 V matrix or association
11 return list with up to 4 elements
14 For 0 <= index < size(V), indices(V, index) returns list(i_0, i_1, ...)
15 for which V[i_0, i_1, ...] is the same lvalue as V[[index]].
17 For other values of index, a null value is returned.
19 This function can be useful for determining those elements for which
20 the indices satisfy some condition. This is particularly so for
21 associations since these have no simple relation between the
22 double-bracket index and the single-bracket indices, which may be
23 non-integer numbers or strings or other types of value. The
24 information provided by indices() is often required after the use
25 of search() or rsearch() which, when successful, return the
26 double-bracket index of the item found.
32 list (3 elements, 2 nonzero):
39 > A["cat", "dog"] = "fight";
40 > A[2,3,5,7] = "primes";
43 > indices(A, search(A, "primes"))
44 list (4 elements, 4 nonzero):
54 LIST* associndices(ASSOC *ap, long index)
55 LIST* matindices(MATRIX *mp, long index)