planc
Parallel Lowrank Approximation with Non-negativity Constraints
Functions
ntf_utils.hpp File Reference
#include "common/ncpfactors.hpp"
#include "common/tensor.hpp"

Go to the source code of this file.

Functions

void khatrirao (const MAT &i_A, const MAT &i_B, MAT *o_C)
 Returns the khatri-rao product between two matrices. More...
 
void kronecker (const VEC &i_acol, const VEC &i_bcol, VEC *o_c)
 Returns the kronecker product between two vectors. More...
 
void mttkrp (const int i_n, const planc::Tensor &X, planc::NCPFactors &i_F, MAT *o_mttkrp)
 Return the mttkrp of mode i_n of tensor X. More...
 

Function Documentation

◆ khatrirao()

void khatrirao ( const MAT i_A,
const MAT i_B,
MAT o_C 
)

Returns the khatri-rao product between two matrices.

Parameters
[in]Ais of size m x k matrix
[in]Bis of size n x k
[out]ReturnsC of size mn x k

Definition at line 15 of file ntf_utils.hpp.

◆ kronecker()

void kronecker ( const VEC i_acol,
const VEC i_bcol,
VEC o_c 
)
inline

Returns the kronecker product between two vectors.

Parameters
[in]acolcolumn vector of size m
[in]bcolis column vector of size n
[out]outputvector of size mn

Definition at line 34 of file ntf_utils.hpp.

◆ mttkrp()

void mttkrp ( const int  i_n,
const planc::Tensor X,
planc::NCPFactors i_F,
MAT o_mttkrp 
)

Return the mttkrp of mode i_n of tensor X.

That is., determine the KRP leaving out i_n and multiply with mode i_n factor

Parameters
[in]modei_n
[in]TensorX
[in]NCPFactors
[out]MTTKRPof factor mode i_n

Definition at line 49 of file ntf_utils.hpp.