Syntax
XFL=sortFL(XFL)
Input Parameter
Output Parameter
Copyright 2012-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Algorithm (Workflow)
This algorithm is designed to sort and circularly shift a facet list, ensuring that the first index of each facet list column is always the smallest. The process involves checking conditions and rearranging the rows accordingly.
Input Parameters
- XFL: A matrix representing the facet list, where each row corresponds to a facet defined by three indices.
Output Results
- XFL: The sorted and circularly shifted facet list.
Algorithm Steps
- Initialize three logical arrays,
a
, b
, and c
, to determine the smallest index in each row of XFL
:
a
: True if the first index is the smallest.
b
: True if the second index is the smallest.
c
: True if the third index is the smallest.
- Rearrange the rows of
XFL
based on the conditions:
- Rows where
a
is true remain in the order [1 2 3].
- Rows where
b
is true are circularly shifted to [2 3 1].
- Rows where
c
is true are circularly shifted to [3 1 2].
- Concatenate the rearranged rows to form the new
XFL
.
- Sort the rows of
XFL
using sortrows
to ensure the entire list is ordered.
Algorithm explaination created using ChatGPT on 2025-08-18 23:59. (Please note: No guarantee for the correctness of this explanation)
Last html export of this page out of FM database by TL: 2025-09-21