Home
Products
Support
Blog
Resources
Company
NMath Matrix User's Guide
TOC |  Previous |  Next |  Index

Chapter 3. Using The Matrix Classes

NMath Matrix provides a variety of functions that take the structured sparse matrix types described in Chapter 2 as arguments. Methods are provided either as member functions on the matrix classes, or as static methods on class MatrixFunctions.

As a general rule, NMath Matrix only provides functions that preserve the shape of the structured sparse matrices. In some cases, this means that functions provided by NMath Core for the general matrix classes are not provided by NMath Matrix for the structured sparse matrix classes. For example, NMath Matrix does not generally provide trigonometric and transcendental functions for structured sparse matrix types. Such functions may change unstored zero values to non-zero values, thus changing a structured sparse matrix type into a general matrix.

If you want to apply an arbitrary function to all elements of a structured sparse matrix, including unstored zero values, you can always convert the matrix to a general matrix first. A ToGeneralMatrix() method is provided for this purpose. Alternatively, to apply an arbitrary function only to stored values, you can apply the function to the underlying data vector. Both techniques are described in more detail in Section 3.7.

This chapter describes how to create and manipulate the NMath Matrix structured sparse matrix types.

TOC |  Previous |  Next |  Index

Copyright © 2008 CenterSpace Software, LLC. All rights reserved.
All trademarks and registered trademarks mentioned on this web site are the property of their respective owners.
Contact Webmaster