graphofEL

by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - EL/Edge Lists
Introduced first in SolidGeometry 4.0, Creation date: 2017-07-05, Last change: 2025-09-14

creates an undirected graph model from an edge list

Description

This is the first function to analyze surface models using graph theory.
It is extremely helpful to analyze the structures by this abstraction level.
MATLAB supports since 2015b
undirected "graphs" and
directed "digraphs"

See Also: , ELplot

Example Illustration

 missing image of graphofEL(EL,n)

Syntax

G=graphofEL(EL,[n])

Input Parameter

EL: Edge list; must have unique entries!
n: optional number of vertices

Output Parameter

G: MATLAB's Graph struct using Edges and Nodes

Examples


EL=featureEdges(TR3ofSG(SGsample(25)),1)
graphofEL(EL)
graphofEL(featureEdges(TR3ofSG(SGsample(3)),1))




Copyright 2017-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 MATLAB function, graphofEL, creates an undirected graph model from an edge list. It is designed to analyze surface models using graph theory, which is useful for understanding structures at an abstract level. The function is part of the SolidGeometry library and was introduced in version 4.0.

Input Parameters

Output Results

Algorithm Steps

  1. Check if the optional parameter n is provided. If it is, assign it to the variable n.
  2. Ensure that the edge list EL contains unique rows by using the unique function.
  3. If the optional parameter n is provided, create a directed graph using the digraph function with the specified number of vertices. Otherwise, create a directed graph without specifying the number of vertices.
  4. If no output is requested (i.e., nargout==0), call the SGfigure function to create a new figure and use the ELplot function to plot the edge list.

Example Usage

To use the function, you can call it with an edge list obtained from the featureEdges function:

EL = featureEdges(TR3ofSG(SGsample(25)), 1);
graphofEL(EL);
graphofEL(featureEdges(TR3ofSG(SGsample(3)), 1));

This example demonstrates how to create a graph from an edge list derived from a sample surface model.

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