Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

3.10 Picks

Vector and matrix picks allow arbitrary elements to be selected from a vector rather than just those patterns which can be selected by subscripting. A pick is created by calling member function pick(const RWIntVec&), where RWIntVec is a typedef for RWMathVec<int>. You can think of it as subscripting with an RWIntVec instead of an int:

Picks can also be used as lvalues:

Unlike the subscripting operators, vector picks are not built into the classes, but implemented using a helper class with no public constructors. The result is that, unlike subscripting, picking does not create a new view. Because they are implemented using a helper class and their indexing is done using RWMathVec<int>s, picks are less efficient than subscripting.


Previous fileTop of DocumentContentsIndexNext file

©Copyright 1999, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.