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.11 Arrays of Signed and Unsigned Chars

Manipulation ofarrays of bytes (signed or unsigned chars) is provided by the classes RWMathVec<T>, RWGenMat<T>, and RWMathArray<T>. Two typedefs are used:

For applications requiring only small integers, these classes may be used for high efficiency and compactness. They are also very useful for storing and manipulating graphical images and 8-bit data streams from A/D converters, digitizers, and so on. This makes it easy to take a 2-dimensional Fourier transform of a graphical image, for example:

Notice that we use the integer representations of the elements for input/output of vectors of signed or unsigned chars, not the literal character constants. This can differ from the behavior of your compiler when a single element is printed on an output stream. For example, the code:

prints $with most compilers. However, the code:

always prints 36 36 36 with the Essential Math Module. This is because the vector classes are primarily a tool for manipulating numbers, not strings. The Essential Tools Module class RWCString should be used for manipulating strings.



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.