shared
 All Classes Functions Variables Typedefs Enumerations Enumerator Friends
Public Member Functions | Static Public Member Functions | List of all members
MatrixOps Class Reference

A class for matrix operations. More...

#include <MatrixOps.hpp>

Public Member Functions

template<class T >
void mulProxy (JNIEnv *env, jarray lhsV, jarray rhsV, jint lhsR, jint rhsC, jarray dstV, T zero, jboolean complex)
 
template<class T >
void mul (const T *lArr, const T *rArr, jint inner, T *outArr, jint lr, jint rc, T zero)
 
template<class T >
void diagProxy (JNIEnv *env, jarray srcV, jarray dstV, jint size, jboolean complex)
 
template<class T >
void diag (const T *srcArr, T *dstArr, jint size)
 

Static Public Member Functions

static void mul (JNIEnv *env, jobject thisObj, jdoubleArray lhsV, jdoubleArray rhsV, jint lhsR, jint rhsC, jdoubleArray dstV, jboolean complex)
 Multiplies two matrices. More...
 
template<class T >
static void mul (const T *lArr, const T *rArr, jint inner, T *outArr, jint lr, jint rc, T zero)
 Computes the product of two matrices. More...
 
static void diag (JNIEnv *env, jobject thisObj, jdoubleArray srcV, jdoubleArray dstV, jint size, jboolean complex)
 Gets the diagonal of a matrix. More...
 
template<class T >
static void diag (const T *srcArr, T *dstArr, jint size)
 Computes the diagonal of a matrix. More...
 

Detailed Description

A class for matrix operations.

Member Function Documentation

void MatrixOps::diag ( JNIEnv *  env,
jobject  thisObj,
jdoubleArray  srcV,
jdoubleArray  dstV,
jint  size,
jboolean  complex 
)
static

Gets the diagonal of a matrix.

Parameters
envthe JNI environment.
thisObjthis object.
srcVsource values.
dstVdestination values.
sizethe matrix size.
complexwhether the operation is complex-valued.
template<class T >
static void MatrixOps::diag ( const T *  srcArr,
T *  dstArr,
jint  size 
)
inlinestatic

Computes the diagonal of a matrix.

Parameters
srcArrthe source array.
dstArrthe destination array.
sizethe matrix size.
void MatrixOps::mul ( JNIEnv *  env,
jobject  thisObj,
jdoubleArray  lhsV,
jdoubleArray  rhsV,
jint  lhsR,
jint  rhsC,
jdoubleArray  dstV,
jboolean  complex 
)
static

Multiplies two matrices.

Parameters
envthe JNI environment.
thisObjthis object.
lhsVthe left hand side values.
rhsVthe right hand side values.
lhsRthe row count of the result.
rhsCthe column count of the result.
dstVthe destination values.
complexwhether the operation is complex-valued.
template<class T >
static void MatrixOps::mul ( const T *  lArr,
const T *  rArr,
jint  inner,
T *  outArr,
jint  lr,
jint  rc,
zero 
)
inlinestatic

Computes the product of two matrices.

Parameters
lArrthe left hand side array.
rArrthe right hand side array.
innerthe inner dimension size.
outArrthe output array.
lrthe left hand side row count.
rcthe right hand side column count.
zerothe representation of 0.