MF_Rows_rotate MD_Rows_rotate ME_Rows_rotate
MCF_Rows_rotate MCD_Rows_rotate MCE_Rows_rotate
MI_Rows_rotateMBI_Rows_rotateMSI_Rows_rotateMLI_Rows_rotateMQI_Rows_rotate
MU_Rows_rotateMUB_Rows_rotateMUS_Rows_rotateMUL_Rows_rotateMUQ_Rows_rotate
Functionrotate all rows by a specified number of positions; thereby, whole columns are moved
Syntax C/C++#include <MFstd.h>
void MF_Rows_rotate( fMatrix MA, ui ht, ui len, int pos );
C++ MatObj#include <OptiVec.h>
void matrix<T>::Rows_rotate( const int pos );
Pascal/Delphiuses MFstd;
procedure MF_Rows_rotate( MA:fMatrix; ht, len:UIntSize; pos:Integer );
DescriptionMAi,j = MAi, len-pos+j,   j=0,..,pos-1
MAi,j = MAi, j-pos,      j=pos,...,len-1
MAi,j = MAi-pos, j,      i=pos,...,ht-1

This function is rather inefficient, as it needs to internally allocate and de-allocate work-space each time it is called. If your application contains frequent calls to this function, we recommend to allocate some matrix MBuf as buffer memory and replace the calls to MF_Rows_rotate by calls to MF_Rows_rotate_buf.

See alsoMF_Rows_reflect,   MF_Cols_rotate,   MF_Rows_rotate_buf,   chapter 7

MatrixLib Table of Contents  OptiVec home