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
- EL: The original unsorted edge list. This is a matrix where each row represents an edge with two vertices.
- indl: The index or list of indices to be removed from the edge list. This can be a single index or an array of indices.
Output
- ELN: The new unsorted edge list after the specified indices have been removed.
Algorithm Steps
- Iterate over each index in the
indl
list.
- For each index, find its occurrences in both columns of the edge list
EL
using the find
function.
- If the index is found more than once in either column, a warning is printed indicating that the index is not unique.
- If the index is not found in either column, an error is thrown indicating that the index is not part of the edge list.
- 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.
- The row containing the index is then removed from the edge list.
- 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