Mercurial > octave
changeset 31598:53fee053d962
# HG changeset patch
# User Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
# Date 1669826933 18000
# Wed Nov 30 11:48:53 2022 -0500
# Node ID 6f7e0018c745ebb4fbecfc939e99459a4943c4fd
# Parent 65157e496f5d92bac4190f7877df951eb3698ca3
doc: Adjust whitespace in tensorprod.m docstring and add author to contrib list
* scripts/linear-algebra/tensorprod.m: Enforce two spaces after a period and
keep lines under 80 characters.
* doc/interpreter/contributors.in: add Kasper H. Filtenborg
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Wed, 30 Nov 2022 18:51:14 -0500 |
parents | 65157e496f5d |
children | cd47350ec1af |
files | doc/interpreter/contributors.in scripts/linear-algebra/tensorprod.m |
diffstat | 2 files changed, 13 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/doc/interpreter/contributors.in Wed Nov 30 08:03:06 2022 -0500 +++ b/doc/interpreter/contributors.in Wed Nov 30 18:51:14 2022 -0500 @@ -101,6 +101,7 @@ Massimiliano Fasi Stephen Fegan Ramon Garcia Fernandez +Kasper H. Filtenborg Torsten Finke David Finkel Guillaume Flandin
--- a/scripts/linear-algebra/tensorprod.m Wed Nov 30 08:03:06 2022 -0500 +++ b/scripts/linear-algebra/tensorprod.m Wed Nov 30 18:51:14 2022 -0500 @@ -32,23 +32,23 @@ ## Compute the tensor product between numeric tensors @var{A} and @var{B}. ## ## The dimensions of @var{A} and @var{B} that are contracted are defined by -## @var{dimA} and @var{dimB}, respectively. @var{dimA} and @var{dimB} are -## scalars or equal length vectors that define the dimensions to match up. The -## matched dimensions of @var{A} and @var{B} must have equal lengths. +## @var{dimA} and @var{dimB}, respectively. @var{dimA} and @var{dimB} are +## scalars or equal length vectors that define the dimensions to match up. +## The matched dimensions of @var{A} and @var{B} must have equal lengths. ## ## When @var{dim} is used, it is equivalent to @var{dimA} = @var{dimB} = ## @var{dim}. ## -## When no dimensions are specified, @var{dimA} = @var{dimB} = []. This computes -## the outer product between @var{A} and @var{B}. +## When no dimensions are specified, @var{dimA} = @var{dimB} = []. This +## computes the outer product between @var{A} and @var{B}. ## ## Using the "all" option results in the inner product between @var{A} and -## @var{B}. This requires size(@var{A}) == size(@var{B}). +## @var{B}. This requires size(@var{A}) == size(@var{B}). ## -## Use the property-value pair with the property name "NumDimensionsA" -## when @var{A} has trailing singleton dimensions that should be transfered to -## @var{C}. The specified @var{value} should be the total number of dimensions -## of @var{A}. +## Use the property-value pair with the property name "NumDimensionsA" when +## @var{A} has trailing singleton dimensions that should be transfered to +## @var{C}. The specified @var{value} should be the total number of +## dimensions of @var{A}. ## ## Matlab Compatibility: Octave does not currently support the "name=value" ## syntax for the "NumDimensionsA" parameter. @@ -214,8 +214,8 @@ remainSizeA = sizeA(remainDimA); # Contrib. to size of C from remaining A dims ## Prepare for B (See comments for A. Note that in principle, - ## prod(sizeB(dimB)) should always be equal to prod(sizeA(dimA)). May be - ## able to optimize further here. + ## prod (sizeB (dimB)) should always be equal to prod (sizeA (dimA)). May + ## be able to optimize further here. remainDimB = setdiff (1:ndimsB, dimB); newDimOrderB = [remainDimB, dimB]; newSizeB = [prod(sizeB(remainDimB)), prod(sizeB(dimB))];