Rogue Wave banner
Previous fileTop of DocumentContentsIndex pageNext file
Essential Math Module User's Guide
Rogue Wave web site:  Home Page  |  Main Documentation Page

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 DocumentContentsNo linkNext file

Copyright © Rogue Wave Software, Inc. All Rights Reserved.

The Rogue Wave name and logo, and SourcePro, are registered trademarks of Rogue Wave Software. All other trademarks are the property of their respective owners.
Provide feedback to Rogue Wave about its documentation.