Mercurial > octave
comparison libinterp/corefcn/dot.cc @ 31547:212cc32100f5
Add new function 'tensorprod' (patch #10288)
* scripts/linear-algebra/tensorprod.m: New function to compute tensor product.
* scripts/linear-algebra/module.mk: Add tensorprod.m to file list.
* doc/interpreter/linalg.txi: Link to docstring for tensorprod.
* libinterp/corefcn/data.cc(mtimes), dot.cc, kron.cc: Add tensorprod seealso.
* etc/NEWS.9.md: Note new function tensorprod.
author | Kasper H. Filtenborg <kasper.filtenborg@gmail.com> |
---|---|
date | Fri, 25 Nov 2022 13:58:54 -0500 |
parents | 32d2b6604a9f |
children | dfa5d9c3ae72 |
comparison
equal
deleted
inserted
replaced
31546:c664627d601e | 31547:212cc32100f5 |
---|---|
89 @code{sum (conj (@var{X}) .* @var{Y}, @var{dim})}, but avoids forming a | 89 @code{sum (conj (@var{X}) .* @var{Y}, @var{dim})}, but avoids forming a |
90 temporary array and is faster. When @var{X} and @var{Y} are column vectors, | 90 temporary array and is faster. When @var{X} and @var{Y} are column vectors, |
91 the result is equivalent to @code{@var{X}' * @var{Y}}. Although, @code{dot} | 91 the result is equivalent to @code{@var{X}' * @var{Y}}. Although, @code{dot} |
92 is defined for integer arrays, the output may differ from the expected result | 92 is defined for integer arrays, the output may differ from the expected result |
93 due to the limited range of integer objects. | 93 due to the limited range of integer objects. |
94 @seealso{cross, divergence} | 94 @seealso{cross, divergence, tensorprod} |
95 @end deftypefn */) | 95 @end deftypefn */) |
96 { | 96 { |
97 int nargin = args.length (); | 97 int nargin = args.length (); |
98 | 98 |
99 if (nargin < 2 || nargin > 3) | 99 if (nargin < 2 || nargin > 3) |