public static final class Vector1D.Sum extends EuclideanVectorSum<Vector1D>
Sum
.
This class is mutable and not thread-safe.
Sum
Modifier and Type | Method and Description |
---|---|
Vector1D.Sum |
add(Vector1D vec)
Add a vector to this instance.
|
Vector1D.Sum |
addScaled(double scale,
Vector1D vec)
Add a scaled vector to this instance.
|
static Vector1D.Sum |
create()
Create a new instance with an initial value set to the
zero vector . |
Vector1D |
get() |
static Vector1D.Sum |
of(Vector1D initial)
Construct a new instance with an initial value set to the argument.
|
static Vector1D.Sum |
of(Vector1D first,
Vector1D... more)
Construct a new instance from multiple values.
|
accept
public Vector1D.Sum add(Vector1D vec)
add
in class EuclideanVectorSum<Vector1D>
vec
- vector to addpublic Vector1D.Sum addScaled(double scale, Vector1D vec)
sum.addScale(scale, vec)
will generally produce a better result than
sum.add(vec.multiply(scale))
.addScaled
in class EuclideanVectorSum<Vector1D>
scale
- scale factorvec
- vector to scale and addpublic static Vector1D.Sum create()
zero vector
.public static Vector1D.Sum of(Vector1D initial)
initial
- initial sum valuepublic static Vector1D.Sum of(Vector1D first, Vector1D... more)
first
- first vectormore
- additional vectorsCopyright © 2016–2021 The Apache Software Foundation. All rights reserved.