Class Vector3D
java.lang.Object
org.episteme.core.mathematics.linearalgebra.vectors.GenericVector<Real>
org.episteme.core.mathematics.linearalgebra.vectors.DenseVector<Real>
org.episteme.core.mathematics.geometry.Vector3D
- All Implemented Interfaces:
Vector<Real>, AbelianGroup<Vector<Real>>, AbelianMonoid<Vector<Real>>, Group<Vector<Real>>, Magma<Vector<Real>>, Monoid<Vector<Real>>, Set<Vector<Real>>, Module<Vector<Real>, Real>, MetricSpace<Vector<Real>>, TopologicalSpace<Vector<Real>>
Represents a 3D vector.
providing convenient constructors and accessors.
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Vector3Dstatic final Vector3Dstatic final Vector3Dstatic final Vector3DFields inherited from class GenericVector
provider, ring, storage -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanTests whether this set contains the specified element.booleancontainsPoint(Vector<Real> p) Checks if this space contains the given point.Returns the cross product of this vector and another.Computes the distance between two points.doublegetX()doublegetY()doublegetZ()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.Returns the scalar product of this vector.negate()Returns the negation of this vector (-this).norm()Returns the norm (length) of this vector.Returns the normalized vector (unit vector).x()y()z()Methods inherited from class DenseVector
getDenseStorage, of, toString, valueOf, zerosMethods inherited from class GenericVector
add, angle, cross, description, dimension, dot, get, getField, getProvider, getScalarRing, getStorage, inverse, operate, projection, scale, scale, set, subtract, toMatrix, toTensor, withProviderMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface AbelianGroup
isCommutative, negate, subtractMethods inherited from interface AbelianMonoid
add, identity, zeroMethods inherited from interface Monoid
isAssociativeMethods inherited from interface Set
description
-
Field Details
-
ZERO
-
X_AXIS
-
Y_AXIS
-
Z_AXIS
-
-
Constructor Details
-
Vector3D
public Vector3D(double x, double y, double z) Creates a new Vector3D from double coordinates.- Parameters:
x- the x coordinatey- the y coordinatez- the z coordinate
-
Vector3D
-
-
Method Details
-
x
-
y
-
z
-
cross
-
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
normalize
-
magnitude
-
norm
-
multiply
-
divide
-
negate
-
distance
Description copied from interface:MetricSpaceComputes the distance between two points.- Specified by:
distancein interfaceMetricSpace<Vector<Real>>- Parameters:
a- the first pointb- the second point- Returns:
- the distance between a and b
-
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<Vector<Real>>- Parameters:
p- 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.
-
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<Vector<Real>>- 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<Vector<Real>>- Returns:
- true if this is a closed set
-
dot
-
subtract
-
add
-