@Deprecated
public abstract class Vec
extends java.lang.Object
implements java.io.Serializable
size()
).Compatibility: Public
Modifier and Type | Method and Description |
---|---|
double |
dot(Vec other)
Deprecated.
Compute the dot product of this vector with another.
|
boolean |
equals(java.lang.Object o)
Deprecated.
|
double |
get(int i)
Deprecated.
Get the value from the vector at the specified position.
|
int |
hashCode()
Deprecated.
|
ImmutableVec |
immutable()
Deprecated.
Get an immutable vector with this vector's contents.
|
int |
largestDimension()
Deprecated.
Get the largest element of the vector.
|
double |
mean()
Deprecated.
Get the mean of this vector.
|
MutableVec |
mutableCopy()
Deprecated.
Get a mutable copy of this vector.
|
double |
norm()
Deprecated.
Get the L2 (Euclidean) norm of this vector.
|
int |
size()
Deprecated.
Get the dimension of this vector (the number of elements).
|
double |
sum()
Deprecated.
Get the sum of this vector.
|
java.lang.String |
toString()
Deprecated.
|
public final double get(int i)
i
- The index into the vector.i
.java.lang.IllegalArgumentException
- if i
is not in the range [0,size()
).public final int size()
public double norm()
public double sum()
public double mean()
Double.NaN
if the vector is
empty).public final double dot(Vec other)
other
- The other vector.other
.java.lang.IllegalArgumentException
- if other.size() != this.size()
.public int largestDimension()
public ImmutableVec immutable()
public MutableVec mutableCopy()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object