EdgeSetTopologyModifier
The EdgeSetTopologyModifier component is part of the SofaFramework and is designed to modify the topology of an edge set in simulation environments, particularly useful for applications involving graph-like structures or simple line segments. **Primary Functions:** - **Adding Edges:** The component can add edges to the existing topology. It supports adding with or without specifying ancestors and barycentric coordinates which define how new vertices are positioned relative to existing ones. - **Removing Edges:** Allows for the removal of specific edges from the set, with an option to also remove isolated points (vertices) that become disconnected as a result. - **Swapping Edges:** Replaces pairs of edges with newly formed edge pairs based on their endpoints. - **Fusing Edges:** Merges pairs of edges into single edges by connecting the endpoints of each pair. - **Splitting Edges:** Divides selected edges into two new edges by inserting a new vertex at a specified barycentric position along the original edge. This can be done with or without specifying custom positions for these split points through barycentric coefficients. - **Resorting Vertices:** Utilizes the Reverse Cuthill-McKee algorithm (via Boost Graph Library) to reorder vertices in an optimal way, which can help improve the efficiency of numerical algorithms used in simulations. - **Removing Connected Components:** Based on a given edge's ID, it can remove either all connected components including that edge or just the directly connected elements. It also offers functionality for removing smaller isolated components based on size thresholds, leaving only the largest component intact. **Important Methods and Their Usage:** - `addEdgesProcess`, `removeEdgesProcess` are protected methods which actually perform the addition/removal of edges. - `swapEdges`, `fuseEdges`, and `splitEdges` are public methods that users can call to alter the topology as needed. - The `movePointsProcess` method allows for relocating vertices based on specified ancestors and barycentric coefficients, propagating events and updating edge connectivity information accordingly. **Integration and Propagation:** This component works closely with other parts of the Sofa framework by notifying and updating relevant structures (mechanical objects, data handlers) when changes to topology occur through propagation of topological change events via its `propagateTopologicalEngineChanges` method. This ensures consistency across different components that might depend on this edge set's structure. **Use Cases:** This component is particularly useful in simulations where dynamic modification of graph structures or line segment configurations are required, such as in the modeling and simulation of networks, trusses, simple wireframe models, or any scenario involving edges between points.
- abstract
- The EdgeSetTopologyModifier modifies edge sets in simulations by adding, removing, swapping, fusing, splitting edges, and reordering vertices to improve computational efficiency.
- sheet
- # EdgeSetTopologyModifier ## Overview The EdgeSetTopologyModifier is a topology modifier that operates on edge sets within the SOFA simulation framework. It inherits from `PointSetTopologyModifier` and provides methods for dynamic modification of graph structures by adding, removing, swapping, fusing, splitting edges, and reordering vertices using the Reverse Cuthill-McKee algorithm. ## Mathematical Model The EdgeSetTopologyModifier performs operations on edge sets within a graph $G = (V,E)$ where $V$ is the set of vertices and $E$ is the set of edges. The primary operations are: - **Adding Edges:** $$ E \gets E \cup \{\{v_i, v_j\}\} $$ - **Removing Edges:** $$ E \gets E - \{\{v_i, v_j\}\} $$ - **Swapping Edges:** $$ E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_3\}, \{v_2, v_4\}\} $$ - **Fusing Edges:** $$ E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_4\}\} $$ - **Splitting Edges:** $$ E \gets (E - \{\{v_i, v_j\}\}) \cup \{\{v_i, v_k\}, \{v_k, v_j\}\} $$ These operations enable dynamic modification of graph structures within simulations.
- description
- The EdgeSetTopologyModifier component is part of the SofaFramework and is designed to modify the topology of an edge set in simulation environments, particularly useful for applications involving graph-like structures or simple line segments. **Primary Functions:** - **Adding Edges:** The component can add edges to the existing topology. It supports adding with or without specifying ancestors and barycentric coordinates which define how new vertices are positioned relative to existing ones. - **Removing Edges:** Allows for the removal of specific edges from the set, with an option to also remove isolated points (vertices) that become disconnected as a result. - **Swapping Edges:** Replaces pairs of edges with newly formed edge pairs based on their endpoints. - **Fusing Edges:** Merges pairs of edges into single edges by connecting the endpoints of each pair. - **Splitting Edges:** Divides selected edges into two new edges by inserting a new vertex at a specified barycentric position along the original edge. This can be done with or without specifying custom positions for these split points through barycentric coefficients. - **Resorting Vertices:** Utilizes the Reverse Cuthill-McKee algorithm (via Boost Graph Library) to reorder vertices in an optimal way, which can help improve the efficiency of numerical algorithms used in simulations. - **Removing Connected Components:** Based on a given edge's ID, it can remove either all connected components including that edge or just the directly connected elements. It also offers functionality for removing smaller isolated components based on size thresholds, leaving only the largest component intact. **Important Methods and Their Usage:** - `addEdgesProcess`, `removeEdgesProcess` are protected methods which actually perform the addition/removal of edges. - `swapEdges`, `fuseEdges`, and `splitEdges` are public methods that users can call to alter the topology as needed. - The `movePointsProcess` method allows for relocating vertices based on specified ancestors and barycentric coefficients, propagating events and updating edge connectivity information accordingly. **Integration and Propagation:** This component works closely with other parts of the Sofa framework by notifying and updating relevant structures (mechanical objects, data handlers) when changes to topology occur through propagation of topological change events via its `propagateTopologicalEngineChanges` method. This ensures consistency across different components that might depend on this edge set's structure. **Use Cases:** This component is particularly useful in simulations where dynamic modification of graph structures or line segment configurations are required, such as in the modeling and simulation of networks, trusses, simple wireframe models, or any scenario involving edges between points.
- properties
-
{} - methods
-
- events
-
- maths
- The EdgeSetTopologyModifier component in the SofaFramework is designed to manipulate the topology of an edge set within a simulation environment. The primary operations include adding, removing, swapping, fusing, and splitting edges. These manipulations are crucial for maintaining dynamic structures such as networks or trusses that can change during a simulation. Below is a detailed mathematical and physical description of each operation provided by this component. ### Adding Edges **Operation:** Adding edges to an existing topology involves connecting two vertices (points) with a new edge. Mathematically, if we have a graph $G = (V,E)$ where $V$ is the set of vertices and $E$ is the set of edges, adding an edge between vertices $v_i$ and $v_j$ can be represented as: $$ E \gets E \cup \{\{v_i, v_j\}\} $$ **Physical Interpretation:** In physical simulations, this operation might represent adding a new connection or link in a network structure. For example, it could model the addition of a cable or a rod connecting two points in a mechanical system. ### Removing Edges **Operation:** Removing an edge from the graph involves deleting a pair $\{v_i, v_j\}$ from $E$: $$ E \gets E - \{\{v_i, v_j\}\} $$ **Physical Interpretation:** Physically, this operation can be interpreted as breaking or disconnecting an existing link in the system. For instance, it could model the removal of a cable from a truss structure. ### Swapping Edges **Operation:** Edge swapping involves replacing two edges $\{v_1, v_2\}$ and $\{v_3, v_4\}$ with new edges $\{v_1, v_3\}$ and $\{v_2, v_4\}$. This can be mathematically expressed as: $$ E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_3\}, \{v_2, v_4\}\} $$ **Physical Interpretation:** In physical simulations, edge swapping might represent reconfiguring connections in a network. For example, it could model the rearrangement of cables or rods to form new structural configurations. ### Fusing Edges **Operation:** Edge fusion involves merging two edges into one by connecting their endpoints. Mathematically, if we have edges $\{v_1, v_2\}$ and $\{v_3, v_4\}$ with $v_2 = v_3$, the fused edge can be represented as: $$ E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_4\}\} $$ **Physical Interpretation:** Physically, this operation can be seen as joining two separate connections into one. For example, it could model the merging of two cables or rods to form a single structural component. ### Splitting Edges **Operation:** Edge splitting involves dividing an existing edge $\{v_i, v_j\}$ into two new edges by inserting a new vertex $v_k$ between them. Mathematically: $$ E \gets (E - \{\{v_i, v_j\}\}) \cup \{\{v_i, v_k\}, \{v_k, v_j\}\} $$ **Physical Interpretation:** Physically, splitting an edge might represent adding a new point of connection or division along an existing structure. For example, it could model the insertion of a joint or additional support along an existing cable or rod. ### Reordering Vertices (Reverse Cuthill-McKee Algorithm) **Operation:** The Reverse Cuthill-McKee algorithm is used to reorder vertices in a way that minimizes the bandwidth of adjacency matrices. This can be crucial for improving computational efficiency, especially when solving systems of linear equations related to the graph structure. **Physical Interpretation:** In physical simulations, reordering vertices can improve numerical stability and reduce computational costs by optimizing how data is accessed during iterative solvers or other algorithms that rely on the connectivity matrix. ### Removing Connected Components **Operation:** The component provides functionality to remove connected components based on certain criteria. For example, removing all connected components including a specified edge or just directly connected elements, or removing smaller isolated components below a size threshold. **Physical Interpretation:** Physically, this operation can be used to model the removal of substructures that are no longer relevant in the simulation context. This might include breaking off parts of a larger structure that have become disconnected due to some physical process (e.g., a truss collapsing partially). ### Mathematical Summary - **Addition:** $E \gets E \cup \{\{v_i, v_j\}\} $ - **Removal:** $E \gets E - \{\{v_i, v_j\}\} $ - **Swapping:** $E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_3\}, \{v_2, v_4\}\} $ - **Fusing:** $E \gets (E - \{\{v_1, v_2\}, \{v_3, v_4\}\}) \cup \{\{v_1, v_4\}\} $ - **Splitting:** $E \gets (E - \{\{v_i, v_j\}\}) \cup \{\{v_i, v_k\}, \{v_k, v_j\}\}$ This component enables dynamic modification of graph structures within simulations, allowing for flexible and adaptable models that can evolve over time.
{
"name": "EdgeSetTopologyModifier",
"main": {
"name": "EdgeSetTopologyModifier",
"namespace": "sofa::component::topology::container::dynamic",
"module": "Sofa.Component.Topology.Container.Dynamic",
"include": "sofa/component/topology/container/dynamic/EdgeSetTopologyModifier.h",
"doc": "Topology modifier dedicated to an edge topology.\n\nA class that can apply basic transformations on a set of edges.",
"inherits": [
"PointSetTopologyModifier"
],
"templates": [],
"data_fields": [],
"links": [],
"methods": [
{
"name": "init",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addEdges",
"return_type": "void",
"params": [
{
"name": "edges",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addEdges",
"return_type": "void",
"params": [
{
"name": "edges",
"type": "const int &"
},
{
"name": "ancestors",
"type": "const int &"
},
{
"name": "baryCoefs",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addEdges",
"return_type": "void",
"params": [
{
"name": "edges",
"type": "const int &"
},
{
"name": "ancestorElems",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addEdgeProcess",
"return_type": "void",
"params": [
{
"name": "e",
"type": "Edge"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "swapEdgesProcess",
"return_type": "void",
"params": [
{
"name": "edgesPairs",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "fuseEdgesProcess",
"return_type": "void",
"params": [
{
"name": "edgesPairs",
"type": "const int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "splitEdgesProcess",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "splitEdgesProcess",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "int &"
},
{
"name": "baryCoefs",
"type": "const int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeEdges",
"return_type": "void",
"params": [
{
"name": "edgeIds",
"type": "const int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeItems",
"return_type": "void",
"params": [
{
"name": "items",
"type": "const int &"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "swapEdges",
"return_type": "void",
"params": [
{
"name": "edgesPairs",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "fuseEdges",
"return_type": "void",
"params": [
{
"name": "edgesPairs",
"type": "const int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "splitEdges",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "splitEdges",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "int &"
},
{
"name": "baryCoefs",
"type": "const int &"
},
{
"name": "removeIsolatedPoints",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "resortCuthillMckee",
"return_type": "void",
"params": [
{
"name": "inverse_permutation",
"type": "int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeConnectedComponents",
"return_type": "bool",
"params": [
{
"name": "elemID",
"type": "EdgeID"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeConnectedElements",
"return_type": "bool",
"params": [
{
"name": "elemID",
"type": "EdgeID"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeIsolatedElements",
"return_type": "bool",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "removeIsolatedElements",
"return_type": "bool",
"params": [
{
"name": "scaleElem",
"type": "int"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "public"
},
{
"name": "addEdgesWarning",
"return_type": "void",
"params": [
{
"name": "nEdges",
"type": "const int"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "addEdgesWarning",
"return_type": "void",
"params": [
{
"name": "nEdges",
"type": "const int"
},
{
"name": "edgesList",
"type": "const int &"
},
{
"name": "edgesIndexList",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "addEdgesWarning",
"return_type": "void",
"params": [
{
"name": "nEdges",
"type": "const int"
},
{
"name": "edgesList",
"type": "const int &"
},
{
"name": "edgesIndexList",
"type": "const int &"
},
{
"name": "ancestors",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "addEdgesWarning",
"return_type": "void",
"params": [
{
"name": "nEdges",
"type": "const int"
},
{
"name": "edgesList",
"type": "const int &"
},
{
"name": "edgesIndexList",
"type": "const int &"
},
{
"name": "ancestors",
"type": "const int &"
},
{
"name": "baryCoefs",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "addEdgesProcess",
"return_type": "void",
"params": [
{
"name": "edges",
"type": "const int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "removeEdgesWarning",
"return_type": "void",
"params": [
{
"name": "edges",
"type": "int &"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "removeEdgesProcess",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "const int &"
},
{
"name": "removeIsolatedItems",
"type": "const bool"
}
],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "addPointsProcess",
"return_type": "void",
"params": [
{
"name": "nPoints",
"type": "const int"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "removePointsProcess",
"return_type": "void",
"params": [
{
"name": "indices",
"type": "const int &"
},
{
"name": "removeDOF",
"type": "const bool"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "movePointsProcess",
"return_type": "void",
"params": [
{
"name": "id",
"type": "const int &"
},
{
"name": "ancestors",
"type": "const int &"
},
{
"name": "coefs",
"type": "const int &"
},
{
"name": "moveDOF",
"type": "const bool"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "renumberPointsProcess",
"return_type": "void",
"params": [
{
"name": "index",
"type": "const int &"
},
{
"name": "",
"type": "const int &"
},
{
"name": "renumberDOF",
"type": "const bool"
}
],
"is_virtual": false,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
},
{
"name": "propagateTopologicalEngineChanges",
"return_type": "void",
"params": [],
"is_virtual": true,
"is_pure_virtual": false,
"is_static": false,
"access": "protected"
}
]
},
"desc": {
"description": "The EdgeSetTopologyModifier component is part of the SofaFramework and is designed to modify the topology of an edge set in simulation environments, particularly useful for applications involving graph-like structures or simple line segments.\n\n**Primary Functions:**\n- **Adding Edges:** The component can add edges to the existing topology. It supports adding with or without specifying ancestors and barycentric coordinates which define how new vertices are positioned relative to existing ones.\n- **Removing Edges:** Allows for the removal of specific edges from the set, with an option to also remove isolated points (vertices) that become disconnected as a result.\n- **Swapping Edges:** Replaces pairs of edges with newly formed edge pairs based on their endpoints.\n- **Fusing Edges:** Merges pairs of edges into single edges by connecting the endpoints of each pair.\n- **Splitting Edges:** Divides selected edges into two new edges by inserting a new vertex at a specified barycentric position along the original edge. This can be done with or without specifying custom positions for these split points through barycentric coefficients.\n- **Resorting Vertices:** Utilizes the Reverse Cuthill-McKee algorithm (via Boost Graph Library) to reorder vertices in an optimal way, which can help improve the efficiency of numerical algorithms used in simulations.\n- **Removing Connected Components:** Based on a given edge's ID, it can remove either all connected components including that edge or just the directly connected elements. It also offers functionality for removing smaller isolated components based on size thresholds, leaving only the largest component intact.\n\n**Important Methods and Their Usage:**\n- `addEdgesProcess`, `removeEdgesProcess` are protected methods which actually perform the addition/removal of edges.\n- `swapEdges`, `fuseEdges`, and `splitEdges` are public methods that users can call to alter the topology as needed.\n- The `movePointsProcess` method allows for relocating vertices based on specified ancestors and barycentric coefficients, propagating events and updating edge connectivity information accordingly.\n\n**Integration and Propagation:**\nThis component works closely with other parts of the Sofa framework by notifying and updating relevant structures (mechanical objects, data handlers) when changes to topology occur through propagation of topological change events via its `propagateTopologicalEngineChanges` method. This ensures consistency across different components that might depend on this edge set's structure.\n\n**Use Cases:**\nThis component is particularly useful in simulations where dynamic modification of graph structures or line segment configurations are required, such as in the modeling and simulation of networks, trusses, simple wireframe models, or any scenario involving edges between points.\n",
"properties": {},
"methods": [],
"events": []
},
"maths": {
"maths": "The EdgeSetTopologyModifier component in the SofaFramework is designed to manipulate the topology of an edge set within a simulation environment. The primary operations include adding, removing, swapping, fusing, and splitting edges. These manipulations are crucial for maintaining dynamic structures such as networks or trusses that can change during a simulation. Below is a detailed mathematical and physical description of each operation provided by this component.\n\n### Adding Edges\n**Operation:** Adding edges to an existing topology involves connecting two vertices (points) with a new edge. Mathematically, if we have a graph $G = (V,E)$ where $V$ is the set of vertices and $E$ is the set of edges, adding an edge between vertices $v_i$ and $v_j$ can be represented as:\n\n$$ E \\gets E \\cup \\{\\{v_i, v_j\\}\\} $$\n\n**Physical Interpretation:** In physical simulations, this operation might represent adding a new connection or link in a network structure. For example, it could model the addition of a cable or a rod connecting two points in a mechanical system.\n\n### Removing Edges\n**Operation:** Removing an edge from the graph involves deleting a pair $\\{v_i, v_j\\}$ from $E$:\n\n$$ E \\gets E - \\{\\{v_i, v_j\\}\\} $$\n\n**Physical Interpretation:** Physically, this operation can be interpreted as breaking or disconnecting an existing link in the system. For instance, it could model the removal of a cable from a truss structure.\n\n### Swapping Edges\n**Operation:** Edge swapping involves replacing two edges $\\{v_1, v_2\\}$ and $\\{v_3, v_4\\}$ with new edges $\\{v_1, v_3\\}$ and $\\{v_2, v_4\\}$. This can be mathematically expressed as:\n\n$$ E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_3\\}, \\{v_2, v_4\\}\\} $$\n\n**Physical Interpretation:** In physical simulations, edge swapping might represent reconfiguring connections in a network. For example, it could model the rearrangement of cables or rods to form new structural configurations.\n\n### Fusing Edges\n**Operation:** Edge fusion involves merging two edges into one by connecting their endpoints. Mathematically, if we have edges $\\{v_1, v_2\\}$ and $\\{v_3, v_4\\}$ with $v_2 = v_3$, the fused edge can be represented as:\n\n$$ E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_4\\}\\} $$\n\n**Physical Interpretation:** Physically, this operation can be seen as joining two separate connections into one. For example, it could model the merging of two cables or rods to form a single structural component.\n\n### Splitting Edges\n**Operation:** Edge splitting involves dividing an existing edge $\\{v_i, v_j\\}$ into two new edges by inserting a new vertex $v_k$ between them. Mathematically:\n\n$$ E \\gets (E - \\{\\{v_i, v_j\\}\\}) \\cup \\{\\{v_i, v_k\\}, \\{v_k, v_j\\}\\} $$\n\n**Physical Interpretation:** Physically, splitting an edge might represent adding a new point of connection or division along an existing structure. For example, it could model the insertion of a joint or additional support along an existing cable or rod.\n\n### Reordering Vertices (Reverse Cuthill-McKee Algorithm)\n**Operation:** The Reverse Cuthill-McKee algorithm is used to reorder vertices in a way that minimizes the bandwidth of adjacency matrices. This can be crucial for improving computational efficiency, especially when solving systems of linear equations related to the graph structure.\n\n**Physical Interpretation:** In physical simulations, reordering vertices can improve numerical stability and reduce computational costs by optimizing how data is accessed during iterative solvers or other algorithms that rely on the connectivity matrix.\n\n### Removing Connected Components\n**Operation:** The component provides functionality to remove connected components based on certain criteria. For example, removing all connected components including a specified edge or just directly connected elements, or removing smaller isolated components below a size threshold.\n\n**Physical Interpretation:** Physically, this operation can be used to model the removal of substructures that are no longer relevant in the simulation context. This might include breaking off parts of a larger structure that have become disconnected due to some physical process (e.g., a truss collapsing partially).\n\n### Mathematical Summary\n- **Addition:** $E \\gets E \\cup \\{\\{v_i, v_j\\}\\} $\n- **Removal:** $E \\gets E - \\{\\{v_i, v_j\\}\\} $\n- **Swapping:** $E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_3\\}, \\{v_2, v_4\\}\\} $\n- **Fusing:** $E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_4\\}\\} $\n- **Splitting:** $E \\gets (E - \\{\\{v_i, v_j\\}\\}) \\cup \\{\\{v_i, v_k\\}, \\{v_k, v_j\\}\\}$\n\nThis component enables dynamic modification of graph structures within simulations, allowing for flexible and adaptable models that can evolve over time."
},
"summary": {
"abstract": "The EdgeSetTopologyModifier modifies edge sets in simulations by adding, removing, swapping, fusing, splitting edges, and reordering vertices to improve computational efficiency.",
"sheet": "# EdgeSetTopologyModifier\n\n## Overview\nThe EdgeSetTopologyModifier is a topology modifier that operates on edge sets within the SOFA simulation framework. It inherits from `PointSetTopologyModifier` and provides methods for dynamic modification of graph structures by adding, removing, swapping, fusing, splitting edges, and reordering vertices using the Reverse Cuthill-McKee algorithm.\n\n## Mathematical Model\nThe EdgeSetTopologyModifier performs operations on edge sets within a graph $G = (V,E)$ where $V$ is the set of vertices and $E$ is the set of edges. The primary operations are:\n- **Adding Edges:**\n $$ E \\gets E \\cup \\{\\{v_i, v_j\\}\\} $$\n- **Removing Edges:**\n $$ E \\gets E - \\{\\{v_i, v_j\\}\\} $$\n- **Swapping Edges:**\n $$ E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_3\\}, \\{v_2, v_4\\}\\} $$\n- **Fusing Edges:**\n $$ E \\gets (E - \\{\\{v_1, v_2\\}, \\{v_3, v_4\\}\\}) \\cup \\{\\{v_1, v_4\\}\\} $$\n- **Splitting Edges:**\n $$ E \\gets (E - \\{\\{v_i, v_j\\}\\}) \\cup \\{\\{v_i, v_k\\}, \\{v_k, v_j\\}\\} $$\n\nThese operations enable dynamic modification of graph structures within simulations."
}
}