Package oracle.pgx.algorithm
Interface PgxVect<E>
-
- Type Parameters:
E
-
public interface PgxVect<E>
A PGX vector.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description PgxVect<E>
add(PgxVect<E> v)
Add this vector to the given vector (element-wise) and return the resulting vector.static <E> PgxVect<E>
create()
Instantiate a new vector.static <E> PgxVect<E>
create(E e)
Instantiate a new vector property and initialize it with the given value.E
get(int index)
Get the value of the vector at the given index.PgxVect<E>
multiply(java.lang.Number n)
Multiply this vector by the given scalar and return the resulting vector.E
multiply(PgxVect<E> v)
Multiply this vector by the (transpose of the) given vector and return the resulting scalar.void
reduceAdd(PgxVect<E> e)
Atomically add the given vector to this vector (element-wise).E
set(int index, E value)
Set the value of the vector at the given index to the given value.PgxVect<E>
subtract(PgxVect<E> v)
Subtract the given vector from this vector (element-wise) and return the resulting vector.
-
-
-
Method Detail
-
create
static <E> PgxVect<E> create()
Instantiate a new vector.- Type Parameters:
E
-- Returns:
-
create
static <E> PgxVect<E> create(E e)
Instantiate a new vector property and initialize it with the given value.- Type Parameters:
E
-- Returns:
-
get
E get(int index)
Get the value of the vector at the given index.- Parameters:
index
-- Returns:
-
set
E set(int index, E value)
Set the value of the vector at the given index to the given value.- Parameters:
index
-value
-- Returns:
-
add
PgxVect<E> add(PgxVect<E> v)
Add this vector to the given vector (element-wise) and return the resulting vector.- Parameters:
v
-- Returns:
-
subtract
PgxVect<E> subtract(PgxVect<E> v)
Subtract the given vector from this vector (element-wise) and return the resulting vector.- Parameters:
v
-- Returns:
-
multiply
PgxVect<E> multiply(java.lang.Number n)
Multiply this vector by the given scalar and return the resulting vector.- Parameters:
n
-- Returns:
-
multiply
E multiply(PgxVect<E> v)
Multiply this vector by the (transpose of the) given vector and return the resulting scalar.- Parameters:
v
-- Returns:
-
-