Using the C++ Math Library    

Operators

In addition to the indexing operators, there are three additional operators in the mwArray interface. The first two operators, << and >>, are used for stream input and output. Technically, these stream operators are not member functions; they are friend functions:

Note that the >> and << operator functions do not read and write MAT-files.

The stream operators call Read() and Write(), mwArray public member functions.

The third operator is =, the assignment operator. C++ requires that the assignment operator be a member function. Like the copy constructor (see Constructors), the assignment operator does not actually make a copy of the input array, but rather references (keeps a pointer to) the input array's data; this is an optimization made purely for efficiency, and has no effect on the semantics of assignment. If you write A = B and then modify B, the values in A will remain unchanged:


 Memory Management Array Size