NMath User's Guide

TOC | Previous | Next | Index

Chapter 4. Viewing Data (.NET, C#, CSharp, VB, Visual Basic, F#)

NMath employs the data-view design pattern by distinguishing between data, and the different ways mathematical objects such as vectors and matrices view the data. For example, a contiguous array of numbers in memory might be viewed by one object as the elements of a vector, while another object might view the same data as the elements of a matrix, laid out row by row. At any given point in time, many different objects might share a given block of data. The data-view pattern has definite advantages for both storage efficiency and performance.

Combined with slicing, the data-view pattern also offers a very rich set of matrix and vector manipulation semantics.