EleFits  4.0.0
A modern C++ API on top of CFitsIO

◆ moveTo()

template<typename T , long n = 2>
std::vector<std::decay_t<T> >& Euclid::Fits::VecRaster< T, n >::moveTo ( std::vector< std::decay_t< T >> &  destination)

Move the vector outside the raster.

This method is used to take ownership on the data without copying it. The raster shape is untouched. Example usage:

VecRaster<float> raster(...);
raster.moveTo(data);
// Values have been moved to data without copy.
// raster.vector() is empty now.
Warning
The raster data is not usable anymore after this call.
std::vector
STL class.
Euclid::Fits::Raster< T, 2 >::data
const T * data() const
Const pointer to the first data element.