Go to the documentation of this file.
42 int main(
int argc,
char *argv[])
49 for (
label i = 0; i < 8; ++i)
51 Info<<
"Rotate forward by " << i <<
" : "
55 for (
label i = 0; i < 8; ++i)
57 Info<<
"Rotate backward by " << i <<
" : "
63 inplaceRotateList<List, label>(testFace, -6);
64 Info<<
"Rotate inplace by -6 : " << testFace <<
nl <<
endl;
66 Info<<
"Test inplace rotate : " << forwardRotate <<
endl;
68 Info<<
"Rotate to the right by 2 : " << forwardRotate <<
endl;
70 Info<<
"Rotate to the left by 2 : " << forwardRotate <<
endl;
75 Info<<
"Test inplace rotate on sublist : " << subRotate <<
endl;
77 Info<<
"Rotate to the right by 3 : " << subRotate <<
endl;
79 Info<<
"Rotate to the left by 3 : " << subRotate <<
endl;
91 Info<<
"Inplace Reverse : " << test1 <<
nl <<
endl;
96 Info<<
"Inplace Reverse : " << test2 <<
nl <<
endl;
101 Info<<
"Inplace Reverse : " << test3 <<
nl <<
endl;
104 Info<<
"FixedList : " << test4 <<
endl;
106 Info<<
"Inplace Reverse : " << test4 <<
nl <<
endl;
112 Info<<
"Reverse Sublist between 3 and 6 : " << test5 <<
endl;
ListType reverseList(const ListType &list)
Reverse a list. First element becomes last element etc.
A List obtained as a section of another List.
void inplaceRotateList(ListType< DataType > &list, label n)
Inplace reversal of a list using the Reversal Block Swapping algorithm.
Ostream & endl(Ostream &os)
Add newline and flush stream.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
labelList identity(const label len)
Create identity map (map[i] == i) of given length.
ListType rotateList(const ListType &list, const label n)
Rotate a list by n places. If n is positive rotate clockwise/right/down.
void inplaceReverseList(ListType &list)
Inplace reversal of a list using Swap.
A face is a list of labels corresponding to mesh vertices.
Various functions to operate on Lists.
int main(int argc, char *argv[])