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

3.5 Vector Views

In NMath Core, methods such as Row(), Column(), and Diagonal() return vector views of the data referenced by a general matrix. NMath Matrix does not generally provide such methods for structured sparse matrix types, because of the limitations on which elements in the matrix are modifiable.

The exception is the banded matrix types which provide a Diagonal() member function that returns a vector view of a diagonal of a matrix. If no diagonal is specified, a vector view of the main diagonal is returned. For example, this code increments every element along the main diagonal:

FloatBandMatrix A = new FloatBandMatrix( 5, 5, 0, 0 );
A.Diagonal()++;

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