XLL+ Class Library

imtx_impl<T>::get_flat

Gets a pointer to a "flattened", continuous array containing all the members of the matrix

[C++]
virtual bool get_flat(
   const T*& data
) const;
virtual bool get_flat(
   T*& data
);

Parameters

data

Buffer for a pointer to an array of items.

data

Buffer for a pointer to an array of items.

Return value

Returns true if the operation is supported, false if it is not.

Remarks

This method should set data to the start of an array of T containing all the members of the matrix. The number of vectors should be the same as the value returned by size(0) * size(1), i.e. the total size of the matrix.

The data should be arranged with the inner dimension continuous, i.e. a 2 x 2 matrix would arranged as: at(0,0), at(0,1), at(1,0), at(1,1).

If the storage method used by the implementation class does not support this form of operation without rearrangement of data, then the method should return false.

The default implementation returns false, to signify that the operation is not supported.

Requirements

Header: plemtx.h

See Also

imtx_impl<T> Class | imtx_impl<T> Methods