Class PointND
java.lang.Object
org.episteme.core.mathematics.geometry.PointND
- All Implemented Interfaces:
GeometricObject<PointND>, Set<PointND>, MetricSpace<PointND>, TopologicalSpace<PointND>
Represents an N-dimensional point.
A point is a position in N-dimensional Euclidean space, represented by N coordinates. Points are distinct from vectors - they represent positions, not directions.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the dimension of the ambient space containing this object.booleanTests whether this set contains the specified element.booleancontainsPoint(PointND 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 Euclidean distance to another point.distanceTo(PointND other) booleanget(int index) Gets the coordinate at the specified index.inthashCode()interpolate(PointND other, Real t) Linear interpolation between this point and another.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.Computes the midpoint between this point and another.static PointNDof(double... coords) Creates a point from double coordinates.static PointNDCreates a point from varargs coordinates.toString()toVector()Returns the coordinates as a vector.Translates this point by a vector.
-
Constructor Details
-
PointND
-
PointND
-
-
Method Details
-
of
-
of
Creates a point from double coordinates.- Parameters:
coords- the coordinates
-
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<PointND>- 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<PointND>- Returns:
- the ambient space dimension
-
get
Gets the coordinate at the specified index.- Parameters:
index- the index (0-based)- Returns:
- the coordinate value
-
toVector
-
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<PointND>- 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.
-
distance
-
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<PointND>- 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<PointND>- Returns:
- true if this is a closed set
-
distanceTo
-
translate
-
midpoint
-
interpolate
-
description
Description copied from interface:GeometricObjectReturns a human-readable description of this geometric object.- Specified by:
descriptionin interfaceGeometricObject<PointND>- Specified by:
descriptionin interfaceSet<PointND>- Returns:
- description string
-
toString
-
equals
-
hashCode
-