CDMA plugin API  3.1.0
CDMA core library
org.gumtree.data.math.IArrayMath Interface Reference

The IArrayMath interface defines some commons math operations on a IArray. More...

List of all members.

Public Member Functions

IArray getArray ()
IArrayMath toAdd (IArray array) throws ShapeNotMatchException
IArrayMath toAdd (IArrayMath array) throws ShapeNotMatchException
IArrayMath add (IArray array) throws ShapeNotMatchException
IArrayMath add (IArrayMath array) throws ShapeNotMatchException
IArrayMath toAdd (double value)
IArrayMath add (double value)
IArrayMath toEltMultiply (IArray array) throws ShapeNotMatchException
IArrayMath toEltMultiply (IArrayMath array) throws ShapeNotMatchException
IArrayMath eltMultiply (IArray array) throws ShapeNotMatchException
IArrayMath eltMultiply (IArrayMath array) throws ShapeNotMatchException
IArrayMath toScale (double value)
IArrayMath scale (double value)
IArrayMath matMultiply (IArray array) throws ShapeNotMatchException
IArrayMath matMultiply (IArrayMath array) throws ShapeNotMatchException
IArrayMath matInverse () throws ShapeNotMatchException
IArrayMath toSqrt ()
IArrayMath sqrt ()
IArrayMath toExp ()
IArrayMath exp ()
IArrayMath toLn ()
IArrayMath ln ()
IArrayMath toLog10 ()
IArrayMath log10 ()
IArrayMath toSin ()
IArrayMath sin ()
IArrayMath toAsin ()
IArrayMath asin ()
IArrayMath toCos ()
IArrayMath toAcos ()
IArrayMath cos ()
IArrayMath acos ()
IArrayMath toTan ()
IArrayMath tan ()
IArrayMath toAtan ()
IArrayMath atan ()
IArrayMath toPower (double power)
IArrayMath power (double power)
double powerSum (IArray axis, int dimension, double power) throws ShapeNotMatchException
double powerSum (IArrayMath axis, int dimension, double power) throws ShapeNotMatchException
double sum ()
double sumNormalise ()
IArrayMath toEltInverse () throws DivideByZeroException
IArrayMath eltInverse () throws DivideByZeroException
IArrayMath toEltInverseSkipZero ()
IArrayMath eltInverseSkipZero ()
double vecDot (IArray array) throws ShapeNotMatchException
double vecDot (IArrayMath array) throws ShapeNotMatchException
IArrayMath sumForDimension (int dimension, boolean isVariance) throws ShapeNotMatchException
double varianceSumNormalise ()
IArrayMath enclosedSumForDimension (int dimension, boolean isVariance) throws ShapeNotMatchException
double getNorm ()
IArrayMath normalise ()
void eltMultiplyWithEqualSize (IArray array, IArray result) throws ShapeNotMatchException
void eltMultiplyWithEqualSize (IArrayMath array, IArrayMath result) throws ShapeNotMatchException
void eltDivideWithEqualSize (IArray array, IArray result) throws ShapeNotMatchException
void eltDivideWithEqualSize (IArrayMath array, IArrayMath result) throws ShapeNotMatchException
IArrayMath toEltDivide (IArray array) throws ShapeNotMatchException
IArrayMath toEltDivide (IArrayMath array) throws ShapeNotMatchException
IArrayMath eltDivide (IArray array) throws ShapeNotMatchException
IArrayMath eltDivide (IArrayMath array) throws ShapeNotMatchException
IArrayMath eltRemainder (final IArray newArray) throws ShapeNotMatchException
IArrayMath eltRemainder (IArrayMath array) throws ShapeNotMatchException
IArrayMath toEltRemainder (final IArray newArray) throws ShapeNotMatchException
IArrayMath toEltRemainder (IArrayMath array) throws ShapeNotMatchException
void eltRemainderEqualSize (IArrayMath array, IArrayMath result) throws ShapeNotMatchException
void eltRemainderEqualSize (final IArray newArray, final IArray result) throws ShapeNotMatchException
IArrayMath toMod (final double value)
IArrayMath mod (final double value)
double getDeterminant () throws ShapeNotMatchException
double getMaximum ()
double getMinimum ()
IFactory getFactory ()

Detailed Description

The IArrayMath interface defines some commons math operations on a IArray.

Note:
When developing a plug-in consider using the engine's implementation. You should redefine this interface implementation, only in case of very specific needs.

pluginAPI It is used to provide some commons math method that are often used on array.

Author:
rodriguez

Member Function Documentation

Update the array with arc cosine of its values.

Returns:
IArrayMath itself

Update the array with element-wise add values from another array to its values.

Parameters:
arrayIArray object
Returns:
IArrayMath itself
Exceptions:
ShapeNotMatchExceptionmismatching shape

Update the array with adding a constant to its values.

Parameters:
valuedouble type
Returns:
IArrayMath itself

Update the array with arc sine of its values.

Returns:
IArrayMath itself

Update the array with arc trigonometric of its values.

Returns:
IArrayMath itself

Update the array with cosine of its values.

Returns:
IArrayMath itself

Element wise divide the value by value from a given array.

Parameters:
arrayIArray object
Returns:
this array after modification
Exceptions:
ShapeNotMatchExceptionmismatching shape

Element-wise divided by another array, and put the result in a given array.

Parameters:
arrayCDMA IArray object
resultCDMA IArray object
Exceptions:
ShapeNotMatchException

Update the array with element-wise inverse of its values.

Returns:
IArrayMath itself
Exceptions:
DivideByZeroExceptiondivided by zero

Update the array with element-wise inverse of its values, skip zero values.

Returns:
IArrayMath itself

Update the array with the element wise multiply of its values.

Parameters:
arrayIArray object
Returns:
IArrayMath itself
Exceptions:
ShapeNotMatchExceptionmismatching shape

Element-wise multiply another array, and put the result in a given array.

Parameters:
arrayCDMA IArray object
resultCDMA IArray object
Exceptions:
ShapeNotMatchException

Do sum calculation for every slice of the array on a dimension. The result will be a one dimensional IArray.

Parameters:
dimensioninteger value
isVariancetrue if the array serves as variance
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException

Update the array with e raised to the power of its values.

Returns:
IArrayMath itself

Calculate the determinant value.

Parameters:
arrayin array type
Returns:
double value
Exceptions:
ShapeNotMatchExceptionshape not match

Get the appropriate facgtory for this math object.

Returns:
implementation of the factory object

Get maximum value of the array as a double type if it is a numeric array.

Parameters:
arrayin array type
Returns:
maximum value in double type

Get minimum value of the array as a double type if it is a numeric array.

Parameters:
arrayin array type
Returns:
minimum value in double type

Get the L2 norm of the IArray. The array must have only one dimension.

Returns:
IArray with new storage

Update the array with element-wise natural logarithm of its values.

Returns:
IArrayMath itself

Update the array with element-wise logarithm (base 10) of its values.

Returns:
IArrayMath itself

Inverse the array assume it's a matrix.

Parameters:
arrayin array type
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException

Multiple two arrays in matrix multiplication rule. The two arrays must comply matrix multiply requirement.

Parameters:
arrayin IArray type
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException

Normalise the vector to norm = 1.

Returns:
IArray with new storage

Update the array with to a constant power of its values.

Parameters:
powerdouble value
Returns:
IArrayMath itself
double org.gumtree.data.math.IArrayMath.powerSum ( IArray  axis,
int  dimension,
double  power 
) throws ShapeNotMatchException

Do a power-sum on a certain dimension. A power-sum will raise all element of the array to a certain power, then do a sum on a certain dimension, and put weight on the result.

Parameters:
axisIArray object
dimensioninteger
powerdouble value
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException
double org.gumtree.data.math.IArrayMath.powerSum ( IArrayMath  axis,
int  dimension,
double  power 
) throws ShapeNotMatchException

Update the array with the scale of its values.

Parameters:
valuedouble type
Returns:
IArrayMath itself

Update the array with sine of its values.

Returns:
IArrayMath itself

Update the array with of the square root its value.

Returns:
IArrayMath itself

Calculate the sum value of the array. If an element is NaN, skip it.

Returns:
a double value
IArrayMath org.gumtree.data.math.IArrayMath.sumForDimension ( int  dimension,
boolean  isVariance 
) throws ShapeNotMatchException

Do sum calculation for every slice of the array on a dimension. The result will be a one dimensional IArray.

Parameters:
dimensioninteger value
isVariancetrue if the array serves as variance
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException

Calculate the sum value of the array. If an element is NaN, skip it. Then after calculation, normalise the result to the actual size of the array. For example, result = raw sum * size of array / (size of array - number of NaNs).

Returns:
a double value

Update the array with trigonometric of its values.

Returns:
IArrayMath itself

Calculate the arc cosine value of each elements in the IArray.

Returns:
IArray with new storage

Add two IArray together, element-wisely. The two arrays must have the same shape.

Parameters:
arrayin IArray type
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchExceptionmismatching shape

Add a value to the IArray element-wisely.

Parameters:
valuedouble type
Returns:
IArray with new storage

Calculate the arc sine value of each elements in the IArray.

Returns:
IArray with new storage

Calculate the arc trigonometric value of each elements in the IArray.

Returns:
IArray with new storage

Calculate the cosine value of each elements in the IArray.

Returns:
IArray with new storage

Element wise divide the value by value from a given array.

Parameters:
arrayIArray object
Returns:
new array
Exceptions:
ShapeNotMatchExceptionmismatching shape

Inverse every element of the array into a new storage.

Returns:
IArray with new storage
Exceptions:
DivideByZeroException

Do a element-wise inverse calculation that skip zero values. Yij = 1 / Xij.

Returns:
IArray with new storage

Multiply the two arrays element-wisely. Xij = Aij * Bij. The two arrays must have the same shape.

Parameters:
arrayin IArray type
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchExceptionmismatching shape

Calculate the e raised to the power of double values in the IArray element-wisely.

Returns:
IArray with new storage

Calculate an element-wise natural logarithm of values of an IArray.

Returns:
IArray with new storage

Calculate an element-wise logarithm (base 10) of values of an IArray.

Returns:
IArray with new storage

Do an element-wise power calculation of the array. Yij = Xij ^ power.

Parameters:
powerdouble value
Returns:
IArray with new storage

Scale the array with a double value.

Parameters:
valuedouble type
Returns:
IArray with new storage

Calculate the sine value of each elements in the IArray.

Returns:
IArray with new storage

Calculate the square root value of every element of the array.

Returns:
IArray with new storage

Calculate the trigonometric value of each elements in the IArray.

Returns:
IArray with new storage

Treat the array as a variance. Normalise the sum against the number of elements in the array.

Returns:
double value

Calculate the vector dot production of two arrays. Both array must have the same size.

Parameters:
arrayin IArray type
Returns:
IArray with new storage
Exceptions:
ShapeNotMatchException

The documentation for this interface was generated from the following file:
 All Classes Namespaces Files Functions Variables