Class Point2D
java.lang.Object
org.episteme.core.mathematics.geometry.Point2D
- All Implemented Interfaces:
GeometricObject<Point2D>, Set<Point2D>, MetricSpace<Point2D>, TopologicalSpace<Point2D>
A point in 2D Euclidean space.
* @author Silvere Martin-Michiellot
- Since:
- 1.0
- Author:
- Gemini AI (Google DeepMind)
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintReturns the dimension of the ambient space containing this object.booleanTests whether this set contains the specified element.booleancontainsPoint(Point2D point) Checks if this space contains the given point.Returns a human-readable description of this geometric object.intReturns the intrinsic dimension of this geometric object.Computes the distance between two points.distanceSquared(Point2D other) distanceTo(Point2D other) booleangetX()getY()inthashCode()booleanisClosed()Checks if this set is closed in the topology.booleanisEmpty()Returnstrueif this set contains no elements.booleanisOpen()Checks if this set is open in the topology.static Point2Dof(double x, double y) static Point2DtoString()
-
Field Details
-
ZERO
-
-
Method Details
-
of
-
of
-
getX
-
getY
-
distanceTo
-
distanceSquared
-
distance
Description copied from interface:MetricSpaceComputes the distance between two points.- Specified by:
distancein interfaceMetricSpace<Point2D>- Parameters:
a- the first pointb- the second point- Returns:
- the distance between a and b
-
isEmpty
public boolean isEmpty()Description copied from interface:SetReturnstrueif this set contains no elements.The empty set (∅) is a fundamental concept in set theory. It is the unique set containing no elements.
-
isOpen
public boolean isOpen()Description copied from interface:TopologicalSpaceChecks if this set is open in the topology.- Specified by:
isOpenin interfaceTopologicalSpace<Point2D>- Returns:
- true if this is an open set
-
isClosed
public boolean isClosed()Description copied from interface:TopologicalSpaceChecks if this set is closed in the topology.- Specified by:
isClosedin interfaceTopologicalSpace<Point2D>- Returns:
- true if this is a closed set
-
add
-
dimension
public int dimension()Description copied from interface:GeometricObjectReturns the intrinsic dimension of this geometric object.Examples:
- Point: 0
- Line/Segment: 1
- Plane/Surface: 2
- Volume: 3
- Specified by:
dimensionin interfaceGeometricObject<Point2D>- Returns:
- the dimension
-
ambientDimension
public int ambientDimension()Description copied from interface:GeometricObjectReturns the dimension of the ambient space containing this object.For example, a 2D plane in 3D space has dimension=2 but ambientDimension=3.
- Specified by:
ambientDimensionin interfaceGeometricObject<Point2D>- Returns:
- the ambient space dimension
-
containsPoint
Description copied from interface:TopologicalSpaceChecks if this space contains the given point.Named containsPoint to avoid erasure conflict with Set.contains.
- Specified by:
containsPointin interfaceTopologicalSpace<Point2D>- Parameters:
point- the point to check- Returns:
- true if the point is in this space
-
contains
Description copied from interface:SetTests whether this set contains the specified element.This is the fundamental operation of a set - membership testing.
-
description
Description copied from interface:GeometricObjectReturns a human-readable description of this geometric object.- Specified by:
descriptionin interfaceGeometricObject<Point2D>- Specified by:
descriptionin interfaceSet<Point2D>- Returns:
- description string
-
equals
-
hashCode
-
toString
-