Package org.djunits.vecmat.d1
Class AbsVector1<A extends AbsQuantity<A,Q,?>,Q extends Quantity<Q>>
java.lang.Object
org.djunits.vecmat.def.AbsVectorMatrix<A,Q,VA,VQ,VAT>
org.djunits.vecmat.def.AbsVector<A,Q,AbsVector1<A,Q>,Vector1<Q>,AbsVector1<A,Q>>
org.djunits.vecmat.d1.AbsVector1<A,Q>
- Type Parameters:
A- the absolute quantity typeQ- the corresponding relative quantity type
- All Implemented Interfaces:
Serializable,Iterable<A>,Value<AbsVector1<A,,Q>, Q> AbsVector.Row<AbsVector1<A,Q>, Q>
public class AbsVector1<A extends AbsQuantity<A,Q,?>,Q extends Quantity<Q>>
extends AbsVector<A,Q,AbsVector1<A,Q>,Vector1<Q>,AbsVector1<A,Q>>
implements AbsVector.Row<AbsVector1<A,Q>,Q>
AbsVector1 implements a vector with one real-valued entry representing an absolute quantity. The vector is immutable, except
for the display unit, which can be changed. Some of the method that have been defined already for a generic vector have been
re-implemented for efficiency.
Copyright (c) 2026-2026 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://djunits.org. The DJUNITS project is distributed under a three-clause BSD-style license.
- Author:
- Alexander Verbraeck
- See Also:
-
Nested Class Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAbsVector1<A,Q> Return a new vector or matrix with the given SI or BASE values for the relative vector or matrix.booleanReturn whether this vector is a column vector.booleanReturn whether this vector is a row vector.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> of(A absX) Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> of(A[] absData) Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> of(Q[] data, R reference) Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> of(Q x, R reference) Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> Create an AbsVector1 without needing generics.static <A extends AbsQuantity<A,Q, R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>>
AbsVector1<A,Q> Create an AbsVector1 without needing generics.AbsVector1<A,Q> Return a transposed absolute vector or matrix, where rows and columns have been swapped.Methods inherited from class org.djunits.vecmat.def.AbsVector
get, getScalarArray, getSiArray, iterator, mget, msi, si, sizeMethods inherited from class org.djunits.vecmat.def.AbsVectorMatrix
add, add, asAbsMatrix1x1, asAbsMatrix2x2, asAbsMatrix3x3, asAbsMatrixNxM, asAbsMatrixNxN, asAbsQuantityTable, asAbsVector1, asAbsVector2Col, asAbsVector2Row, asAbsVector3Col, asAbsVector3Row, asAbsVectorNCol, asAbsVectorNRow, checkCol, checkRow, cols, equals, getDisplayUnit, getReference, getRelativeVecMat, hashCode, instantiateSi, isRelative, max, mcheckCol, mcheckRow, median, min, rows, setDisplayUnit, subtract, subtract, subtract, subtract, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.djunits.vecmat.def.AbsVector.Row
format, format, formatMethods inherited from interface java.lang.Iterable
forEach, spliteratorMethods inherited from interface org.djunits.value.Value
getDisplayUnit, isAbsolute, isRelative, setDisplayUnit, setDisplayUnit
-
Constructor Details
-
AbsVector1
Create a new AbsVector1 with a display unit and a reference point.- Parameters:
relativeVector- the vector with values relative to the reference pointreference- the reference point for the absolute values
-
-
Method Details
-
instantiate
Description copied from class:AbsVectorMatrixReturn a new vector or matrix with the given SI or BASE values for the relative vector or matrix.- Specified by:
instantiatein classAbsVectorMatrix<A extends AbsQuantity<A,Q, ?>, Q extends Quantity<Q>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>, Vector1<Q extends Quantity<Q>>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>> - Parameters:
relativeVector- the underlying relative vector or matrix with SI values relative to the reference pointreference- the reference point for the relative SI values- Returns:
- a new matrix with the provided SI or BASE values
-
transpose
Description copied from class:AbsVectorMatrixReturn a transposed absolute vector or matrix, where rows and columns have been swapped.- Specified by:
transposein classAbsVectorMatrix<A extends AbsQuantity<A,Q, ?>, Q extends Quantity<Q>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>, Vector1<Q extends Quantity<Q>>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>> - Returns:
- a transposed absolute vector or matrix, where rows and columns have been swapped
-
isColumnVector
public boolean isColumnVector()Description copied from class:AbsVectorReturn whether this vector is a column vector.- Overrides:
isColumnVectorin classAbsVector<A extends AbsQuantity<A,Q, ?>, Q extends Quantity<Q>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>, Vector1<Q extends Quantity<Q>>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>> - Returns:
- whether this vector is a column vector
-
isRowVector
public boolean isRowVector()Description copied from class:AbsVectorReturn whether this vector is a row vector.- Overrides:
isRowVectorin classAbsVector<A extends AbsQuantity<A,Q, ?>, Q extends Quantity<Q>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>, Vector1<Q extends Quantity<Q>>, AbsVector1<A extends AbsQuantity<A, Q, ?>, Q extends Quantity<Q>>> - Returns:
- whether this vector is a row vector
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(double xInUnit, Unit<?, Q> unit, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
xInUnit- the x-value expressed in the unitunit- the unit of the data, which will also be used as the display unitreference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(Q x, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
x- the x-value expressed as a quantityreference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(A absX) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
absX- the v1-value expressed as an absolute quantity- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(double[] dataInUnit, Unit<?, Q> unit, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
dataInUnit- the x-value expressed as an array in the display unitunit- the unit of the data, which will also be used as the display unitreference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
ofSi
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> ofSi(double xSi, Unit<?, Q> displayUnit, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
xSi- the x-value expressed as an array in the SI unitsdisplayUnit- the display unit to usereference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
ofSi
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> ofSi(double[] dataSi, Unit<?, Q> displayUnit, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
dataSi- the x-value expressed as an array in the SI unitsdisplayUnit- the display unit to usereference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(Q[] data, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
data- the x-value expressed as an array of quantitiesreference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(A[] absData) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
absData- the {x} value expressed as an array of absolute quantities- Returns:
- a new AbsVector1 with a unit
-
of
public static <A extends AbsQuantity<A,Q, AbsVector1<A,R>, Q extends Quantity<Q>, R extends Reference<R, A, Q>> Q> of(Vector1<Q> relativeVector, R reference) Create an AbsVector1 without needing generics.- Type Parameters:
A- the absolute quantity typeQ- the quantity typeR- the reference type- Parameters:
relativeVector- the relative vectorreference- the reference point for the absolute quantities- Returns:
- a new AbsVector1 with a unit
-