Class Vector4D
java.lang.Object
org.episteme.core.mathematics.linearalgebra.vectors.GenericVector<Real>
org.episteme.core.mathematics.linearalgebra.vectors.DenseVector<Real>
org.episteme.core.mathematics.geometry.Vector4D
- 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 4D vector, typically used for spacetime coordinates (ct, x, y,
z).
- Since:
- 1.0
- Author:
- Silvere Martin-Michiellot, Gemini AI (Google DeepMind)
-
Field Summary
FieldsFields 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.ct()Computes the distance between two points.doublegetCt()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).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, norm, 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
-
-
Constructor Details
-
Vector4D
public Vector4D(double t, double x, double y, double z) Creates a new Vector4D from double coordinates.- Parameters:
t- the t (time) coordinatex- the x coordinatey- the y coordinatez- the z coordinate
-
Vector4D
-
-
Method Details
-
ct
-
x
-
y
-
z
-
getCt
public double getCt() -
getX
public double getX() -
getY
public double getY() -
getZ
public double getZ() -
normalize
-
normValue
-
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
-
subtract
-
add
-