Interface Set<E>
- All Known Subinterfaces:
AbelianGroup<E>, AbelianMonoid<E>, Algebra<E,F>, BanachAlgebra<E, F>, BanachSpace<E, S>, CStarAlgebra<E, F>, DivisionRing<E>, Field<E>, FiniteGroup<E>, FiniteSet<E>, GradedAlgebra<E, F>, Group<E>, HilbertSpace<E, S>, InfiniteSet<E>, KleeneAlgebra<E>, Lattice<E>, LieAlgebra<E, S>, Loop<E>, Magma<E>, Matrix<E>, MetricSpace<T>, Module<M, R>, Monoid<E>, NonAssociativeAlgebra<E, S>, OrderedGroup<E>, Quasigroup<E>, Ring<E>, SemiLattice<E>, Semiring<E>, SpacetimeMetric, TopologicalSpace<T>, Vector<E>, VectorSpace<V, F>
- All Known Implementing Classes:
Boolean, BooleanAlgebra, Booleans, CliffordAlgebra, Complex, Complexes, CyclicGroup, DenseMatrix, DenseVector, DihedralGroup, DiscreteSet, DoubleField, FreeGroup, GenericMatrix, GenericVector, Integer, Integers, IntervalND, JuliaSet, KerrMetric, LieGroup, MandelbrotSet, MatrixLieAlgebra, MMapMatrix, NativeRealBig, NativeRealDoubleMatrix, NativeRealDoubleVector, NativeRealFloatMatrix, Natural, Naturals, Octonion, Octonions, Point2D, Point3D, PointND, PolynomialRing, Quaternion, QuaternionGroup, Quaternions, Rational, Rationals, Real, RealBig, RealDouble, RealDoubleMatrix, RealDoubleVector, RealFloat, RealFloatVector, Reals, SchwarzschildMetric, SIMDRealDoubleMatrix, SIMDRealFloatMatrix, SO3_1Group, SparseMatrix, SparseVector, SquareMatrices, SU2Group, SU3Group, SymmetricGroup, TiledMatrix, U1Group, Vector2D, Vector3D, Vector4D, VectorND, VectorSpace2D, VectorSpace3D
public interface Set<E>
Represents a mathematical set - a collection of distinct elements.
This is the foundational concept in mathematics. A set has no additional structure beyond membership. Higher-level structures (Magma, Group, Ring, Field) add operations and properties to sets.
Mathematical Definition
A set S is a well-defined collection of distinct objects, considered as a whole. The objects are called elements or members of the set.
Examples
- â„• = {0, 1, 2, 3, ...} - Natural numbers
- ℤ = {..., -2, -1, 0, 1, 2, ...} - Integers
- â„ - Real numbers
- â„‚ - Complex numbers
Usage in Episteme
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether this set contains the specified element.Returns a human-readable description of this set.booleanisEmpty()Returnstrueif this set contains no elements.
-
Method Details
-
contains
Tests whether this set contains the specified element.This is the fundamental operation of a set - membership testing.
- Parameters:
element- the element to test for membership- Returns:
trueif this set contains the element,falseotherwise- Throws:
NullPointerException- if the element is null and this set does not permit null elements- See Also:
-
isEmpty
boolean isEmpty()Returnstrueif this set contains no elements.The empty set (∅) is a fundamental concept in set theory. It is the unique set containing no elements.
- Returns:
trueif this set is empty
-
description
String description()Returns a human-readable description of this set.Examples:
- "â„ (Real Numbers)"
- "ℤ/12ℤ (Integers modulo 12)"
- "{1, 2, 3, 4, 5}"
- Returns:
- a description of this set
-