Class EdgeMap

java.lang.Object
java.util.AbstractMap<K,​V>
java.util.HashMap<Integer,​HashSet<Integer>>
eu.iv4xr.framework.spatial.meshes.EdgeMap
All Implemented Interfaces:
Serializable, Cloneable, Map<Integer,​HashSet<Integer>>

public class EdgeMap extends HashMap<Integer,​HashSet<Integer>>
An "EdgeMap" is actually a simple representation of a graph, which consists of a set of vertices, identified by their integer-id, and edges between these vertices. The edges are undirected. The graph is implemented as a subclass of HashMap. The method vertices() gives the set of all vertices stored in this data structure. The method neighbors(i) returns the set of all neighbors of i; these are vertices that are directly connected to i.
Author:
Naraenda
See Also:
Serialized Form
  • Constructor Details

    • EdgeMap

      public EdgeMap()
  • Method Details

    • put

      public void put(Edge edge)
      Add the two vertices of an edge, along with its connectivity.
    • remove

      public void remove(Edge edge)
      Remove an edge from this data structure.
    • vertices

      public Set<Integer> vertices()
    • neighbours

      public HashSet<Integer> neighbours(int i)