Class Simplex

java.lang.Object
org.episteme.core.mathematics.topology.Simplex

public class Simplex extends Object
Represents a Simplex (a generalized triangle/tetrahedron).

Defined by a set of vertices. This implementation represents an Abstract Simplex where vertices are identified by natural numbers (non-negative integers).

*

Reference:
Dantzig, G. B. (1947). Minimization of a linear function of variables subject to linear inequalities. Activity Analysis of Production and Allocation, 13, 317-329.

Since:
1.0
Author:
Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
  • Constructor Details

    • Simplex

      public Simplex(int... verts)
      Creates a simplex from a list of vertex IDs.
      Parameters:
      verts - vertex IDs (non-negative)
    • Simplex

      public Simplex(Natural... verts)
      Creates a simplex from a list of Natural vertex IDs.
      Parameters:
      verts - vertex IDs as Natural numbers
    • Simplex

      public Simplex(Set<Natural> verts)
      Creates a simplex from a set of vertex IDs.
      Parameters:
      verts - set of vertex IDs
  • Method Details

    • dimension

      public int dimension()
      Returns the dimension of this simplex. dim = |vertices| - 1
      Returns:
      the dimension (0 for point, 1 for line, 2 for triangle, etc.)
    • faces

      public Set<Simplex> faces()
      Returns the set of faces of this simplex. A face is formed by removing one vertex.
      Returns:
      set of face simplices
    • getVertices

      public Set<Natural> getVertices()
      Returns the vertices of this simplex.
      Returns:
      unmodifiable view of vertices
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object