ELremove

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - EL/Edge Lists
Introduced first in SolidGeometry 4.2, Creation date: 2018-03-06, Last change: 2025-09-14

removes an index from an unsorted edge list

Description

throws an error if an index list element is not part of the edge list

See Also: ELsort

Example Illustration

 missing image of ELremove(EL,indl)

Syntax

ELN=ELremove(EL,indl)

Input Parameter

EL: original unsorted edge list
indl: index to be removed, or index list

Output Parameter

ELN: new unsorted edge list without the index

Examples

remove one index
EL=[1 3;3 2;100 1;2 100]
ELremove(EL,100)
ELremove(EL,[1 2])




Copyright 2018-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 remove specified indices from an unsorted edge list. It is part of the SolidGeometry library and was introduced in version 4.2. The function is called ELremove and it takes two input parameters:

Input Parameters

Output

Algorithm Steps

  1. Iterate over each index in the indl list.
  2. For each index, find its occurrences in both columns of the edge list EL using the find function.
  3. If the index is found more than once in either column, a warning is printed indicating that the index is not unique.
  4. If the index is not found in either column, an error is thrown indicating that the index is not part of the edge list.
  5. If the index is found, the algorithm updates the edge list by replacing the second column of the found row with the second column of the row where the index was found in the first column.
  6. The row containing the index is then removed from the edge list.
  7. After processing all indices, the modified edge list ELN is returned.

Example Usage

Consider an edge list EL = [1 3; 3 2; 100 1; 2 100]. To remove the index 100, the function call would be ELremove(EL, 100). To remove multiple indices, such as 1 and 2, the function call would be ELremove(EL, [1 2]).

Algorithm explaination created using ChatGPT on 2025-08-19 00:24. (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