maprows

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 1.0, Creation date: 2013-01-16, Last change: 2025-09-14

returns index mapping list for two rows list (error free since 2017-04-24)

Description

indexa = a(indexb)
indexb = b(indexa)
If there is a vertex list LB and a facet list flb, then the same facet list for different sorted vertex list LA of the same vertices would be: lfa = a(flb).
The procedure uses unique two times, so it makes sense only, if there is no idea on the mapping. ATTENTION: WORKS ONLY IF THERE ARE NO DOUBLE ENTRIES

See Also: maprows , reversesortindex , VLFLreorder , VLcorrelate

Example Illustration

 missing image of maprows(VLA,VLB)

Syntax

[a,b]=maprows(VLA,VLB)

Input Parameter

VLA: List A
VLB: List B

Output Parameter

a: used to transform index list based on A indices
b: used to transform index list based on B indices

Examples

Find the original order for an unsorted list
AL=ELofn(10); BL=ELunsort(AL); [ai,bi]=maprows(AL,BL); [AL BL ai bi]
[ BL(ai,:), AL(bi,:)]




Copyright 2013-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

Last html export of this page out of FM database by TL: 2025-09-21