Functions

kron.cc File Reference

#include "dMatrix.h"
#include "fMatrix.h"
#include "CMatrix.h"
#include "fCMatrix.h"
#include "dSparse.h"
#include "CSparse.h"
#include "dDiagMatrix.h"
#include "fDiagMatrix.h"
#include "CDiagMatrix.h"
#include "fCDiagMatrix.h"
#include "PermMatrix.h"
#include "mx-inlines.cc"
#include "quit.h"
#include "defun-dld.h"
#include "error.h"
#include "oct-obj.h"
Include dependency graph for kron.cc:

Go to the source code of this file.

Functions

 DEFUN_DLD (kron, args,,"-*- texinfo -*-\n\ @deftypefn {Loadable Function} {} kron (@var{A}, @var{B})\n\ @deftypefnx {Loadable Function} {} kron (@var{A1}, @var{A2}, @dots{})\n\ Form the Kronecker product of two or more matrices, defined block by \n\ block as\n\ \n\ @example\n\ x = [a(i, j) b]\n\ @end example\n\ \n\ For example:\n\ \n\ @example\n\ @group\n\ kron (1:4, ones (3, 1))\n\ @result{} 1 2 3 4\n\ 1 2 3 4\n\ 1 2 3 4\n\ @end group\n\ @end example\n\ \n\ If there are more than two input arguments @var{A1}, @var{A2}, @dots{}, \n\ @var{An} the Kronecker product is computed as\n\ \n\ @example\n\ kron (kron (@var{A1}, @var{A2}), @dots{}, @var{An})\n\ @end example\n\ \n\ @noindent\n\ Since the Kronecker product is associative, this is well-defined.\n\ @end deftypefn")
octave_value dispatch_kron (const octave_value &a, const octave_value &b)
template<class MTA , class MTB >
octave_value do_kron (const octave_value &a, const octave_value &b)
template<class R , class T >
static MArray< T > kron (const MDiagArray2< R > &a, const MArray< T > &b)
static PermMatrix kron (const PermMatrix &a, const PermMatrix &b)
template<class T >
static MSparse< T > kron (const MSparse< T > &A, const MSparse< T > &B)
template<class R , class T >
static MArray< T > kron (const MArray< R > &a, const MArray< T > &b)

Function Documentation

DEFUN_DLD ( kron  ,
args   
)

Definition at line 246 of file kron.cc.

References dispatch_kron(), and print_usage().

octave_value dispatch_kron ( const octave_value a,
const octave_value b 
)
template<class MTA , class MTB >
octave_value do_kron ( const octave_value a,
const octave_value b 
)

Definition at line 167 of file kron.cc.

References kron(), and octave_value().

template<class R , class T >
static MArray<T> kron ( const MDiagArray2< R > &  a,
const MArray< T > &  b 
) [static]
static PermMatrix kron ( const PermMatrix a,
const PermMatrix b 
) [static]
template<class T >
static MSparse<T> kron ( const MSparse< T > &  A,
const MSparse< T > &  B 
) [static]
template<class R , class T >
static MArray<T> kron ( const MArray< R > &  a,
const MArray< T > &  b 
) [static]
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines