MF_Cols_rotate MD_Cols_rotate ME_Cols_rotate
MCF_Cols_rotate MCD_Cols_rotate MCE_Cols_rotate
MI_Cols_rotateMBI_Cols_rotateMSI_Cols_rotateMLI_Cols_rotateMQI_Cols_rotate
MU_Cols_rotateMUB_Cols_rotateMUS_Cols_rotateMUL_Cols_rotateMUQ_Cols_rotate
Functionrotate all columns by a specified number of positions; thereby, whole rows are moved
Syntax C/C++#include <MFstd.h>
void MF_Cols_rotate( fMatrix MA, ui ht, ui len, int pos );
C++ MatObj#include <OptiVec.h>
void matrix<T>::Cols_rotate( const int pos );
Pascal/Delphiuses MFstd;
procedure MF_Cols_rotate( MA:fMatrix; ht, len:UIntSize; pos:Integer );
DescriptionMAi,j = MAht-pos+i, j,   i=0,..,pos-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_Cols_rotate by calls to MF_Cols_rotate_buf.

See alsoMF_Cols_reflect,   MF_Rows_rotate,   chapter 7

MatrixLib Table of Contents  OptiVec home