public abstract class Vector extends Object implements Serializable
Constructor and Description |
---|
Vector() |
Modifier and Type | Method and Description |
---|---|
abstract void |
add(int i,
double val)
Add the i-th element of the vector by value "val".
|
abstract Vector |
append(double v)
Create a new vector by adding an element to the end of the vector.
|
abstract double |
dot(Vector vec)
Compute the dot product with another vector.
|
abstract double |
get(int i)
Get the i-th element of the vector.
|
abstract VectorIterator |
iterator()
Get the iterator of the vector.
|
abstract Vector |
minus(Vector vec)
Create a new vector by subtracting another vector.
|
abstract void |
normalizeEqual(double p)
Normalize the vector.
|
abstract double |
normInf()
Return the Inf norm of the vector.
|
abstract double |
normL1()
Return the L1 norm of the vector.
|
abstract double |
normL2()
Return the L2 norm of the vector.
|
abstract double |
normL2Square()
Return the square of L2 norm of the vector.
|
abstract DenseMatrix |
outer()
Compute the outer product with itself.
|
abstract Vector |
plus(Vector vec)
Create a new vector by plussing another vector.
|
abstract Vector |
prefix(double v)
Create a new vector by adding an element to the head of the vector.
|
abstract Vector |
scale(double v)
Scale the vector by value "v" and create a new vector to store the result.
|
abstract void |
scaleEqual(double v)
Scale the vector by value "v".
|
abstract void |
set(int i,
double val)
Set the i-th element of the vector to value "val".
|
abstract int |
size()
Get the size of the vector.
|
abstract Vector |
slice(int[] indexes)
Slice the vector.
|
abstract void |
standardizeEqual(double mean,
double stdvar)
Standardize the vector.
|
public abstract int size()
public abstract double get(int i)
public abstract void set(int i, double val)
public abstract void add(int i, double val)
public abstract double normL1()
public abstract double normInf()
public abstract double normL2()
public abstract double normL2Square()
public abstract Vector scale(double v)
public abstract void scaleEqual(double v)
public abstract void normalizeEqual(double p)
public abstract void standardizeEqual(double mean, double stdvar)
public abstract Vector prefix(double v)
public abstract Vector append(double v)
public abstract double dot(Vector vec)
public abstract VectorIterator iterator()
public abstract Vector slice(int[] indexes)
public abstract DenseMatrix outer()
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.